blob: 22875cb0b3999c4f064183b18ebe2c7d825e8530 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// getVariable sees variables in function scopes added by non-strict direct eval.
var g = newGlobal();
var dbg = Debugger(g);
var v;
dbg.onDebuggerStatement = function (frame) {
v = frame.environment.getVariable("x");
};
g.eval("function f(s) { eval(s); debugger; }");
g.f("var x = 'Q';");
assertEq(v, 'Q');
|