summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/onExceptionUnwind-10.js
blob: 18f23e57b59794135668889893f252b158d23159 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Ensure that ScriptDebugEpilogue gets called when onExceptionUnwind
// terminates execution.
var g = newGlobal({newCompartment: true});
var dbg = Debugger(g);
var frame;
dbg.onExceptionUnwind = function (f, x) {
    frame = f;
    assertEq(frame.type, 'eval');
    assertEq(frame.onStack, true);
    terminate();
};
dbg.onDebuggerStatement = function(f) {
    assertEq(f.eval('throw 42'), null);
    assertEq(frame.onStack, false);
};
g.eval('debugger');