Closed Bug 1248719 Opened 9 years ago Closed 9 years ago

Taking ownership of error reporting on an AutoJSAPI inited without a global on a worker is not ok

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

AutoJSAPI::Init() with no args calls InitInternal() with a null aGlobal, which puts mAutoNullableCompartment in the null compartment.  Then in AutoJSAPI::ReportException we would end up hitting this code:

509   JS::Rooted<JSObject*> errorGlobal(cx(), JS::CurrentGlobalOrNull(cx()));
510   if (!errorGlobal)
511     errorGlobal = xpc::PrivilegedJunkScope();

which is clearly not OK on a worker.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #8719929 - Flags: review?(bobbyholley) → review+
https://hg.mozilla.org/mozilla-central/rev/f515b1ee11e2
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
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: