1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
actual = ''; expected = ''; // do not crash function q() { } function f() { var j = 12; function g() { eval(""); // makes |g| heavyweight for (var i = 0; i < 3; ++i) { j; } } j = 13; q(g); // escaping |g| makes |f| heavyweight g(); j = 14; } f(); assertEq(actual, expected)