nativemulti.js (431B)
1 /* Recompilation that requires patching the same native stub multiple times. */ 2 3 var first = 0; 4 var second = 0; 5 6 function foreachweird(a, f, vfirst, vsecond) 7 { 8 a.forEach(f); 9 assertEq(first, vfirst); 10 assertEq(second, vsecond); 11 } 12 13 function weird() { 14 eval("first = 'one';"); 15 eval("second = 'two';"); 16 } 17 18 foreachweird([0], function() {}, 0, 0); 19 foreachweird([0], function() {}, 0, 0); 20 foreachweird([0], weird, 'one', 'two');