Bug 1801586, bring back the old behavior when session-history-in-parent isn't enabled, r=peterv

bug 1717765 changed the behavior for non-SHIP too, and https://searchfox.org/mozilla-central/rev/d0c13bb2a9c3a9ab6f5eb5a23230161928b079d9/docshell/base/nsDocShell.cpp#6922
seems to rely on the old behavior. We need to have DocumentViewer always when restoring from bfcache, and non-SHIP doesn't deal with failure cases well.

No test for this (at least not yet).

Differential Revision: https://phabricator.services.mozilla.com/D225409
This commit is contained in:
Olli Pettay 2024-10-16 13:14:50 +00:00
parent e707d6e582
commit 651655bf7e

View File

@ -6397,7 +6397,7 @@ nsresult nsDocShell::CreateAboutBlankDocumentViewer(
}
if (!mBrowsingContext->AncestorsAreCurrent() ||
mBrowsingContext->IsInBFCache()) {
(mozilla::SessionHistoryInParent() && mBrowsingContext->IsInBFCache())) {
mBrowsingContext->RemoveRootFromBFCacheSync();
return NS_ERROR_NOT_AVAILABLE;
}