summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/onDebuggerStatement-03.js
blob: 53509524771e3cc28e8e50645d180da86451d194 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// A debugger statement in an onDebuggerStatement hook should not reenter.

var g = newGlobal({newCompartment: true});
var calls = 0;

var dbg = Debugger(g);
dbg.onDebuggerStatement = function (stack) {
    calls++;
    debugger;
};

assertEq(g.eval("debugger; 7;"), 7);
assertEq(calls, 1);