Created attachment 8758751 [details] [diff] [review] Patch Here's a patch. It was pretty straight-forward for the most part. I made one minor improvement: warnings now have "PAC Execution Warning" prefix instead of "PAC Execution Error". I manually verified errors and warnings still appear in the browser console as before.
Comment on attachment 8758751 [details] [diff] [review] Patch >+ JS::ContextOptionsRef(mContext).setDontReportUncaught(true); Not needed: all the places that check that option also check autoJSAPIOwnsErrorReporting. > nsresult Init() While you're here, can you change the JS_InitStandardClasses callsite to check the return value? Also, don't you need to put the AutoPACErrorReporter before the JS_NewGlobalObject call? I'd expect that JS_NewGlobalObject can throw OOM... Alternately, we could just JS_ClearPendingException if JS_NewGlobalObject fails. That might be simpler, because it's not clear what AutoPACErrorReporter would do if we're in the null compartment. > ProxyAutoConfig::GC Do you really need AutoPACErrorReporter here? JS_MaybeGC can't exactly throw or report an exception. r=me with the above fixed.
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/c6667fa95dff Convert PAC runtime to autoJSAPIOwnsErrorReporting. r=bz
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox49: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.