summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/onExceptionUnwind-04.js
blob: 443499a35e3894b043b6be7d09ec8b25a0581e90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// onExceptionUnwind is not called for exceptions thrown and handled in the debugger.
var g = newGlobal();
var dbg = Debugger(g);
g.log = '';
dbg.onDebuggerStatement = function (frame) {
    try {
        throw new Error("oops");
    } catch (exc) {
        g.log += exc.message;
    }
};
dbg.onExceptionUnwind = function (frame) {
    g.log += 'BAD';
};

g.eval("debugger; log += ' ok';");
assertEq(g.log, 'oops ok');