blob: 23dcdc5fe87fd95399c316bf86b582f2e769ed25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// The value returned by getVariable can be a Debugger.Object.
var g = newGlobal({newCompartment: true});
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
var hits = 0;
dbg.onDebuggerStatement = function (frame) {
var a = frame.environment.parent.getVariable('Math');
assertEq(a instanceof Debugger.Object, true);
var b = gw.getOwnPropertyDescriptor('Math').value;
assertEq(a, b);
hits++;
};
g.eval("debugger;");
assertEq(hits, 1);
|