summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-makeDebuggeeValue-02.js
blob: ef3e099b8f0b5fb5c5af68c5f82182121902586f (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();
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);