blob: 44fdf77701ea9b98e5fb97b2ac51ab6b6108b2ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// var declarations in strict frame.eval do not modify the frame
var g = newGlobal({newCompartment: true});
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);
|