bug732847.js (550B)
1 try{} catch (x) {} 2 3 var callStack = []; 4 function currentFunc() { 5 return callStack[0]; 6 } 7 function reportFailure () { 8 var funcName = currentFunc(); 9 // play with the result to cause a SEGV. 10 var prefix = (funcName) ? funcName : ""; 11 // Use OSR to compile the function at the end of the first run. 12 for (var i=0; i < 50; i++) ; 13 } 14 15 callStack[0] = 'test'; 16 // Run and compile with a string as result of currentFunc. 17 reportFailure(); 18 callStack[0] = undefined; 19 // Use previously compiled code with the string assumption. 20 reportFailure();