1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/debug/Environment-getVariable-08.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,10 @@ 1.4 +// getVariable sees properties inherited from a with-object's prototype chain. 1.5 + 1.6 +var g = newGlobal(); 1.7 +var dbg = Debugger(g); 1.8 +var v; 1.9 +dbg.onDebuggerStatement = function (frame) { 1.10 + v = frame.environment.getVariable("x"); 1.11 +}; 1.12 +g.eval("var x = 1; { let x = 2; with (Object.create({x: 3})) { debugger; } }"); 1.13 +assertEq(v, 3);