summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Frame-onStep-resumption-01.js
blob: 9fe94fb21f535af46096b56976a1f86af8f73428 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// If frame.onStep returns {return:val}, the frame returns.

var g = newGlobal({newCompartment: true});
g.eval("function f(x) {\n" +
       "    var a = x * x;\n" +
       "    return a;\n" +
       "}\n");

var dbg = Debugger(g);
dbg.onEnterFrame = function (frame) {
    frame.onStep = function () { return {return: "pass"}; };
};

assertEq(g.f(4), "pass");