Closed Bug 1207850 Opened 4 years ago Closed 4 years ago

FetchBody::ContinueConsumeBody called twice

Categories

(Core :: DOM: Service Workers, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: catalinb, Assigned: catalinb)

Details

Attachments

(1 file)

If the service worker is shutting down we run into a wierd case where we try to cancel the pump twice.

https://pastebin.mozilla.org/8847298
Assignee: nobody → catalin.badea392
Status: NEW → ASSIGNED
Comment on attachment 8665187 [details] [diff] [review]
Temporary fix for canceling the pump used by FetchBody.  r?nsm

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

::: dom/fetch/Fetch.cpp
@@ +1142,5 @@
>  
>    bool Notify(JSContext* aCx, workers::Status aStatus) override
>    {
>      MOZ_ASSERT(aStatus > workers::Running);
> +    if (!mWasNotified) {

Could you also change this to aStatus > Canceling?
Ideally this should never be called twice since the call to ContinueConsumeBody should remove the feature, but I can see how having that blocking runnable in ContinueConsumeBody may lead to this being called twice.
Attachment #8665187 - Flags: review?(nsm.nikhil) → review+
Flags: needinfo?(catalin.badea392)
https://hg.mozilla.org/mozilla-central/rev/00d99c936b39
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.