diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/basic/testNestedEscapingLambdas.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/basic/testNestedEscapingLambdas.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,31 @@ +function testNestedEscapingLambdas() +{ + try { + return (function() { + var a = [], r = []; + function setTimeout(f, t) { + a.push(f); + } + + function runTimeouts() { + for (var i = 0; i < a.length; i++) + a[i](); + } + + var $foo = "#nothiddendiv"; + setTimeout(function(){ + r.push($foo); + setTimeout(function(){ + r.push($foo); + }, 100); + }, 100); + + runTimeouts(); + + return r.join(""); + })(); + } catch (e) { + return e; + } +} +assertEq(testNestedEscapingLambdas(), "#nothiddendiv#nothiddendiv");