Commit Graph

20517 Commits

Author SHA1 Message Date
Nika Layzell
824c8da580 Bug 1599579 - Part 1: Add the ability to specify a specific BrowsingContextGroup during process switch, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D80254
2020-06-30 16:52:53 +00:00
Junior Hsu
cf2bd325c2 Bug 1646592 - P4 Remove the depedency between OnStartRequestSent and AttachStreamFilter, r=mayhemer,necko-reviewers
We're shorter the name!

Differential Revision: https://phabricator.services.mozilla.com/D81275
2020-06-30 00:35:22 +00:00
Junior Hsu
b5d505b9d7 Bug 1646592 - P3 Sending endpoint of stream filter via PHttpBackgroundChannel, r=mayhemer,necko-reviewers
Endpoint would be passed by a series of std::move via
nsHttpChannel -> HttpChannelParent -> HttpBackgroundChannelParent ---> HttpBackgroundChannelChild -> HttpChannelChild
												|
												|
   Resolve promise after successfully send IPC<-/

Differential Revision: https://phabricator.services.mozilla.com/D81274
2020-06-30 00:35:12 +00:00
Junior Hsu
97eade221b Bug 1646592 - P2 remove NeckoTargetChannelEvent which could not be specialized for HttpChannelChild, r=mayhemer,necko-reviewers
NeckoTargetChannelEvent uses a protected member function, which couldn't compile with instantiation of HttpChannelChild
https://searchfox.org/mozilla-central/rev/cfaa250d14e344834932de4c2eed0061701654da/netwerk/ipc/ChannelEventQueue.h#64

Differential Revision: https://phabricator.services.mozilla.com/D81273
2020-06-30 00:34:54 +00:00
Junior Hsu
2a27443b11 Bug 1646592 - P1 Use nsISerialEventTarget for HttpBackgroundChannelParent, r=valentin,necko-reviewers
Like bug 1647133, we need this to be nsISerialEventTarget for the InvokeAsync

Differential Revision: https://phabricator.services.mozilla.com/D81272
2020-06-30 00:34:47 +00:00
Nika Layzell
c47eae6143 Bug 1647557 - Fix toolchain bustage caused by unused variable. CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D81722
2020-06-30 16:01:46 +00:00
Michal Novotny
a4cc2eb134 Bug 1627910 - Enable test netwerk/test/unit/test_http3.js r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D81053
2020-06-30 12:25:02 +00:00
Valentin Gosu
da614ff256 Bug 1641222 - Follow CNAME/AliasForm chains r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D79264
2020-06-30 12:27:09 +00:00
Jean-Yves Avenard
735a4b5c2c Bug 1648898 - Fix data race on STS loop start. r=mayhemer
The STS dispatched the first event before setting mThread member. It was possible that the STS::Run() task got started before mThread was set and causing one of the nsISerialEventTarget methods to read mThread/mInitialised/mShuttingDown value as null or zero and they would have returned an error.

We rewrite and simplify the access to mThread such that it's a lockless operation.

ApplyPortRemapPreference assert that it's running on the taskqueue; however if called before initialization, it would have been run on whatever thread called ApplyPortRemap.

Differential Revision: https://phabricator.services.mozilla.com/D81334
2020-06-30 11:06:31 +00:00
Honza Bambas
f1604cee10 Bug 1649003 - Log JS stacks from inside HTTP channel suspend() and resume() methods, r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D81570
2020-06-30 07:15:33 +00:00
Narcis Beleuzu
b151157eee Backed out changeset f16199c7d45e (bug 1648898) for causing Bug 1649333 . CLOSED TREE 2020-06-30 09:57:42 +03:00
Matt Woodrow
7d65de1298 Bug 1647557 - Add preffed-off code for controlling document loads directly from CanonicalBrowsingContext. r=nika,jya,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D70629
2020-06-30 01:19:15 +00:00
Matt Woodrow
1a4b43cd55 Bug 1647557 - Remove mCrossProcessRedirectIdentifier, and use the load identifier instead. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D81485
2020-06-30 01:18:04 +00:00
Junior Hsu
fb84c1b405 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-30 00:34:39 +00:00
Junior Hsu
64161823b3 Bug 1633935 - P12 top-level IPC stream filter should happen before OnStartRequest, r=mayhemer,necko-reviewers
The WebRequest will suspend the channel in nsHttpChannel::PrepareToConnect(), apply the stream filter, send the main thread IPC  and resume.
That is, PHttpChannel::AttachStreamFilter should be handled in Child before OnStartRequest goes to listener.

Differential Revision: https://phabricator.services.mozilla.com/D79770
2020-06-30 00:34:32 +00:00
Junior Hsu
95428cdcb2 Bug 1633935 - P11 Move classification IPC methods back to PHttpChannel. r=mayhemer,necko-reviewers
Bug 1015466 move them from PContent to Pbg since it believes those events are fine
to received before OnStopRequest. Bug 1588241 move it back to PContent since those
events are before OnStartRequest.

Now we're moving OnStartRequest to pBg, so here's another ping-pong time :)

Differential Revision: https://phabricator.services.mozilla.com/D79587
2020-06-30 00:34:24 +00:00
Junior Hsu
c411955868 Bug 1633935 - P10 wait PHttpChannel::OnStartRequestSent for permission/cookie update from parent, r=mayhemer,necko-reviewers
Depends on D77751

Differential Revision: https://phabricator.services.mozilla.com/D77752
2020-06-30 00:34:06 +00:00
Junior Hsu
418e51dbe6 Bug 1633935 - P9 send OnAfterLastPart via pBg IPC to avoid race between OS*R, r=mayhemer,necko-reviewers
Depends on D77750

Differential Revision: https://phabricator.services.mozilla.com/D77751
2020-06-30 00:33:54 +00:00
Junior Hsu
6458712a0e Bug 1633935 - P8 suspend event queue in HttpChannelChild which needs listener for redirection, r=mayhemer,necko-reviewers
Now OnStartRequest is passed to child process via pBg. Every IPC which is passed thru main thread could become a race.
For the redirection flow in child process is:

(1) HTC::ConnectParent(): Let parent know this is the targeted child, so OnStartRequest could start here.
(2) HTC::CompleteRedirectSetup(listener): Now we're finish the setup, including listener. From now on, we're ready to accept OnStartRequest

Hence, between (1) and (2), and need to suspend the eventQ to prevent OnStartRequest pump without listener.

On the other hand, if the redirection is vetoed by parent, (2) will not be sent. RecvDeleteSelf instead.
Resuming the eventQ to prevent leakage.

Depends on D77749

Differential Revision: https://phabricator.services.mozilla.com/D77750
2020-06-30 00:33:41 +00:00
Junior Hsu
dc20f95dd5 Bug 1633935 - P5 allow OnProgress/OnStatus going thru pBg IPC, r=mayhemer,necko-reviewers
Depends on D76971

Differential Revision: https://phabricator.services.mozilla.com/D76972
2020-06-30 00:33:19 +00:00
Junior Hsu
780b817a08 Bug 1633935 - P4 Remove On[Start|Stop]Request/OnTransportAndData in PHttpChannel, r=mayhemer,nika,necko-reviewers
We move OnStartRequest from PHttpChannel to PHttpBackgroundChannel, thus adjusting
message-metadata.ini

Depends on D76970

Differential Revision: https://phabricator.services.mozilla.com/D76971
2020-06-30 00:33:01 +00:00
Junior Hsu
f0b8d33e0b Bug 1633935 - P3 send OS*R and ODA via pHttpChannel for multipart channel, r=mayhemer,necko-reviewers
Depends on D76969

Differential Revision: https://phabricator.services.mozilla.com/D76970
2020-06-30 00:32:53 +00:00
Junior Hsu
3b2af10bb7 Bug 1633935 - P2 remove OnStartRequestSent since OnStartRequest is passed thru pBg, r=mayhemer,necko-reviewers
Depends on D73529

Differential Revision: https://phabricator.services.mozilla.com/D76969
2020-06-30 00:32:38 +00:00
Junior Hsu
c8c2496fa1 Bug 1633935 - P1 allow OnStartRequest go thru pBg IPC, r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D73529
2020-06-30 00:32:25 +00:00
Jean-Yves Avenard
6ca26ca6d3 Bug 1648898 - Fix data race on STS loop start. r=mayhemer
The STS dispatched the first event before setting mThread member. It was possible that the STS::Run() task got started before mThread was set and causing one of the nsISerialEventTarget methods to read mThread/mInitialised/mShuttingDown value as null or zero and they would have returned an error.

We rewrite and simplify the access to mThread such that it's a lockless operation.

ApplyPortRemapPreference assert that it's running on the taskqueue; however if called before initialization, it would have been run on whatever thread called ApplyPortRemap.

Differential Revision: https://phabricator.services.mozilla.com/D81334
2020-06-29 22:59:20 +00:00
Andrea Marchesini
4c6f89824d Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 8 - mozilla namespace, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80931
2020-06-29 13:40:27 +00:00
Andrea Marchesini
34cbc7e2ed Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 7 - RemoteLazyInputStreamUtils, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80930
2020-06-29 11:02:59 +00:00
Andrea Marchesini
2c405fb804 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 6 - remoteLazyInputStream, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80929
2020-06-29 11:02:55 +00:00
Andrea Marchesini
5fc1253731 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 4 - IPDL actors, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80927
2020-06-29 11:03:02 +00:00
Andrea Marchesini
8f12e90e00 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 3 - PRemoteLazyInputStream, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80926
2020-06-29 11:03:04 +00:00
Razvan Maries
f7cb24cc7e Backed out 8 changesets (bug 1648141) for build bustages on RemoteLazyInputStreamThread.cpp. CLOSED TREE
Backed out changeset e9b4ca0ee700 (bug 1648141)
Backed out changeset b9bb847cee47 (bug 1648141)
Backed out changeset 11dfce46ec14 (bug 1648141)
Backed out changeset d824d2f67f27 (bug 1648141)
Backed out changeset e5b8292e7095 (bug 1648141)
Backed out changeset c1a3d5fa0c61 (bug 1648141)
Backed out changeset 24fdb83db3cd (bug 1648141)
Backed out changeset 749d894dde52 (bug 1648141)
2020-06-29 13:59:16 +03:00
Andrea Marchesini
c71431ab1b Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 8 - mozilla namespace, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80931
2020-06-29 10:30:00 +00:00
Andrea Marchesini
16339b8334 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 7 - RemoteLazyInputStreamUtils, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80930
2020-06-29 10:29:05 +00:00
Andrea Marchesini
d50c65af76 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 6 - remoteLazyInputStream, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80929
2020-06-29 10:28:21 +00:00
Andrea Marchesini
87e1daec9f Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 4 - IPDL actors, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80927
2020-06-29 10:27:20 +00:00
Andrea Marchesini
d7cec00cfb Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 3 - PRemoteLazyInputStream, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80926
2020-06-29 10:26:33 +00:00
Daisuke Akatsuka
14e2eb6c29 Bug 1646974: Introduce and use isInDevToolsContext flag. r=Honza,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80623
2020-06-29 09:34:54 +00:00
Csoregi Natalia
3ba4d401aa Backed out changeset 8e77ebf75052 (bug 1627910) for xpcshell failures on test_http3.js. CLOSED TREE 2020-06-27 14:06:06 +03:00
Michal Novotny
b9b38ac4fe Bug 1627910 - Enable test netwerk/test/unit/test_http3.js r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D81053
2020-06-26 12:59:22 +00:00
Matt Woodrow
213fab51e4 Bug 1646892 - Allow DocumentChannel process switches into the parent process. r=jya,nika
Differential Revision: https://phabricator.services.mozilla.com/D80327
2020-06-27 04:10:23 +00:00
Matt Woodrow
8a6af22c34 Bug 1646892 - Move ParentChannelWrapper into a separate file. r=jya,nika
Differential Revision: https://phabricator.services.mozilla.com/D80326
2020-06-27 04:09:35 +00:00
Dragana Damjanovic
a35a0a0e29 Bug 1646318 - Split the sending side states and the receiving side states of a Http3Stream and allow to write and read at the same time. Also stop writing data as soon as the Http3Stream has received the response or has been reset. A NS_BASE_STREAM_WOULD_BLOCK... r=michal,necko-reviewers
...should be ignored after calling ReadSegments. r=michal

Differential Revision: https://phabricator.services.mozilla.com/D80279
2020-06-26 15:03:23 +00:00
Kershaw Chang
f7a31a2430 Bug 1648189 - Make sure MOZ_FORCE_USE_SOCKET_PROCESS is working when network.process.enabled is false, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D81028
2020-06-26 15:49:06 +00:00
Honza Bambas
167432454e Bug 1605895 - Advance the diagnostic assertion to check status of background channel event queues, r=michal,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D80639
2020-06-25 13:34:16 +00:00
Dorel Luca
e603449118 Backed out changeset 6e0936ea7f4a (bug 1648189) on dev's request, for causing mda failures on beta sims. CLOSED TREE 2020-06-26 17:07:40 +03:00
Dragana Damjanovic
268766d0e7 Bug 1648532 - Add support for HTTP3 draft 29 and draft 28. r=michal,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D81145
2020-06-26 11:03:07 +00:00
Kershaw Chang
f125c3512d Bug 1648189 - Make sure MOZ_FORCE_USE_SOCKET_PROCESS is working when network.process.enabled is false, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D81028
2020-06-26 12:58:36 +00:00
Emilio Cobos Álvarez
7c995807da Bug 1646936 - Generate a single metadata file in the objdir, and feed it to cbindgen. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D80360
2020-06-26 10:41:26 +00:00
Coroiu Cristina
302c2fa31a Backed out changeset 8f948dd74aba (bug 1646936) for SM and Toolchain failures on a CLOSED TREE 2020-06-26 13:08:09 +03:00
Emilio Cobos Álvarez
9c7c03bf30 Bug 1646936 - Generate a single metadata file in the objdir, and feed it to cbindgen. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D80360
2020-06-26 09:37:16 +00:00