mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fixed accidentally trying to trace compile a recursive generator (bug 529130, r=gal).
This commit is contained in:
parent
e4ee1ce1bf
commit
20ee309b48
@ -9646,6 +9646,8 @@ IsTraceableRecursion(JSContext *cx)
|
||||
return false;
|
||||
if ((fp->flags & JSFRAME_CONSTRUCTING) || (down->flags & JSFRAME_CONSTRUCTING))
|
||||
return false;
|
||||
if (*fp->script->code != JSOP_TRACE)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
19
js/src/trace-test/tests/basic/bug529130.js
Normal file
19
js/src/trace-test/tests/basic/bug529130.js
Normal file
@ -0,0 +1,19 @@
|
||||
// don't crash
|
||||
|
||||
var q = 30;
|
||||
|
||||
function var_iter(v) {
|
||||
q--;
|
||||
yield v;
|
||||
if (q > 0) {
|
||||
for each (let ret in var_iter(v)) {
|
||||
var_iter(v);
|
||||
yield ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (x in var_iter([1, 2, 3, 4, 5, 6, 7, 8, 9]))
|
||||
print(x);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user