Граф коммитов

222 Коммитов

Автор SHA1 Сообщение Дата
Kershaw Chang d164608d66 Bug 1760580 - P2: Provide a reason when request is cancelled with NS_BINDING_ABORTED, r=necko-reviewers,media-playback-reviewers,valentin,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D156071
2022-09-08 09:11:19 +00:00
Dimi 9e6c641b2c Bug 1773043 - Remove flashblock from necko r=kershaw,necko-reviewers
Depends on D149130

Differential Revision: https://phabricator.services.mozilla.com/D149131
2022-06-15 12:55:26 +00:00
Manuel Bucher b01d289292 Bug 1753730 - Add EarlyHintPreloader to load 103 Early Hint responses into the cache r=necko-reviewers,ckerschb,dragana,kershaw
Currently only same origin requests are preloaded and preloads in the
secure context. This may change in the future to match W3C decisions and
Chromes behavior.

Also only images get preloaded. This will change in the future to cover
asset types.

Currently the anchor isn't parsed correctly yet[1], so this will be
fixed in a future patch.

On non-2xx responses of the main document all ongoing preloads get
canceled. Already completed preloads don't get affected and are in the
cache.

It is currently untested whether unused preloads don't have side effects.

Another future patch should cover adding the preload to the devtools.

[1]: https://datatracker.ietf.org/doc/html/rfc8288#section-3.2

Differential Revision: https://phabricator.services.mozilla.com/D137885
2022-05-11 15:41:39 +00:00
Iulian Moraru f65b926595 Backed out 3 changesets (bug 1753730) for causing bc failures on browser_103_preload.js.
Backed out changeset 8f27dc8dbbe0 (bug 1753730)
Backed out changeset 3c25877d2660 (bug 1753730)
Backed out changeset 47787105e3ad (bug 1753730)
2022-05-03 23:24:34 +03:00
Manuel Bucher 2952cf8ce7 Bug 1753730 - Add EarlyHintPreloader to load 103 Early Hint responses into the cache r=necko-reviewers,ckerschb,dragana,kershaw
Currently only same origin requests are preloaded and preloads in the
secure context. This may change in the future to match W3C decisions and
Chromes behavior.

Also only images get preloaded. This will change in the future to cover
asset types.

Currently the anchor isn't parsed correctly yet[1], so this will be
fixed in a future patch.

On non-2xx responses of the main document all ongoing preloads get
canceled. Already completed preloads don't get affected and are in the
cache.

It is currently untested whether unused preloads don't have side effects.

Another future patch should cover adding the preload to the devtools.

[1]: https://datatracker.ietf.org/doc/html/rfc8288#section-3.2

Differential Revision: https://phabricator.services.mozilla.com/D137885
2022-05-03 19:24:42 +00:00
Nika Layzell 642b5e7837 Bug 1756980 - Part 3: Clarify "process switch" parameters in DocumentLoadListener, r=smaug
This clarifies some of the members and arguments which were used in
DocumentLoadListener to make them more clear, adding documentation.

In addition to the simplifications of logic and improved naming, this
patch also moves the responsibility of managing StreamFilterRequest out
of DisconnectListeners so that stream listeners behave more
consistently, as the existing flag doesn't map well to whether or not
they should be cleared.

This was kept seperate from part 1 as it is largely a clarity
improvement, and may make it harder to see the important changes in that
part.

Depends on D143676

Differential Revision: https://phabricator.services.mozilla.com/D144747
2022-04-27 15:22:01 +00:00
Nika Layzell e834665924 Bug 1756980 - Part 1: Redirect internally-handled attachment loads into new tabs, r=Gijs,smaug,necko-reviewers,dragana
This patch changes how we handle document loads which are being handled
internally but have Content-Disposition: attachment specified at the
DocumentLoadListener layer. This was done as process switching is
currently the only place during a load where we can change the target
BrowsingContext which the load will complete in.

The only situation where we should currently continue to deliver a
successful request to the default content-viewer despite
Content-Disposition: attachment being specified is when we choose to
handle a downloaded PDF internally, so this shouldn't impact other
cases.

The change is handled by forcing a process switch under the hood, and
opening a new browser window asynchronously to handle the process
switch, similar to how object and embed load upgrades are handled. This
is done using nsIBrowserDOMWindow to attempt to respect the user's
window opening preferences.

A small change to browser.js was also made to try to encourage the new
tab to be opened next to the previous tab, as well as to avoid starting
unnecessary new processes when creating the new browser window.

Differential Revision: https://phabricator.services.mozilla.com/D143675
2022-04-27 15:22:00 +00:00
Dragana Damjanovic 3591301920 Bug 1740689 - Rename EarlyHintsPreloader into EarlyHintsService r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D134409
2022-01-27 12:23:03 +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
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
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
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
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
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
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
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
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 252c246034 Bug 1731613 - Move GetProcessSwitchBehavior method to C++, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D128898
2021-10-19 18:46:46 +00:00
Nika Layzell aa9b1db7d6 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-10 14:31:17 +00:00
Nika Layzell 0ebcf6961e Bug 1650089 - Part 2: Track which ContentParent is used to create a DocumentLoadListener, r=annyG,kmag
There are races which are more common after these patches where an implicit
about:blank load races with a speculative parent process load's process switch.
In this situation, bad behaviour can result as we process a navigation started
by a process which we process-switched away from. By tracking the explicit
ContentParent which is making the DocumentLoadListener request, we can catch
situations like this and avoid navigations being started from the wrong
processes.

Differential Revision: https://phabricator.services.mozilla.com/D120672
2021-08-10 14:31:16 +00:00
Nika Layzell a50cefe2cf Bug 1650089 - Part 1: Add a remoteTypeOverride option for about:blank loads triggered by chrome, r=annyG,kmag
After the changes in this bug, about:blank loads triggered by chrome will
finish in a "web" content process, as they have an untrusted null principal
without a precursor. In a few places throughout the codebase, however, we
perform about:blank loads with the explicit expectation that they do not change
processes. This new remoteTypeOverride option allows the intended final process
to be explicitly specified in this situation.

For security & simplicity reasons, this new attribute is limited to only be
usable on system-principal triggered loads of about:blank in toplevel browsing
contexts.

Differential Revision: https://phabricator.services.mozilla.com/D120671
2021-08-10 14:31:16 +00:00
Butkovits Atila 22fb2b6793 Backed out 8 changesets (bug 1650089) for causing Xpcshell failures on test_ext_redirects.js. CLOSED TREE
Backed out changeset ee763318d378 (bug 1650089)
Backed out changeset 24d7898ec4bd (bug 1650089)
Backed out changeset bcdd2f5c9840 (bug 1650089)
Backed out changeset 24a5bd7f97dd (bug 1650089)
Backed out changeset 1b8b4e939e82 (bug 1650089)
Backed out changeset a7a4f37a5d72 (bug 1650089)
Backed out changeset 78c012d4b071 (bug 1650089)
Backed out changeset e870508c1ddc (bug 1650089)
2021-08-06 04:35:52 +03:00
Nika Layzell 58c1037005 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-06 00:10:57 +00:00
Nika Layzell 635f4349e6 Bug 1650089 - Part 2: Track which ContentParent is used to create a DocumentLoadListener, r=annyG,kmag
There are races which are more common after these patches where an implicit
about:blank load races with a speculative parent process load's process switch.
In this situation, bad behaviour can result as we process a navigation started
by a process which we process-switched away from. By tracking the explicit
ContentParent which is making the DocumentLoadListener request, we can catch
situations like this and avoid navigations being started from the wrong
processes.

Differential Revision: https://phabricator.services.mozilla.com/D120672
2021-08-06 00:10:56 +00:00
Nika Layzell 649f35f3a0 Bug 1650089 - Part 1: Add a remoteTypeOverride option for about:blank loads triggered by chrome, r=annyG,kmag
After the changes in this bug, about:blank loads triggered by chrome will
finish in a "web" content process, as they have an untrusted null principal
without a precursor. In a few places throughout the codebase, however, we
perform about:blank loads with the explicit expectation that they do not change
processes. This new remoteTypeOverride option allows the intended final process
to be explicitly specified in this situation.

For security & simplicity reasons, this new attribute is limited to only be
usable on system-principal triggered loads of about:blank in toplevel browsing
contexts.

Differential Revision: https://phabricator.services.mozilla.com/D120671
2021-08-06 00:10:56 +00:00
Alexandru Michis 5ca72bfc53 Backed out 7 changesets (bug 1650089) for causing xpcshell failures in test_ext_cookieBehaviors.js
Backed out changeset 336d6eb2fc15 (bug 1650089)
Backed out changeset 283ba29cdbeb (bug 1650089)
Backed out changeset c470e4c65117 (bug 1650089)
Backed out changeset 8fc2f428694d (bug 1650089)
Backed out changeset 37e5185dae14 (bug 1650089)
Backed out changeset a26afdc56d91 (bug 1650089)
Backed out changeset 32e207558b3d (bug 1650089)
2021-08-04 12:32:07 +03:00
Nika Layzell e0fc657cb6 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-03 18:17:54 +00:00
Nika Layzell e861698dd6 Bug 1650089 - Part 2: Track which ContentParent is used to create a DocumentLoadListener, r=annyG,kmag
There are races which are more common after these patches where an implicit
about:blank load races with a speculative parent process load's process switch.
In this situation, bad behaviour can result as we process a navigation started
by a process which we process-switched away from. By tracking the explicit
ContentParent which is making the DocumentLoadListener request, we can catch
situations like this and avoid navigations being started from the wrong
processes.

Differential Revision: https://phabricator.services.mozilla.com/D120672
2021-08-03 18:17:54 +00:00
Nika Layzell 3d749ece7f Bug 1650089 - Part 1: Add a remoteTypeOverride option for about:blank loads triggered by chrome, r=annyG,kmag
After the changes in this bug, about:blank loads triggered by chrome will
finish in a "web" content process, as they have an untrusted null principal
without a precursor. In a few places throughout the codebase, however, we
perform about:blank loads with the explicit expectation that they do not change
processes. This new remoteTypeOverride option allows the intended final process
to be explicitly specified in this situation.

For security & simplicity reasons, this new attribute is limited to only be
usable on system-principal triggered loads of about:blank in toplevel browsing
contexts.

Differential Revision: https://phabricator.services.mozilla.com/D120671
2021-08-03 18:17:54 +00:00
Noemi Erli 6cd9318b66 Backed out 7 changesets (bug 1650089) foe causing bustages in ProcessIsolation.cpp
Backed out changeset 4e73beb8872c (bug 1650089)
Backed out changeset 092451e931ce (bug 1650089)
Backed out changeset ca9ba60010c6 (bug 1650089)
Backed out changeset ee61b69ba556 (bug 1650089)
Backed out changeset 091c4efa36a7 (bug 1650089)
Backed out changeset dbdee40ef8a0 (bug 1650089)
Backed out changeset 54d12a4333a0 (bug 1650089)
2021-08-03 20:15:54 +03:00
Nika Layzell 35dca5bd20 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-03 15:39:34 +00:00
Nika Layzell cee0ea941b Bug 1650089 - Part 2: Track which ContentParent is used to create a DocumentLoadListener, r=annyG,kmag
There are races which are more common after these patches where an implicit
about:blank load races with a speculative parent process load's process switch.
In this situation, bad behaviour can result as we process a navigation started
by a process which we process-switched away from. By tracking the explicit
ContentParent which is making the DocumentLoadListener request, we can catch
situations like this and avoid navigations being started from the wrong
processes.

Differential Revision: https://phabricator.services.mozilla.com/D120672
2021-08-03 15:39:33 +00:00
Nika Layzell 78129583eb Bug 1650089 - Part 1: Add a remoteTypeOverride option for about:blank loads triggered by chrome, r=annyG,kmag
After the changes in this bug, about:blank loads triggered by chrome will
finish in a "web" content process, as they have an untrusted null principal
without a precursor. In a few places throughout the codebase, however, we
perform about:blank loads with the explicit expectation that they do not change
processes. This new remoteTypeOverride option allows the intended final process
to be explicitly specified in this situation.

For security & simplicity reasons, this new attribute is limited to only be
usable on system-principal triggered loads of about:blank in toplevel browsing
contexts.

Differential Revision: https://phabricator.services.mozilla.com/D120671
2021-08-03 15:39:33 +00:00
Dorel Luca f8c23e7e7f Backed out 5 changesets (bug 1650089) for Browser-chrome failures in browser/components/originattributes/test/browser/browser_firstPartyIsolation_aboutPages.js. CLOSED TREE
Backed out changeset 26ddad079ad3 (bug 1650089)
Backed out changeset 5ae2b2641484 (bug 1650089)
Backed out changeset c5d267a1907c (bug 1650089)
Backed out changeset d9eeca699dec (bug 1650089)
Backed out changeset 8bb303f6831a (bug 1650089)
2021-07-29 05:53:31 +03:00
Nika Layzell 3072efd270 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-07-29 01:40:20 +00:00
Nika Layzell 6887805071 Bug 1650089 - Part 2: Track which ContentParent is used to create a DocumentLoadListener, r=annyG,kmag
There are races which are more common after these patches where an implicit
about:blank load races with a speculative parent process load's process switch.
In this situation, bad behaviour can result as we process a navigation started
by a process which we process-switched away from. By tracking the explicit
ContentParent which is making the DocumentLoadListener request, we can catch
situations like this and avoid navigations being started from the wrong
processes.

Differential Revision: https://phabricator.services.mozilla.com/D120672
2021-07-29 01:40:19 +00:00
Nika Layzell d1a6052ca7 Bug 1650089 - Part 1: Add a remoteTypeOverride option for about:blank loads triggered by chrome, r=annyG,kmag
After the changes in this bug, about:blank loads triggered by chrome will
finish in a "web" content process, as they have an untrusted null principal
without a precursor. In a few places throughout the codebase, however, we
perform about:blank loads with the explicit expectation that they do not change
processes. This new remoteTypeOverride option allows the intended final process
to be explicitly specified in this situation.

For security & simplicity reasons, this new attribute is limited to only be
usable on system-principal triggered loads of about:blank in toplevel browsing
contexts.

Differential Revision: https://phabricator.services.mozilla.com/D120671
2021-07-29 01:40:19 +00:00
Valentin Gosu d595491cc7 Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D116701
2021-06-04 12:35:16 +00:00
Butkovits Atila 692bda1ca1 Backed out changeset c4b44c4ef15b (bug 1714307) for causing build bustages on nsHTTPCompressConv.h. CLOSED TREE 2021-06-04 13:53:37 +03:00
Valentin Gosu 98146ae90b Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D116701
2021-06-04 10:00:55 +00:00
Tom Tung a3eac88f3a Bug 1683131 - Fix namespace ambiguity issue on ipc::Endpoint after including nsHttpChannel in imgLoader; r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D108002
2021-03-30 00:52:34 +00:00
Butkovits Atila ad9b1ed9d7 Backed out 12 changesets (bug 1683131, bug 1696111, bug 1695987) for causing crashes(Bug 1701151). a=backout
Backed out changeset 8ffef57e27d2 (bug 1683131)
Backed out changeset c02d5dc72abb (bug 1695987)
Backed out changeset 276f016ddc67 (bug 1683131)
Backed out changeset 2c7a45e20b50 (bug 1683131)
Backed out changeset 11fdb503d537 (bug 1696111)
Backed out changeset 2946eff1e9c8 (bug 1696111)
Backed out changeset e4d01b88e517 (bug 1696111)
Backed out changeset fab7f4cd445d (bug 1696111)
Backed out changeset d60c38f8939a (bug 1696111)
Backed out changeset 3fdc8089a46f (bug 1696111)
Backed out changeset 51a16dfabc98 (bug 1696111)
Backed out changeset 642bdd52fd57 (bug 1696111)
2021-03-26 11:30:28 +02:00