summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/bug1368736.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/debug/bug1368736.js')
-rw-r--r--js/src/jit-test/tests/debug/bug1368736.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/bug1368736.js b/js/src/jit-test/tests/debug/bug1368736.js
new file mode 100644
index 0000000000..e61a202ccb
--- /dev/null
+++ b/js/src/jit-test/tests/debug/bug1368736.js
@@ -0,0 +1,19 @@
+g = newGlobal({newCompartment: true});
+hits = 0;
+Debugger(g).onDebuggerStatement = function(frame) {
+ // Set a breakpoint at the JSOP_AFTERYIELD op.
+ frame.script.setBreakpoint(117, {hit: function() { hits++; }});
+}
+g.eval(`
+function* range() {
+ eval("");
+ debugger;
+ for (var i = 0; i < 3; i++) {
+ yield i;
+ }
+}
+var iter = range();
+for (var i = 0; i < 3; i++)
+ assertEq(iter.next().value, i);
+`);
+assertEq(hits, 2);