summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/onDebuggerStatement-03.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/debug/onDebuggerStatement-03.js')
-rw-r--r--js/src/jit-test/tests/debug/onDebuggerStatement-03.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/onDebuggerStatement-03.js b/js/src/jit-test/tests/debug/onDebuggerStatement-03.js
new file mode 100644
index 000000000..0a5525efe
--- /dev/null
+++ b/js/src/jit-test/tests/debug/onDebuggerStatement-03.js
@@ -0,0 +1,13 @@
+// A debugger statement in an onDebuggerStatement hook should not reenter.
+
+var g = newGlobal();
+var calls = 0;
+
+var dbg = Debugger(g);
+dbg.onDebuggerStatement = function (stack) {
+ calls++;
+ debugger;
+};
+
+assertEq(g.eval("debugger; 7;"), 7);
+assertEq(calls, 1);