blob: ca77d582a11c3b99a3e841d7ccc21b6f20aeb7e3 (
plain)
1
2
3
4
5
6
7
8
9
10
|
// getVariable sees properties inherited from a with-object's prototype chain.
var g = newGlobal({newCompartment: true});
var dbg = Debugger(g);
var v;
dbg.onDebuggerStatement = function (frame) {
v = frame.environment.getVariable("x");
};
g.eval("var x = 1; { let x = 2; with (Object.create({x: 3})) { debugger; } }");
assertEq(v, 3);
|