summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Frame-eval-10.js
blob: ad4a3dac7b546989d8521a0ee3639d2ce0776854 (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();
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);