Workers can already be intercepted just fine.
Assignee: nobody → ehsan
Summary: Allow Workers and SharedWorkers to be controlled by ServiceWorkers. → Allow SharedWorkers to be controlled by ServiceWorkers.
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.
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)
3 years ago
Attachment #8585199 - Flags: review?(nsm.nikhil) → review+
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.