gecko-dev/netwerk
Junior Hsu ebecc62699 Bug 1633935 - P13 Avoid ODA message being processed when the channel is already failed, r=mayhemer,kershaw,necko-reviewers
One line fix with a bunch of explanation.

When we perform networking on the socket process, OnDataAvailable could be sent directly from socket process to child process.
Therefore, it could be racy with OnStartRequest which is from parent process to child process by nature.

This patch is to resolve the failure (cancel) by parent process.
For example, https://searchfox.org/mozilla-central/rev/027893497316897b8f292bde48dbb6da2391a331/netwerk/protocol/http/nsHttpChannel.cpp#2713

Bug 1641496 introduce a status check to avoid ODA message being process
[2] https://searchfox.org/mozilla-central/rev/027893497316897b8f292bde48dbb6da2391a331/netwerk/protocol/http/HttpBackgroundChannelChild.cpp#163-171

It prevents putting ODA to the channel event queue in child process.

However, this is based on that `OnStartRequest` already finished excution, which is usually true if OnStartRequest is sent via PHttpChannel.
https://searchfox.org/mozilla-central/rev/027893497316897b8f292bde48dbb6da2391a331/netwerk/protocol/http/HttpChannelChild.cpp#417-422
ChannelEventQueue::RunOrEnque simply runs the OnStartRequest given there on the same thread and the queue is empty, since no blocking events from different thread are before OnStartRequest.

Now we are moving the next chapter. OnStartRequest is queued given we want to switch thread.
The failure status, which is initiated in parent process, is set in HttpChannelChild::OnStartRequest which could be later than the status check [2]

Therefore, we need another check to prevent ODA, which is already in the event queue, being processed.
We intentionally keep [2] for performance.

Differential Revision: https://phabricator.services.mozilla.com/D79771
2020-06-23 17:02:55 +00:00
..
base Bug 1590762 - Part 2: Bump the id for channel registration to uint64_t. r=mattwoodrow,necko-reviewers,valentin 2020-06-23 13:18:56 +00:00
build Bug 1539819 - P3: Some adjustments to make TRRServiceChannel work on socket process r=dragana,necko-reviewers 2020-05-18 20:18:08 +00:00
cache Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj 2020-06-23 05:05:36 +00:00
cache2 Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj 2020-06-23 05:05:36 +00:00
cookie Bug 1642971 - Do not allow cookies for FTP channels, r=mayhemer 2020-06-16 12:26:34 +00:00
dns Bug 1637648 - P5: Create mConfirmer when network.trr.confirmationNS is changed r=valentin 2020-06-23 11:11:49 +00:00
ipc Bug 1590762 - Part 2: Bump the id for channel registration to uint64_t. r=mattwoodrow,necko-reviewers,valentin 2020-06-23 13:18:56 +00:00
locales Bug 1644863 - fix trailing whitespace and windows line endings in locale files, r=fluent-reviewers,flod,Pike 2020-06-17 22:46:22 +00:00
mime Bug 1515419 - fixing ToNewCString (and ToNewUnicode as well) xpcom/string/nsReadableUtils.cpp r=froydnj,necko-reviewers,valentin 2020-05-17 06:58:48 +00:00
protocol Bug 1633935 - P13 Avoid ODA message being processed when the channel is already failed, r=mayhemer,kershaw,necko-reviewers 2020-06-23 17:02:55 +00:00
sctp Backed out changeset 5614bcd268d1 (bug 1337953) for bustage at FuzzyLayer.cpp. CLOSED TREE 2020-06-23 11:01:37 +03:00
socket Bug 1647769 - Update to Neqo 0.4.4 r=dragana,necko-reviewers 2020-06-23 18:51:19 +00:00
srtp Bug 1624128 - Update CK_GCM_PARAMS uses for PKCS11 v3.0 definition r=keeler 2020-04-14 18:32:19 +00:00
streamconv Backed out changeset 5614bcd268d1 (bug 1337953) for bustage at FuzzyLayer.cpp. CLOSED TREE 2020-06-23 11:01:37 +03:00
system Bug 1637947 - network ID: link status isn't updated in NetlinkService::OnAddrMessage() r=necko-reviewers,valentin 2020-05-21 16:55:42 +00:00
test Bug 1647769 - Update to Neqo 0.4.4 r=dragana,necko-reviewers 2020-06-23 18:51:19 +00:00
url-classifier Bug 1647133 - P2. Make nsIURIClassifier take a nsISerialEventTarget. r=gcp 2020-06-22 14:46:01 +00:00
wifi
moz.build Bug 1623593 - Get rid of NECKO_COOKIES compilation flag, r=mayhemer 2020-03-24 16:30:03 +00:00