mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 752379 - ContextStack::pushExecuteFrame should read the most recent 'fp' (r=bhackett)
--HG-- extra : rebase_source : 1b615fbb8bebab0bf5acd859a70b34ae405347a6
This commit is contained in:
parent
d40c032d4c
commit
169c45f7b8
10
js/src/jit-test/tests/basic/testBug752379.js
Normal file
10
js/src/jit-test/tests/basic/testBug752379.js
Normal file
@ -0,0 +1,10 @@
|
||||
var lfcode = new Array();
|
||||
lfcode.push("");
|
||||
lfcode.push("print('hi');");
|
||||
while (true) {
|
||||
var file = lfcode.shift(); if (file == undefined) { break; }
|
||||
loadFile(file);
|
||||
}
|
||||
function loadFile(lfVarx) {
|
||||
evaluate(lfVarx);
|
||||
}
|
@ -807,7 +807,6 @@ ContextStack::pushExecuteFrame(JSContext *cx, JSScript *script, const Value &thi
|
||||
* below.
|
||||
*/
|
||||
CallArgsList *evalInFrameCalls = NULL; /* quell overwarning */
|
||||
StackFrame *prev;
|
||||
MaybeExtend extend;
|
||||
if (evalInFrame) {
|
||||
/* Though the prev-frame is given, need to search for prev-call. */
|
||||
@ -815,10 +814,8 @@ ContextStack::pushExecuteFrame(JSContext *cx, JSScript *script, const Value &thi
|
||||
while (!iter.isScript() || iter.fp() != evalInFrame)
|
||||
++iter;
|
||||
evalInFrameCalls = iter.calls_;
|
||||
prev = evalInFrame;
|
||||
extend = CANT_EXTEND;
|
||||
} else {
|
||||
prev = maybefp();
|
||||
extend = CAN_EXTEND;
|
||||
}
|
||||
|
||||
@ -827,6 +824,7 @@ ContextStack::pushExecuteFrame(JSContext *cx, JSScript *script, const Value &thi
|
||||
if (!firstUnused)
|
||||
return NULL;
|
||||
|
||||
StackFrame *prev = evalInFrame ? evalInFrame : maybefp();
|
||||
StackFrame *fp = reinterpret_cast<StackFrame *>(firstUnused + 2);
|
||||
fp->initExecuteFrame(script, prev, seg_->maybeRegs(), thisv, scopeChain, type);
|
||||
SetValueRangeToUndefined(fp->slots(), script->nfixed);
|
||||
|
Loading…
Reference in New Issue
Block a user