summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/onDebuggerStatement-04.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/jit-test/tests/debug/onDebuggerStatement-04.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/onDebuggerStatement-04.js b/js/src/jit-test/tests/debug/onDebuggerStatement-04.js
new file mode 100644
index 0000000000..306f7919e5
--- /dev/null
+++ b/js/src/jit-test/tests/debug/onDebuggerStatement-04.js
@@ -0,0 +1,10 @@
+var g = newGlobal({newCompartment: true});
+var dbg = new Debugger(g);
+dbg.onDebuggerStatement = function (frame) {
+ var code = "assertEq(c, 'ok');\n";
+ assertEq(frame.evalWithBindings("eval(s)", {s: code, a: 1234}).return, undefined);
+};
+g.eval("function first() { return second(); }");
+g.eval("function second() { return eval('third()'); }");
+g.eval("function third() { debugger; }");
+g.evaluate("first();");