blob: 306c5cc739449dfb85e3f598bed6938e4e017616 (
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();
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);
|