diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/jaeger/recompile/nativestack.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/jaeger/recompile/nativestack.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,25 @@ + +/* Recompilation that requires patching the same native stub multiple times on one stack. */ + +var first = 0; +var second = 0; + +function eacher(f, vfirst, vsecond) { + var a = [0]; + a.forEach(f); + assertEq(first, vfirst); + assertEq(second, vsecond); +} + +function one() { + eacher(two, 'one', 'two'); +} + +function two() { + eval("first = 'one';"); + eval("second = 'two';"); +} + +eacher(function () {}, 0, 0); +eacher(function () {}, 0, 0); +eacher(one, 'one', 'two');