Right, i believe that too. However in this particular case, the piece of code that's being incorrectly optimized has caused an exception due to reference error.
The script on issue 430528 <https://code.google.com/p/chromium/issues/detail?id=430528> invokes a function 'aelrt' (misspelled) on the click listener of a button. The 'error' callback on window prints the file and line no of error. After about 69 clicks (on my env - 64 bit Ubuntu 14.04 running blink release mode), the line number defaults to 0 in the error callback because there was a reference error caused during execution of the built-in GetLineNumber function. What causes the reference error of GetLineNumber is the fact that, round about the 67th or 68th click, the runtime profiler tried to optimize 'aelrt' - which itself had caused a reference error during execution. This somehow manages to mess the reference of GetLineNumber for the rest of the script's life. Ideally, i'd like mark to functions causing reference errors as non-optimizable (such as aerlt is this case), but i dont know the right place. Maybe Yang can throw some light? Best regards, Ankur On Saturday, 25 April 2015 21:24:50 UTC+5:30, Jakob Kummerow wrote: > > No, preventing optimization of functions that throw is definitely not the > right approach. > > I haven't looked at the situation in more detail though, so I don't know > what the problem is and how to fix it. Yang (+CC) might know more. > > > On Sat, Apr 25, 2015 at 5:45 AM, Ankur Verma <[email protected] > <javascript:>> wrote: > >> Hello, >> Pls have a look at this issue for details: >> http://code.google.com/p/chromium/issues/detail?id=430528 >> >> On analysis of the issue, the problem appears when the runtime profiler >> tries to optimize a function which had actually thrown an exception during >> execution. This messes the reference for built-in function GetLineNumber >> thus causing the bug. >> A simple solution I have is to mark the functions which caused an >> exception during execution as non-optimizable. This works with all tests >> passing. But I am fairly new to V8 and would this like to know if this is a >> correct approach or not. I would like to submit a patch if this seems >> sensible. >> Thanks, >> Ankur >> >> -- >> -- >> v8-dev mailing list >> [email protected] <javascript:> >> http://groups.google.com/group/v8-dev >> --- >> You received this message because you are subscribed to the Google Groups >> "v8-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
