blob: 594e8db43580b5a45d94656484feb3967861441f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Test that lazy inner functions inside eval are tagged properly so we don't
// incorrectly do NAME -> GNAME optimization.
var g = newGlobal({newCompartment: true});
var dbg = new Debugger(g);
dbg.onNewScript = function delazify(script, global) {
// Force delazification of inner functions.
script.getChildScripts();
};
g.eval("" + function f() {
var $;
eval('var obj={foo:1}; $=function() { assertEq(obj.foo, 1); }');
return $;
});
g.eval("f()();");
|