blob: 7605aefd58371af50b2c27f84fb579471309c21f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// frame.eval returns null if the eval code fails with an uncatchable error.
var g = newGlobal({newCompartment: true});
var dbg = Debugger(g);
var hits = 0;
dbg.onDebuggerStatement = function (frame) {
if (hits++ === 0)
assertEq(frame.eval("debugger;"), null);
else
return null;
};
assertEq(g.eval("debugger; 'ok';"), "ok");
assertEq(hits, 2);
|