diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/debug/Environment-getVariable-06.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/debug/Environment-getVariable-06.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,12 @@ +// getVariable sees properties inherited from the global object's prototype chain. + +var g = newGlobal(); +var dbg = Debugger(g); +var log = ''; +dbg.onDebuggerStatement = function (frame) { + log += frame.environment.getVariable("x") + frame.environment.getVariable("y"); +}; +g.eval("Object.getPrototypeOf(this).x = 'a';\n" + + "Object.prototype.y = 'b';\n" + + "debugger;\n"); +assertEq(log, 'ab');