Bug 1407607 followup - Fix rooting hazard. r=red

--HG--
extra : rebase_source : 1eef543c0461c601c47cbfb96a3ae3309b4221c1
This commit is contained in:
Jan de Mooij 2017-10-14 14:22:15 +02:00
parent cb26ec367c
commit ffe7770ccf

View File

@ -67,9 +67,6 @@ EnterJit(JSContext* cx, RunState& state, uint8_t* code)
} else {
numActualArgs = 0;
constructing = false;
envChain = state.asExecute()->environmentChain();
calleeToken = CalleeToToken(script);
if (script->isDirectEvalInFunction()) {
if (state.asExecute()->newTarget().isNull()) {
ScriptFrameIter iter(cx);
@ -81,6 +78,8 @@ EnterJit(JSContext* cx, RunState& state, uint8_t* code)
maxArgc = 0;
maxArgv = nullptr;
}
envChain = state.asExecute()->environmentChain();
calleeToken = CalleeToToken(state.script());
}
// Caller must construct |this| before invoking the function. Legacy