Closed Bug 1173139 Opened 9 years ago Closed 9 years ago

Don't create the worker global until we know the final principal

Categories

(Core :: DOM: Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: bent.mozilla, Assigned: bent.mozilla)

Details

Attachments

(1 file)

Attached patch Patch, v1Splinter Review
Creating the global before we know the final principal could let us define inappropriate bindings if we ever decide to let system-principal callers create non-system-principal workers. This patch moves the global creation later.
Attachment #8617601 - Flags: review?(khuey)
Comment on attachment 8617601 [details] [diff] [review]
Patch, v1

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

::: dom/workers/WorkerPrivate.h
@@ +696,5 @@
>    void
>    CopyJSCompartmentOptions(JS::CompartmentOptions& aOptions)
>    {
>      mozilla::MutexAutoLock lock(mMutex);
> +    aOptions = UsesSystemPrincipal() ? mJSSettings.chrome.compartmentOptions

After thinking about this more I'm convinced the current code is better, so I'm not going to land this part.
https://hg.mozilla.org/mozilla-central/rev/49480f1c4071
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: