Allow SharedWorkers to be controlled by ServiceWorkers.

RESOLVED FIXED in Firefox 40

Status

()

RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: nsm, Assigned: Ehsan)

Tracking

33 Branch
mozilla40
x86_64
Linux
Points:
---

Firefox Tracking Flags

(firefox40 fixed)

Details

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Comment 1

3 years ago
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.
(Assignee)

Updated

3 years ago
No longer blocks: 1131322
(Assignee)

Comment 2

3 years ago
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.
(Assignee)

Comment 3

3 years ago
Created attachment 8585199 [details] [diff] [review]
Enable SharedWorker loads to be intercepted through service workers

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
Last Resolved: 3 years ago
status-firefox40: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.