Closed
Bug 1147695
Opened 10 years ago
Closed 10 years ago
Enable interception of beacons through service workers
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file)
7.14 KB,
patch
|
nsm
:
review+
|
Details | Diff | Splinter Review |
Currently when sending a beacon, HttpBaseChannel::ShouldIntercept tries to get access to the nsINetworkInterceptController interface through the channel's notification callbacks, but in this case the notification callback is the nsCORSListenerProxy object (thanks to nsCORSListenerProxy::Init).
nsCORSListenerProxy already knows how to forward calls to nsIInterfaceRequestor::GetInterface to mOuterNotificationCallbacks, and ShouldIntercept calls GetInterfce. But mOuterNotificationCallbacks is set by default to the callbacks of the channel at the time nsCORSListenerProxy is called, and the callbacks on this channel is intentionally null, so ShouldIntercept bails out and the beacon never gets intercepted.
I'm planning to extend nsCORSListenerProxy to make it aware of nsINetworkInterceptController, and have it route the request for nsINetworkInterceptController correctly to the docshell without the need to mess with the notification callbacks.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → ehsan
Assignee | ||
Comment 1•10 years ago
|
||
Currently when sending a beacon, HttpBaseChannel::ShouldIntercept tries
to get access to the nsINetworkInterceptController interface through the
channel's notification callbacks, but in this case the notification
callback is the nsCORSListenerProxy object (thanks to
nsCORSListenerProxy::Init).
nsCORSListenerProxy already knows how to forward calls to
nsIInterfaceRequestor::GetInterface to mOuterNotificationCallbacks, and
ShouldIntercept calls GetInterfce. But mOuterNotificationCallbacks is
set by default to the callbacks of the channel at the time
nsCORSListenerProxy is called, and the callbacks on this channel is
intentionally null, so ShouldIntercept bails out and the beacon never
gets intercepted.
This patch extends nsCORSListenerProxy to make it aware of
nsINetworkInterceptController, and have it route the request for
nsINetworkInterceptController correctly to the docshell without the need
to mess with the notification callbacks.
This will be tested in bug 1147699.
Attachment #8583515 -
Flags: review?(nsm.nikhil)
Attachment #8583515 -
Flags: review?(nsm.nikhil) → review+
Assignee | ||
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•