summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/onDebuggerStatement-03.js
blob: 0a5525efe86e0d49afe88c178aef2b3cf563b00a (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();
var calls = 0;

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

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