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

855 Коммитов

Автор SHA1 Сообщение Дата
Mike Conley ab45276a8f Bug 1728375 - Notify session history listeners when entries are being removed via purging or truncation. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D124101
2021-09-02 15:33:16 +00:00
Olli Pettay 4d366e1861 Bug 1723282, let nonbfcacheable page update layout history state when the new page is coming from the bfcache, r=peterv
The fix let's ContentParent::RecvSynchronizeLayoutHistoryState update the layout history state.

Using an existing test to launch a subtest for this. Hopefully the description of the test helps with reviewing it.
(These BroadcastChannel based tests can be hard to follow.)

Differential Revision: https://phabricator.services.mozilla.com/D122376
2021-08-30 19:50:05 +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
Olli Pettay 6492d1564b Bug 1721306, hide the tooltip when deactivating a BrowserParent, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D121756
2021-08-06 19:33:04 +00:00
Olli Pettay e361a4cdfa Bug 1724451, activate the relevant processes when restoring a bfcached page on the foreground tab, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D122008
2021-08-06 17:39:21 +00:00
Marian-Vasile Laza 9c94fc9c4c Backed out changeset 37008f131c6f (bug 1721306) for causing bustages on SessionHistoryEntry.cpp. 2021-08-06 19:28:58 +03:00
Olli Pettay ece46d2b64 Bug 1721306, hide the tooltip when deactivating a BrowserParent, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D121756
2021-08-06 15:13:36 +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
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
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
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
Alexandre Poirot 18df9f0064 Bug 1721203 - Fix WebProgress STATE_START+DOCUMENT+WINDOW for bfcache navigations. r=smaug
Ensure firing the onStateChange on the BrowsingContext's WebProgress
of the page we navigate *from* instead of the one we navigate *to*.
(which was what used to happen before fission/bfcacheInParent)

Differential Revision: https://phabricator.services.mozilla.com/D119648
2021-07-19 16:16:06 +00:00
Olli Pettay 179938a106 Bug 1720733 - Try to ensure SessionHistoryEntry::mFrameLoader isn't replaced accidentally, r=peterv
I don't have a test for this, since the race condition is super hard to trigger.
The patch is based on code auditing.

The patch just prevents bfcaching if we're in middle of another load.

Differential Revision: https://phabricator.services.mozilla.com/D119992
2021-07-17 09:34:46 +00:00
Olli Pettay f2c39ef580 Bug 1719178 - properly disconnect nsSHistory from the owner object, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D119114
2021-07-08 11:08:19 +00:00
Peter Van der Beken 71e7900a51 Bug 1711544 - Move decision about name resetting to the parent process if we're replacing the BC for BFCache in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116759
2021-06-21 10:31:36 +00:00
Olli Pettay e74620fbda Bug 1688712, when replacing a LoadingSessionHistoryInfo, initialize member variables using values from the old object, r=annyG
Differential Revision: https://phabricator.services.mozilla.com/D117362
2021-06-16 10:31:56 +00:00
Kashav Madan 1a33a37654 Bug 1715852 - Fix SessionHistoryEntry::mSrcdocData to work with session restore, r=peterv
Not setting mIsSrcdocEntry causes us to drop srcdoc data and not set
INTERNAL_LOAD_FLAGS_IS_SRCDOC in FillLoadInfo for srcdoc restores.

Differential Revision: https://phabricator.services.mozilla.com/D117479
2021-06-15 13:34:01 +00:00
Dorel Luca 8720353dbf Backed out changeset 1968ba484b6f (bug 1697905) on dev's request 2021-06-11 18:04:51 +03:00
Olli Pettay 43f0e95954 Bug 1697905, requestedIndex may not always be cleared, r=peterv
I think there might be a case for the issue happening also without SHIP, but
since it is way less asynchronous, triggering that issue is hard.
So the patch and test are for SHIP only.

Differential Revision: https://phabricator.services.mozilla.com/D116744
2021-06-08 14:23:10 +00:00
Niklas Goegge be93617250 Bug 1648825 - Add nsISHEntry::hasUserActivation r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D113818
2021-05-25 17:37:08 +00:00
Andreea Pavel 87ae6eae9f Backed out 3 changesets (bug 1695911, bug 1648825) for bc failures at browser_navigation.js on a CLOSED TREE
Backed out changeset 1d7e78cac600 (bug 1695911)
Backed out changeset d90566e41269 (bug 1648825)
Backed out changeset 5aece2a17f5d (bug 1648825)
2021-05-20 18:59:30 +03:00
Niklas Goegge 418fd21408 Bug 1648825 - Add nsISHEntry::hasUserActivation r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D113818
2021-05-20 11:06:10 +00:00
Peter Van der Beken 3b711fcd30 Bug 1709316 - Replace the frameloader after marking the BC as not being in BFCache anymore. r=nika
nsFrameLoaderOwner::ReplaceFrameLoader calls nsFocusManager::ActivateRemoteFrameIfNeeded.
If the call to nsFrameLoaderOwner::ReplaceFrameLoader happens before the BC is marked as
not in BFCache, then the focus manager will not fire focus events because the window is
still frozen.

Differential Revision: https://phabricator.services.mozilla.com/D114227
2021-05-04 14:03:57 +00:00
Niklas Goegge b97cd2430b Bug 1708150 - Add user activation flag to reload, goBack and goForward r=ckerschb,Gijs,smaug
Differential Revision: https://phabricator.services.mozilla.com/D110245
2021-04-28 11:26:49 +00:00
Peter Van der Beken 302c37978b Bug 1696158 - Move CanSavePresentation to the parent process. Do CanSavePresentation check completely in parent. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D110234
2021-04-19 14:50:56 +00:00
Peter Van der Beken 1c8872c7e2 Bug 1696158 - Move CanSavePresentation to the parent process. Move some code. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D111606
2021-04-19 14:50:55 +00:00
smolnar 84a0543987 Backed out 8 changesets (bug 1696158) for causing multiple failures. CLOSED TREE
Backed out changeset 09c598c8fd29 (bug 1696158)
Backed out changeset 02f956c26901 (bug 1696158)
Backed out changeset b61a3a324cce (bug 1696158)
Backed out changeset 95810ed7f1e5 (bug 1696158)
Backed out changeset 4f93a7b61496 (bug 1696158)
Backed out changeset c80c55b56f2a (bug 1696158)
Backed out changeset 11627c409882 (bug 1696158)
Backed out changeset b98b4316a510 (bug 1696158)
2021-04-19 17:04:08 +03:00
Peter Van der Beken 30c3bd8c7e Bug 1696158 - Move CanSavePresentation to the parent process. Do CanSavePresentation check completely in parent. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D110234
2021-04-19 12:39:20 +00:00
Peter Van der Beken ed3b54b567 Bug 1696158 - Move CanSavePresentation to the parent process. Move some code. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D111606
2021-04-19 12:39:20 +00:00
Emilio Cobos Álvarez 3e0cb7c68b Bug 1703289 - Make mixed content blocker use a session-persistent permission rather than ad-hoc code. r=ckerschb,smaug
This is more fission-compatible, and a lot simpler.

Differential Revision: https://phabricator.services.mozilla.com/D111480
2021-04-12 18:04:12 +00:00
Emilio Cobos Álvarez d1e4e528b2 Bug 1703291 - Update root bc state when the root bc changes in the session history. r=smaug
Otherwise when navigating to a replaced browsing context we might have
an incorrect "is single top-level in history".

Fixes test_window_close.html with Fission+bfcache.

Differential Revision: https://phabricator.services.mozilla.com/D111458
2021-04-10 03:29:36 +00:00
Narcis Beleuzu a7ec545704 Backed out 2 changesets (bug 1703291) for bc failures on BrowsingContext.cpp . CLOSED TREE
Backed out changeset 4d216ecbacd9 (bug 1703291)
Backed out changeset 51d244d886aa (bug 1703291)
2021-04-10 00:52:54 +03:00
Emilio Cobos Álvarez 85f92a8a49 Bug 1703291 - Update root bc state when the root bc changes in the session history. r=smaug
Otherwise when navigating to a replaced browsing context we might have
an incorrect "is single top-level in history".

Fixes test_window_close.html with Fission+bfcache.

Differential Revision: https://phabricator.services.mozilla.com/D111458
2021-04-09 17:33:50 +00:00
Olli Pettay 1e523ef169 Bug 1699534 - Ensure beforeunload is called when the next page is coming from bfcache, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D109146
2021-03-30 09:24:45 +00:00
Olli Pettay cc185f2b74 Bug 1689685 - Ensure docshell/test/navigation/test_scrollRestoration.html works with SHIP-BFCache, r=peterv
Similarly to the old session history implementation, scroll position needs to be stored in HandleSameDocumentNavigation.
The relevant old implementation is couple of lines above the new code in nsDocShell.

Differential Revision: https://phabricator.services.mozilla.com/D109756
2021-03-29 14:38:18 +00:00
Olli Pettay 39c56ee58a Bug 1689684 - Ensure docshell/test/browser/browser_bug1347823.js works with SHIP-BFCache, r=peterv
Depends on D109312

Differential Revision: https://phabricator.services.mozilla.com/D109313
2021-03-26 19:15:02 +00:00
Olli Pettay dc39236b97 Bug 1699484 - Support Timer based bfcache eviction, r=peterv
The patch makes HistoryTracker rely on SHEntrySharedParentState instead of nsSHEntryShared.
nsSHEntryShared already extends SHEntrySharedParentState.

The test was modified a tiny bit to make it easier to see the results. The test does pass
with SHIP+BFCache.

Depends on D108851

Differential Revision: https://phabricator.services.mozilla.com/D108984
2021-03-21 21:46:26 +00:00
Mark Banner e8d532d179 Bug 1699747 - Clean up old references to nsIDocShellLoadInfo. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D109095
2021-03-19 18:38:32 +00:00
Paul Bone 55cd14a12d Bug 1691135 - pt 2. Don't cancel a reload if the listener threw an exception r=nika
Differential Revision: https://phabricator.services.mozilla.com/D107803
2021-03-12 01:16:15 +00:00
Olli Pettay 4d3e3067dc Bug 1697171 - Clear various states referring to the old BrowserParent when it enters bfcache, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D107644
2021-03-11 19:36:20 +00:00
Olli Pettay 72e7445ce0 Bug 1694727, remove the testing only code for history.length handling, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D108034
2021-03-11 19:31:30 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Olli Pettay a2d036fda6 Bug 1696923 - [SHIP] Update SaveLayoutStateFlag after page load similarly to in-process session history, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D107479
2021-03-09 18:16:58 +00:00
Olli Pettay 85323d2cfb Bug 1692208 - Remove unused nsSHistory::mIsRemote, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D104824
2021-03-03 12:28:50 +00:00
Olli Pettay 9a5e1b83eb Bug 1689601, hide fission.bfcacheInParent pref access behind a function which checks that also SHIP is enabled, r=peterv,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106562
2021-03-02 12:13:21 +00:00
Olli Pettay 0d29b12841 Bug 1689601, Rename RemotenessChangeState to RemotenessChangeOptions, r=peterv
This addresses part of the review comment from https://phabricator.services.mozilla.com/D105229

Differential Revision: https://phabricator.services.mozilla.com/D106561
2021-03-02 12:13:21 +00:00