summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/onExceptionUnwind-07.js
blob: 53d41c2984ca417f7d08113b0b94da3d69774a9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Unwinding due to uncatchable errors does not trigger onExceptionUnwind.

var g = newGlobal();
var dbg = Debugger(g);
var hits = 0;
dbg.onExceptionUnwind = function (frame, value) { hits = 'BAD'; };
dbg.onDebuggerStatement = function (frame) {
    if (hits++ === 0)
        assertEq(frame.eval("debugger;"), null);
    else
        return null;
}

assertEq(g.eval("debugger; 2"), 2);
assertEq(hits, 2);