Closed Bug 1131323 Opened 9 years ago Closed 9 years ago

Allow SharedWorkers to be controlled by ServiceWorkers.

Categories

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

33 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: nsm, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

Workers can already be intercepted just fine.
Assignee: nobody → ehsan
Blocks: 1121157
Summary: Allow Workers and SharedWorkers to be controlled by ServiceWorkers. → Allow SharedWorkers to be controlled by ServiceWorkers.
No longer blocks: ServiceWorkers-B2G
The reason this works correctly for Workers is that they use the document load group, which is the docshell, so they can successfully get an nsINetworkInterceptController out of it.  But when creating a SharedWorker, we override the loadgroup with an InterfaceRequestor object that gets the load context from the loadgroup argument but doesn't hold on to it in any other way, so by the time that it is asked for an nsINetworkInterceptController, it cannot succeed.  The fix is simple.

And of course, serviceworkers cannot be intercepted as per spec.
SharedWorker's interface requestor needs to know how to forward requests
for nsINetworkInterceptController to the docshell.

This will be tested in bug 1148935.
Attachment #8585199 - Flags: review?(nsm.nikhil)
Attachment #8585199 - Flags: review?(nsm.nikhil) → review+
https://hg.mozilla.org/mozilla-central/rev/636e2bc5ccdf
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
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: