Bug 1665710: don't update session history for about:blank transient pages r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90589
This commit is contained in:
@@ -280,7 +280,7 @@ static mozilla::LazyLogModule gDocShellAndDOMWindowLeakLogging(
|
||||
#endif
|
||||
static mozilla::LazyLogModule gDocShellLeakLog("nsDocShellLeak");
|
||||
extern mozilla::LazyLogModule gPageCacheLog;
|
||||
static mozilla::LazyLogModule gSHLog("SessionHistory");
|
||||
mozilla::LazyLogModule gSHLog("SessionHistory");
|
||||
|
||||
const char kBrandBundleURL[] = "chrome://branding/locale/brand.properties";
|
||||
const char kAppstringsBundleURL[] =
|
||||
@@ -5689,7 +5689,8 @@ nsresult nsDocShell::RefreshURIFromQueue() {
|
||||
}
|
||||
|
||||
nsresult nsDocShell::Embed(nsIContentViewer* aContentViewer,
|
||||
WindowGlobalChild* aWindowActor) {
|
||||
WindowGlobalChild* aWindowActor,
|
||||
bool aIsTransientAboutBlank) {
|
||||
// Save the LayoutHistoryState of the previous document, before
|
||||
// setting up new document
|
||||
PersistLayoutHistoryState();
|
||||
@@ -5714,7 +5715,8 @@ nsresult nsDocShell::Embed(nsIContentViewer* aContentViewer,
|
||||
SetHistoryEntryAndUpdateBC(Nothing(), Some<nsISHEntry*>(mLSHE));
|
||||
}
|
||||
|
||||
if (StaticPrefs::fission_sessionHistoryInParent()) {
|
||||
if (!aIsTransientAboutBlank &&
|
||||
StaticPrefs::fission_sessionHistoryInParent()) {
|
||||
MOZ_LOG(gSHLog, LogLevel::Debug, ("document %p Embed", this));
|
||||
MoveLoadingToActiveEntry(mLoadType != LOAD_ERROR_PAGE);
|
||||
}
|
||||
@@ -6764,7 +6766,7 @@ nsresult nsDocShell::CreateAboutBlankContentViewer(
|
||||
// hook 'em up
|
||||
if (viewer) {
|
||||
viewer->SetContainer(this);
|
||||
rv = Embed(viewer, aActor);
|
||||
rv = Embed(viewer, aActor, true);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
SetCurrentURI(blankDoc->GetDocumentURI(), nullptr, true, 0);
|
||||
|
||||
Reference in New Issue
Block a user