summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/onExceptionUnwind-07.js
blob: c34e687d351c0684b4a362b0a8f44a5f7fc5702a (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({newCompartment: true});
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);