Investigate HttpChannelChild missing LOAD_BACKGROUND flag
Categories
(Core :: Networking: HTTP, defect, P3)
Tracking
()
People
(Reporter: valentin, Unassigned)
References
Details
(Whiteboard: [necko-priority-new])
Reporter | ||
Comment 1•10 years ago
|
||
Comment 2•10 years ago
|
||
Reporter | ||
Comment 3•10 years ago
|
||
Comment 4•10 years ago
|
||
Comment 5•10 years ago
|
||
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
Comment 8•10 years ago
|
||
Reporter | ||
Comment 9•10 years ago
|
||
Comment 10•10 years ago
|
||
Comment 11•10 years ago
|
||
![]() |
||
Comment 12•10 years ago
|
||
Comment 13•10 years ago
|
||
Reporter | ||
Comment 14•10 years ago
|
||
Reporter | ||
Comment 17•9 years ago
|
||
Comment 18•8 years ago
|
||
Comment 19•7 years ago
|
||
Comment 20•7 years ago
|
||
Reporter | ||
Comment 21•5 years ago
|
||
Not actively working on this.
Comment 22•1 year ago
|
||
valentin - did you have a patch for this? Sounded like you did in comment 14, but there's nothing here on the bug.
Is it still relevant?
Reporter | ||
Comment 23•1 year ago
|
||
I see I had a patch in https://hg.mozilla.org/try/rev/def0aaa4126e584a9ec27497ff3bc2e7480d12f1
But the assertion and comments mentioned in comment 0 no longer exist, so I believe this isn't a problem anymore?
We still don't properly sync the LOAD_BACKGROUND flag between parent and child, but I think that's probably not an issue.
nsHttpChannel always sends the notification:
if (!(mLoadFlags & LOAD_BACKGROUND)) {
mProgressSink->OnStatus(this, status, NS_ConvertUTF8toUTF16(host).get());
} else {
nsCOMPtr<nsIParentChannel> parentChannel;
NS_QueryNotificationCallbacks(this, parentChannel);
// If the event sink is |HttpChannelParent|, we have to send status
// events to it even if LOAD_BACKGROUND is set. |HttpChannelParent|
// needs to be aware of whether the status is
// |NS_NET_STATUS_RECEIVING_FROM| or |NS_NET_STATUS_READING|.
// LOAD_BACKGROUND is checked again in |HttpChannelChild|, so the final
// consumer won't get this event.
if (SameCOMIdentity(parentChannel, mProgressSink)) {
mProgressSink->OnStatus(this, status,
NS_ConvertUTF8toUTF16(host).get());
}
While HttpChannelChild checks it when needed:
https://searchfox.org/mozilla-central/rev/f967675ec87bb200b5b911b6fd0fb8c1e06c5167/netwerk/protocol/http/HttpChannelChild.cpp#766-771
!(mLoadFlags & LOAD_BACKGROUND)) {
nsAutoCString host;
mURI->GetHost(host);
mProgressSink->OnStatus(aRequest, status,
NS_ConvertUTF8toUTF16(host).get());
}
Since the flag affects the listeners of the channel, and it's set by them, if it gets set in the parent, it doesn't affect the child anyway.
If it gets set in the child after asyncOpen, it only affects the listeners in the child process, so it's fine if it doesn't get synced to the parent.
I think it's fine to close this one as WORKSFORME.
Description
•