diff --git a/js/src/jit-test/tests/basic/testDeepBailInMoreIter.js b/js/src/jit-test/tests/basic/testDeepBailInMoreIter.js new file mode 100644 index 000000000000..3e6b680402e1 --- /dev/null +++ b/js/src/jit-test/tests/basic/testDeepBailInMoreIter.js @@ -0,0 +1,5 @@ +w = (function() { yield })(); +w.next(); +for (var i = 0; i < 100; ++i) { + for (v in w) {} +} diff --git a/js/src/jstracer.cpp b/js/src/jstracer.cpp index 3ba68e2e0e54..944a850ffb75 100644 --- a/js/src/jstracer.cpp +++ b/js/src/jstracer.cpp @@ -14502,12 +14502,11 @@ TraceRecorder::record_JSOP_MOREITER() LIns* vp_ins = w.allocp(sizeof(Value)); LIns* args[] = { vp_ins, iterobj_ins, cx_ins }; - LIns* ok_ins = w.call(&IteratorMore_ci, args); + pendingGuardCondition = w.call(&IteratorMore_ci, args); - pendingGuardCondition = w.eqi0(ok_ins); leaveDeepBailCall(); - cond_ins = w.eqi0(w.eqi0(is_boxed_true(AllocSlotsAddress(vp_ins)))); + cond_ins = is_boxed_true(AllocSlotsAddress(vp_ins)); } stack(0, cond_ins);