summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-makeDebuggeeValue-02.js
blob: 23c493ea431e6708668b30d3ce4d774cb8701878 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Debugger.Object.prototype.makeDebuggeeValue returns the object wrapped
// the same way as Debugger.Frame.prototype.eval, etc.
var g = newGlobal({newCompartment: true});
g.eval("function f() { debugger; }");
var dbg = Debugger();
var gw = dbg.addDebuggee(g);
var jsonw;
dbg.onDebuggerStatement = function (frame) {
    jsonw = frame.eval("JSON").return;
};
g.eval("debugger;");
assertEq(gw.makeDebuggeeValue(g.JSON), jsonw);