Closed Bug 1277267 Opened 9 years ago Closed 9 years ago

Convert PAC code to autoJSAPIOwnsErrorReporting

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

(Whiteboard: [necko-would-take])

Attachments

(1 file)

Attached patch PatchSplinter Review
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.
Attachment #8758751 - Flags: review+
Blocks: 1277278
Pushed by jandemooij@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/c6667fa95dff Convert PAC runtime to autoJSAPIOwnsErrorReporting. r=bz
Whiteboard: [necko-would-take]
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: