summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/bug1161332.js
blob: 2b8f371495b90d4eda72d07a31093ded90b79c39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// |jit-test| error: Error

var g = newGlobal();
g.eval('function f(a) { if (a == 1) debugger; evaluate("f(" + a + " - 1);"); }');
var N = 2;
var dbg = new Debugger(g);
var frames = [];
dbg.onEnterFrame = function (frame) {
   frames.push(frame);
   frame.onPop = function () { assertEq(frame.onPop, frame.onPop); };
};
dbg.onDebuggerStatement = function (frame) {
    for (var f of frames)
        f.eval('a').return;
};
evaluate("g.f(N);");