Closed Bug 1211751 Opened 5 years ago Closed 5 years ago

Remove nsIChannelEventSink-forwarding from EventSource and FetchDriver

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: sicking, Assigned: sicking)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch channelsink (obsolete) — Splinter Review
Our XHR code has to jump through a bunch of hoops in order to forward the nsIChannelEventSink and the AsyncOnChannelRedirect function to notification-callbacks registered on the channel.

But the reason that it has to do that is because we expose the channel object to addons and chrome code before we register our own notification-callbacks. That means that addons/chrome code might have registered a notification callback which we need to make sure is still called.

However neither EventSource nor FetchDriver exposes the channel object to external code. So neither of these classes have to worry about notification callbacks being already registered.

So both these classes can simply handle the AsyncOnChannelRedirect function directly and not worry about calling any other nsIChannelEventSink implementations.
Attachment #8670063 - Flags: review?(bugs)
Comment on attachment 8670063 [details] [diff] [review]
channelsink

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

This seems to break FetchDriver
Attachment #8670063 - Flags: review?(bugs)
Assignee: nobody → jonas
Status: NEW → ASSIGNED
Attached patch Patch to fixSplinter Review
FetchDriver was just missing the call to OnRedirectVerifyCallback. Everything else is unchanged.
Attachment #8670133 - Flags: review?(bugs)
Attachment #8670133 - Flags: review?(bugs) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/571d943ef5fffb60d6e6144e63a178adaf644576
Bug 1211751:  Remove nsIChannelEventSink-forwarding from EventSource and FetchDriver. It's never needed. r=smaug
https://hg.mozilla.org/mozilla-central/rev/571d943ef5ff
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.