mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1098947 - Fix scope unwinding bug when closing a legacy generator. r=shu
This commit is contained in:
parent
2bc3fddde6
commit
05fae492cf
11
js/src/jit-test/tests/generators/bug1098947.js
Normal file
11
js/src/jit-test/tests/generators/bug1098947.js
Normal file
@ -0,0 +1,11 @@
|
||||
function f() {
|
||||
try {
|
||||
let foo = 3;
|
||||
for (var i=0; i<50; i++)
|
||||
yield i + foo;
|
||||
} catch(e) {}
|
||||
}
|
||||
var it = f();
|
||||
for (var i=0; i<40; i++)
|
||||
it.next();
|
||||
it.close();
|
@ -544,8 +544,11 @@ HandleClosingGeneratorReturn(JSContext *cx, const JitFrameIterator &frame, jsbyt
|
||||
cx->clearPendingException();
|
||||
frame.baselineFrame()->setReturnValue(UndefinedValue());
|
||||
|
||||
if (frame.baselineFrame()->isDebuggee() && unwoundScopeToPc)
|
||||
frame.baselineFrame()->setUnwoundScopeOverridePc(unwoundScopeToPc);
|
||||
if (unwoundScopeToPc) {
|
||||
if (frame.baselineFrame()->isDebuggee())
|
||||
frame.baselineFrame()->setUnwoundScopeOverridePc(unwoundScopeToPc);
|
||||
pc = unwoundScopeToPc;
|
||||
}
|
||||
|
||||
ForcedReturn(cx, frame, pc, rfe, calledDebugEpilogue);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user