summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/onDebuggerStatement-04.js
blob: 1bdaa65de115316cfacdaadf5584735eaa54d3cf (plain)
1
2
3
4
5
6
7
8
9
10
var g = newGlobal();
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();");