summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-02.js
blob: b5111cb8bd166d6a64f4cc6a1a335ce96e9c5dce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Debugger.Object referents can be transparent wrappers of objects in the debugger compartment.

var g = newGlobal({newCompartment: true});
g.f = function (a, b) { return a + "/" + b; };
var dbg = Debugger(g);
var hits = 0;
dbg.onDebuggerStatement = function (frame) {
    var f = frame.eval("f").return;
    assertEq(f.call(null, "a", "b").return, "a/b");
    hits++;
};
g.eval("debugger;");
assertEq(hits, 1);