Commit Graph

1720 Commits

Author SHA1 Message Date
Dana Keeler
aff97c6002 Bug 1748341 - remove superfluous nsNSSCertificate "constructors" r=necko-reviewers,kershaw,jschanck
nsNSSCertificate had a few functions that acted as constructors. This patch
removes these unnecessary functions and uses actual constructors.

Depends on D134977

Differential Revision: https://phabricator.services.mozilla.com/D134978
2022-01-12 00:40:14 +00:00
Nika Layzell
f2916bb759 Bug 1737828 - Avoid the main thread when starting PBackground, r=asuth,ipc-reviewers,necko-reviewers,kershaw,handyman
This patch avoids requiring the main thread to create PBackground instances by
instead using a background starter TaskQueue, and sending messages from a
PBackgroundStarter actor hosted on that thread to the target background thread
directly. On the background thread, the relevant metadata is already registered
and present in the BackgroundStarterParent actor allowing the main thread in
both processes to be bypassed completely.

Various tasks remain bound to the main thread, such as PBackground cleanup and
async steps involved in PBackground creation.

This patch also unifies the in-process and cross-process PBackground codepaths,
allowing in-process PBackground creation to bypass the main thread as well, and
removing the need for a main thread event target from
GetOrCreateForCurrentThread().

Differential Revision: https://phabricator.services.mozilla.com/D129705
2022-01-10 20:09:14 +00:00
Kershaw Chang
63477ce849 Bug 1747159 - Disable "network.proxy.parse_pac_on_socket_process", r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D134456
2021-12-23 11:06:58 +00:00
Toshihito Kikuchi
66d4a1eb24 Bug 1746114 - Part2. Collect the third-party modules ping from socket process. r=mhowell,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D133846
2021-12-23 02:15:36 +00:00
Kershaw Chang
9877647a66 Bug 1746543, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D134137
2021-12-22 01:35:04 +00:00
Rob Wu
3d7f8fe67c Bug 1745566 - Support frame-ancestors for web-accessible extension resources r=necko-reviewers,freddyb,dragana
frame-ancestor support requires a CSP. While extensions can declare a
CSP for extension pages, the frame-ancestors directive was not enforced
because the implementation expected only HTTP channels.

This patch also adds support for channels from ExtensionProtocolHandler.

Differential Revision: https://phabricator.services.mozilla.com/D134143
2021-12-21 20:34:28 +00:00
Anny Gakhokidze
e43aba7383 Bug 1735613 - Part 2: When redirecting in Document Channel, use the correct URI, r=nika
If we enable pref browser.tabs.documentchannel.parent-controlled and remove the
requirement for needing SHIP for parent-initiated loads, test
NavigationDelegateTest#redirectIntentLoad times out. It times out because when
redirecting in Document Channel, we were using the URI of the redirect that
failed.

Differential Revision: https://phabricator.services.mozilla.com/D132093
2021-12-20 22:39:29 +00:00
Dana Keeler
e06d1bceee Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,glandium,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Depends on D130820

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-18 01:30:24 +00:00
Anny Gakhokidze
07d7221e72 Bug 1721217 - Part 10: SetUserInteractionFlag for shentry for parent controlled loads, r=smaug
In Bug 1644914 code was added that assumed all UI code for loading URIs goes
through only one path - nsDocShell::LoadURI. Since we are enabling parent
controlled loads now, we need to make sure that we set the same flag in this
code path too.

Differential Revision: https://phabricator.services.mozilla.com/D130198
2021-12-16 22:27:19 +00:00
Anny Gakhokidze
a4eca0ad6f Bug 1721217 - Part 6: Don't cancel concurrent loads if they are downloads, r=nika,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D126846
2021-12-16 22:27:17 +00:00
Anny Gakhokidze
1fdd285c2c Bug 1721217 - Part 2: Fix the race between navigations originating in the parent and in the content, r=nika
Add a synced ParentInitiatedNavigationEpoch field to browsing context, which
only gets incremented when we start navigations in the parent process. When a
child process initiates a navigation, it sends the current value of the field
that it sees via DocumentChannelCreationArgs. In the parent process, we can
compare the value of that field with the latest one for the same browsing
context. If the latest value is higher than the one provided by the content
process, it means that in the meantime parent process has started a navigation
so the earlier navigation originating in the content process will be cancelled.

Differential Revision: https://phabricator.services.mozilla.com/D126842
2021-12-16 22:27:16 +00:00
Anny Gakhokidze
a15eb38a92 Bug 1721217 - Part 1: Enable parent controlled loads via DC, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D126841
2021-12-16 22:27:15 +00:00
Kershaw Chang
43037d50db Bug 1746300 - Add some null checks and avoid busy waiting for DNS resolution, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D134002
2021-12-16 16:50:08 +00:00
Marian-Vasile Laza
e6e2c2338e Backed out changeset 7628f6c5bb8c (bug 1746114) for causing build bustages on SocketProcessParent.obj. 2021-12-16 04:57:19 +02:00
Toshihito Kikuchi
8daad79c45 Bug 1746114 - Collect the third-party modules ping from socket process. r=mhowell,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D133846
2021-12-16 01:34:23 +00:00
Dragana Damjanovic
b1a6c7853b Bug 1743630 - Add EarlyHints telemetry r=necko-reviewers,valentin
EH_TIME_TO_FINAL_RESPONSE - This will collect time duration between receiving a 103 response and the final response. This is only collected for 2xx response and only if at least one 103 has been received.
EH_NUM_OF_HINTS_PER_PAGE - number of 103 responses received for a page load. 0 will mean that a page has not received a 103 response. This is only collected for 2xx response.
EH_FINAL_RESPONSE - whether the final response was 2xx or any other code. This is only collected if at least one 103 has been received.

The change also introduced the class EarlyHintsPreloader that will be extended to perform all EarlyHints tasks.

Differential Revision: https://phabricator.services.mozilla.com/D132556
2021-12-15 22:41:17 +00:00
Florian Quèze
b485c3eecc Bug 1745444 - Add a test for collecting FOG data on the Socket process, r=chutten,necko-reviewers,valentin.
Differential Revision: https://phabricator.services.mozilla.com/D133510
2021-12-15 22:18:33 +00:00
Florian Quèze
646e2b8671 Bug 1745444 - Expand FOG IPC to Socket process, to collect CPU time used there, r=chutten,necko-reviewers,valentin.
Differential Revision: https://phabricator.services.mozilla.com/D133491
2021-12-15 22:18:32 +00:00
Narcis Beleuzu
b80b92e2e1 Backed out 4 changesets (bug 1745444) for GTest failures on IHistory.Test . CLOSED TREE
Backed out changeset b3a2dc754e16 (bug 1745444)
Backed out changeset 7b9d52dff930 (bug 1745444)
Backed out changeset 15d9a79cc305 (bug 1745444)
Backed out changeset 497572ee54af (bug 1745444)
2021-12-15 20:50:24 +02:00
Florian Quèze
1a84e9c20f Bug 1745444 - Add a test for collecting FOG data on the Socket process, r=chutten,necko-reviewers,valentin.
Differential Revision: https://phabricator.services.mozilla.com/D133510
2021-12-15 16:27:57 +00:00
Florian Quèze
90b4404217 Bug 1745444 - Expand FOG IPC to Socket process, to collect CPU time used there, r=chutten,necko-reviewers,valentin.
Differential Revision: https://phabricator.services.mozilla.com/D133491
2021-12-15 16:27:56 +00:00
Cosmin Sabou
045a43b2c8 Backed out 2 changesets (bug 1712837) for causing an increase in crashes (bug 1735798). a=backout
Backed out changeset 51773d1ab7b5 (bug 1712837)
Backed out changeset 97b0a77e4ce7 (bug 1712837)
2021-12-15 12:24:03 +02:00
Norisz Fay
947ce3f0b7 Backed out changeset 8c24d308cf66 (bug 1743630) for causing mochitest failures on browser_103_telemetry.js 2021-12-14 13:19:57 +02:00
Dragana Damjanovic
c12524e1f7 Bug 1743630 - Add EarlyHints telemetry r=necko-reviewers,valentin
EH_TIME_TO_FINAL_RESPONSE - This will collect time duration between receiving a 103 response and the final response. This is only collected for 2xx response and only if at least one 103 has been received.
EH_NUM_OF_HINTS_PER_PAGE - number of 103 responses received for a page load. 0 will mean that a page has not received a 103 response. This is only collected for 2xx response.
EH_FINAL_RESPONSE - whether the final response was 2xx or any other code. This is only collected if at least one 103 has been received.

The change also introduced the class EarlyHintsPreloader that will be extended to perform all EarlyHints tasks.

Differential Revision: https://phabricator.services.mozilla.com/D132556
2021-12-14 10:03:54 +00:00
Dana Keeler
fe0468b14a Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-13 23:59:08 +00:00
Norisz Fay
d7397902e1 Backed out changeset 7e152131abba (bug 1743630) for causing lint failures on browser_103_telemetry.js 2021-12-13 16:38:42 +02:00
Dragana Damjanovic
0886422eb1 Bug 1743630 - Add EarlyHints telemetry r=necko-reviewers,valentin
EH_TIME_TO_FINAL_RESPONSE - This will collect time duration between receiving a 103 response and the final response. This is only collected for 2xx response and only if at least one 103 has been received.
EH_NUM_OF_HINTS_PER_PAGE - number of 103 responses received for a page load. 0 will mean that a page has not received a 103 response. This is only collected for 2xx response.
EH_FINAL_RESPONSE - whether the final response was 2xx or any other code. This is only collected if at least one 103 has been received.

The change also introduced the class EarlyHintsPreloader that will be extended to perform all EarlyHints tasks.

Differential Revision: https://phabricator.services.mozilla.com/D132556
2021-12-13 13:57:15 +00:00
Cristian Tuns
9ad5101118 Backed out changeset 5396b58ddae7 (bug 1712837) for causing Android ARMv7 build bustages. a=backout 2021-12-10 09:35:39 -05:00
Dana Keeler
c52192ebff Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-10 00:24:49 +00:00
Valentin Gosu
5e575d631e Bug 1742334 - Make sure to null out ChannelEventQueue::mOwner when object is released r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D131896
2021-12-07 21:32:03 +00:00
Nika Layzell
4dbe2d8fe1 Bug 1740303 - Remove unnecessary mChildProcessId fields, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D132994
2021-12-07 18:20:35 +00:00
Andreea Pavel
041f6f706d Backed out 2 changesets (bug 1712837) for win build bustages on a CLOSED TREE
Backed out changeset e754af875d57 (bug 1712837)
Backed out changeset 020eaab241a8 (bug 1712837)
2021-12-07 02:21:09 +02:00
Dana Keeler
8d68ea1d86 Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-06 23:43:32 +00:00
criss
3c9369510c Backed out changeset 766458123a64 (bug 1743630) for causing mochitest failures on browser_103_telemetry.js. CLOSED TREE 2021-12-02 18:05:19 +02:00
Dragana Damjanovic
b78a0db6da Bug 1743630 - Add EarlyHints telemetry r=necko-reviewers,valentin
EH_TIME_TO_FINAL_RESPONSE - This will collect time duration between receiving a 103 response and the final response. This is only collected for 2xx response and only if at least one 103 has been received.
EH_NUM_OF_HINTS_PER_PAGE - number of 103 responses received for a page load. 0 will mean that a page has not received a 103 response. This is only collected for 2xx response.
EH_FINAL_RESPONSE - whether the final response was 2xx or any other code. This is only collected if at least one 103 has been received.

The change also introduced the class EarlyHintsPreloader that will be extended to perform all EarlyHints tasks.

Differential Revision: https://phabricator.services.mozilla.com/D132556
2021-12-02 10:59:33 +00:00
Csoregi Natalia
59f022092c Backed out 2 changesets (bug 1712837) for causing RemoteProcessMonitor failures. CLOSED TREE
Backed out changeset e3ed61b61357 (bug 1712837)
Backed out changeset 19b9dfd60749 (bug 1712837)
2021-12-01 22:36:35 +02:00
Dana Keeler
c02a76841b Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-01 18:10:34 +00:00
Narcis Beleuzu
4c87b2e488 Backed out 12 changesets (bug 1721217) for bc failures on browser_TopLevelNavigationDelegate.js
Backed out changeset 5fe3c617d521 (bug 1721217)
Backed out changeset c131e4a6d9d5 (bug 1721217)
Backed out changeset a59210a5b400 (bug 1721217)
Backed out changeset 74362b0c39c0 (bug 1721217)
Backed out changeset c8075b91d660 (bug 1721217)
Backed out changeset 46512deaf0e5 (bug 1721217)
Backed out changeset b38bc569d227 (bug 1721217)
Backed out changeset ee9bd012fda8 (bug 1721217)
Backed out changeset 7aa2726a0982 (bug 1721217)
Backed out changeset 885ced5f4bb4 (bug 1721217)
Backed out changeset 7d3f99ca3f44 (bug 1721217)
Backed out changeset 2f5a0164679a (bug 1721217)
2021-12-01 03:38:10 +02:00
Anny Gakhokidze
a26b861e04 Bug 1721217 - Part 10: SetUserInteractionFlag for shentry for parent controlled loads, r=smaug
In Bug 1644914 code was added that assumed all UI code for loading URIs goes
through only one path - nsDocShell::LoadURI. Since we are enabling parent
controlled loads now, we need to make sure that we set the same flag in this
code path too.

Differential Revision: https://phabricator.services.mozilla.com/D130198
2021-11-30 16:31:38 +00:00
Anny Gakhokidze
48e144a44c Bug 1721217 - Part 6: Don't cancel concurrent loads if they are downloads, r=nika,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D126846
2021-11-30 16:31:36 +00:00
Anny Gakhokidze
4a06eef3a8 Bug 1721217 - Part 2: Fix the race between navigations originating in the parent and in the content, r=nika
Add a synced ParentInitiatedNavigationEpoch field to browsing context, which
only gets incremented when we start navigations in the parent process. When a
child process initiates a navigation, it sends the current value of the field
that it sees via DocumentChannelCreationArgs. In the parent process, we can
compare the value of that field with the latest one for the same browsing
context. If the latest value is higher than the one provided by the content
process, it means that in the meantime parent process has started a navigation
so the earlier navigation originating in the content process will be cancelled.

Differential Revision: https://phabricator.services.mozilla.com/D126842
2021-11-30 16:31:34 +00:00
Anny Gakhokidze
64c6fca640 Bug 1721217 - Part 1: Enable parent controlled loads via DC, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D126841
2021-11-30 16:31:34 +00:00
Narcis Beleuzu
a322582a00 Backed out 11 changesets (bug 1721217) for bc failures on browser_scrollPositions.js . CLOSED TREE
Backed out changeset 750f4a84b30e (bug 1721217)
Backed out changeset c4eb4ad769ad (bug 1721217)
Backed out changeset 81af11d67439 (bug 1721217)
Backed out changeset 548f2441b7c6 (bug 1721217)
Backed out changeset cd584129321a (bug 1721217)
Backed out changeset f5f5291d1da8 (bug 1721217)
Backed out changeset 9ad66ceec1e2 (bug 1721217)
Backed out changeset 10b53a21bb23 (bug 1721217)
Backed out changeset 3755cfbe22fe (bug 1721217)
Backed out changeset 71436dc6c4c4 (bug 1721217)
Backed out changeset ecf33b73ae60 (bug 1721217)
2021-11-26 01:51:03 +02:00
Anny Gakhokidze
547cff5843 Bug 1721217 - Part 10: SetUserInteractionFlag for shentry for parent controlled loads, r=smaug
In Bug 1644914 code was added that assumed all UI code for loading URIs goes
through only one path - nsDocShell::LoadURI. Since we are enabling parent
controlled loads now, we need to make sure that we set the same flag in this
code path too.

Differential Revision: https://phabricator.services.mozilla.com/D130198
2021-11-25 20:41:00 +00:00
Anny Gakhokidze
600c61e9f6 Bug 1721217 - Part 6: Don't cancel concurrent loads if they are downloads, r=nika,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D126846
2021-11-25 20:40:58 +00:00
Anny Gakhokidze
4d5efdcf73 Bug 1721217 - Part 2: Fix the race between navigations originating in the parent and in the content, r=nika
Add a synced ParentInitiatedNavigationEpoch field to browsing context, which
only gets incremented when we start navigations in the parent process. When a
child process initiates a navigation, it sends the current value of the field
that it sees via DocumentChannelCreationArgs. In the parent process, we can
compare the value of that field with the latest one for the same browsing
context. If the latest value is higher than the one provided by the content
process, it means that in the meantime parent process has started a navigation
so the earlier navigation originating in the content process will be cancelled.

Differential Revision: https://phabricator.services.mozilla.com/D126842
2021-11-25 20:40:57 +00:00
Anny Gakhokidze
8afaf07df0 Bug 1721217 - Part 1: Enable parent controlled loads via DC, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D126841
2021-11-25 20:40:56 +00:00
Nika Layzell
acedd82927 Bug 1734739 - Part 3: Stop providing pids in places where it's not needed/used, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128220
2021-11-24 17:56:01 +00:00
Nika Layzell
c8c4669312 Bug 1734739 - Part 2: Stop requiring the OtherPid to create Endpoint, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128219
2021-11-24 17:56:00 +00:00
Kershaw Chang
f12dd38922 Bug 1736611 - Avoid creating runnables after SocketProcessHost is destroyed, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D131489
2021-11-23 20:13:09 +00:00