1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/debug/Environment-getVariable-04.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,12 @@ 1.4 +// getVariable sees variables in function scopes added by non-strict direct eval. 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 + 1.13 +g.eval("function f(s) { eval(s); debugger; }"); 1.14 +g.f("var x = 'Q';"); 1.15 +assertEq(v, 'Q');