diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/debug/Frame-eval-05.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/debug/Frame-eval-05.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,14 @@ +// var declarations in strict frame.eval do not modify the frame + +var g = newGlobal(); +var dbg = new Debugger(g); +var cv; +dbg.onDebuggerStatement = function (frame) { + cv = frame.eval("'use strict'; var a = 2; h();"); +}; +g.a = 1; +g.eval("function f(s) { function h() { return a; } eval(s); debugger; } "); +g.eval("f('0');"); +assertEq(cv.return, 1); +g.eval("f('var a = 3;');"); +assertEq(cv.return, 3);