bug1636306.js (870B)
1 // |jit-test| --no-ion 2 3 oomTest(() => { eval(` 4 function getCallee() { return getCallee.caller; } 5 6 // Use trickery to get a reference to a run-once function. We avoid 7 // expanding the lazy inner functions in this first invocation. 8 let fn = function(x) { 9 if (x) { 10 // Singleton 'inner' 11 let _ = function() { 12 function inner() {} 13 }(); 14 15 // Non-singleton 'inner' 16 for (var i = 0; i < 2; i++) { 17 let _ = function() { 18 function inner() {} 19 }(); 20 } 21 } 22 23 return getCallee(); 24 }(false); 25 26 // Run the lazy functions inside 'fn' this time. Run twice to check 27 // delazification still works after OOM failure. 28 for (var i = 0; i < 2; i++) { 29 try { fn(true); } 30 catch (e) { } 31 } 32 `)});