summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/onExceptionUnwind-08.js
blob: 0c2752ee217d68d289d2c0ee96fd92e5d0859855 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Ensure that ScriptDebugEpilogue gets called when onExceptionUnwind
// throws an uncaught exception.
var g = newGlobal();
var dbg = Debugger(g);
var frame;
dbg.onExceptionUnwind = function (f, x) {
    frame = f;
    assertEq(frame.live, true);
    throw 'unhandled';
};
dbg.onDebuggerStatement = function(f) {
    assertEq(f.eval('throw 42'), null);
    assertEq(frame.live, false);
};
g.eval('debugger');

// Don't fail just because we reported an uncaught exception.
quit(0);