Closed Bug 1465580 Opened 6 years ago Closed 6 years ago

report channel failure back to child correctly when parent-side SW interception occurs

Categories

(Core :: DOM: Service Workers, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: bkelly, Assigned: bkelly)

References

Details

Attachments

(1 file)

There is a silly bug in HttpChannelParent when parent interception is enabled.  Currently we only get the parent-side channel status for nsHttpChannel, but not InterceptedHttpChannel:

https://searchfox.org/mozilla-central/rev/5a744713370ec47969595e369fd5125f123e6d24/netwerk/protocol/http/HttpChannelParent.cpp#1427

This needs to apply to both types of channels in order to reflect failed loads back to the child process correctly.
Honza, this is pretty straightforward.  In bug 1391693 I made HttpChannelParent support underlying channels that extend HttpBaseChannel instead of requiring an exact nsHttpChannel.  This allows it to operate on InterceptedHttpChannel objects.  I made a mistake, though, and made the code only get the underlying channel status for nsHttpChannels.

This patch just moves the channel status getter out of the conditional block so it applies whenever we have an HttpBaseChannel.  This is necessary for the child process to see failures from an InterceptedHttpChannel.
Attachment #8982005 - Flags: review?(honzab.moz)
Blocks: 1391693
Priority: -- → P2
Attachment #8982005 - Flags: review?(honzab.moz) → review+
Pushed by bkelly@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7f4eeef07a85
Make HttpChannelParent get the channel status when its underlying channel is an InterceptedHttpChannel. r=mayhemer
https://hg.mozilla.org/mozilla-central/rev/7f4eeef07a85
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: