Closed Bug 1225717 Opened 9 years ago Closed 9 years ago

Make TakeOwnershipOfErrorReporting() actually work on workers

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

Splitting this out of bug 1072144.  It's a prerequisite for that, of course.
Blocks: 1072144
This is slightly spruced up from attachment 8534373 [details] [diff] [review] with better comments and an mIsMainThread member
Attachment #8689086 - Flags: review?(bobbyholley)
Comment on attachment 8689086 [details] [diff] [review]
Make AutoJSAPI::TakeOwnershipOfErrorReporting actually work on workers as long as no one calls JS_ReportPendingException manually

Review of attachment 8689086 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/base/ScriptSettings.cpp
@@ +482,5 @@
>    JSRuntime *rt = JS_GetRuntime(cx());
>    mOldAutoJSAPIOwnsErrorReporting = JS::ContextOptionsRef(cx()).autoJSAPIOwnsErrorReporting();
>    JS::ContextOptionsRef(cx()).setAutoJSAPIOwnsErrorReporting(true);
> +  // Workers have their own error reporting mechanism which deals with warnings
> +  // as well, so don't change the worker error reporter for now.  Once we switch

Can you add a bug number here?
> Can you add a bug number here?

Will do.
Comment on attachment 8689086 [details] [diff] [review]
Make AutoJSAPI::TakeOwnershipOfErrorReporting actually work on workers as long as no one calls JS_ReportPendingException manually

Review of attachment 8689086 [details] [diff] [review]:
-----------------------------------------------------------------

lgtm. Sorry for the lag :-(
Attachment #8689086 - Flags: review?(bobbyholley) → review+
https://hg.mozilla.org/mozilla-central/rev/bf248ceb561b
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: