On Thu, Dec 18, 2014 at 4:34 PM, Gergo Tisza gtisza@wikimedia.org wrote:
I am experimenting with catching Javascript errors with raven.js [1] (see the JS error logging RfC [2] for background; see T1345 [3] for a prototype for JS error logging). For various reasons, Javascript does not have a reliable way to install a global exception handler like e.g. PHP does with set_exception_handler(), so the standard way of doing this is to wrap modules into a try-catch block.
Chrome's profiling tools continue to flag try / catch blocks because they are ineligible for certain types of optimizations. We've discussed it before on this list, but I don't think we ever quantified the performance penalty (or even confirmed its existence), but I think that doing so should probably be a prerequisite to this change.