Bug 1883278 - Force-enable platform collection code of session store when SHIP is enabled. r=farre,geckoview-reviewers,sessionstore-reviewers

If session history in the parent is enabled then session store only works
correctly if the platform collection code is turned on.

Differential Revision: https://phabricator.services.mozilla.com/D203375
This commit is contained in:
Peter Van der Beken
2024-03-13 10:56:33 +00:00
parent 7e29885b3c
commit 0cf1288004
10 changed files with 38 additions and 15 deletions

View File

@@ -5666,7 +5666,7 @@ nsDocShell::OnStateChange(nsIWebProgress* aProgress, nsIRequest* aRequest,
mBusyFlags = (BusyFlags)(BUSY_FLAGS_BUSY | BUSY_FLAGS_BEFORE_PAGE_LOAD);
if ((aStateFlags & STATE_RESTORING) == 0) {
if (StaticPrefs::browser_sessionstore_platform_collection_AtStartup()) {
if (SessionStorePlatformCollection()) {
if (IsForceReloadType(mLoadType)) {
if (WindowContext* windowContext =
mBrowsingContext->GetCurrentWindowContext()) {
@@ -6393,7 +6393,7 @@ nsresult nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
// incorrectly overrides session store data from the following load.
return NS_OK;
}
if (StaticPrefs::browser_sessionstore_platform_collection_AtStartup()) {
if (SessionStorePlatformCollection()) {
if (WindowContext* windowContext =
mBrowsingContext->GetCurrentWindowContext()) {
using Change = SessionStoreChangeListener::Change;