js/src/jit-test/tests/closures/name-both-hvy.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial