diff --git a/docshell/base/CanonicalBrowsingContext.cpp b/docshell/base/CanonicalBrowsingContext.cpp index 03f0356d874b..ba373893a3b2 100644 --- a/docshell/base/CanonicalBrowsingContext.cpp +++ b/docshell/base/CanonicalBrowsingContext.cpp @@ -424,18 +424,21 @@ CanonicalBrowsingContext::ReplaceLoadingSessionHistoryEntryForLoad( } newEntry->SetDocshellID(GetHistoryID()); newEntry->SetIsDynamicallyAdded(CreatedDynamically()); - newEntry->SetForInitialLoad(true); // Replacing the old entry. SessionHistoryEntry::SetByLoadId(aInfo->mLoadId, newEntry); + bool forInitialLoad = true; for (size_t i = 0; i < mLoadingEntries.Length(); ++i) { if (mLoadingEntries[i].mLoadId == aInfo->mLoadId) { + forInitialLoad = mLoadingEntries[i].mEntry->ForInitialLoad(); mLoadingEntries[i].mEntry = newEntry; break; } } + newEntry->SetForInitialLoad(forInitialLoad); + return MakeUnique(newEntry, aInfo->mLoadId); } diff --git a/docshell/test/navigation/mochitest.ini b/docshell/test/navigation/mochitest.ini index 2eb766f7189b..1d8245892816 100644 --- a/docshell/test/navigation/mochitest.ini +++ b/docshell/test/navigation/mochitest.ini @@ -102,7 +102,6 @@ skip-if = verify && (os == 'mac') && debug && webrender # Hit MOZ_CRASH(Shutdown skip-if = fission # It relies on the bfcache [test_bug1609475.html] [test_bug1300461.html] -skip-if = fission [test_bug1326251.html] skip-if = toolkit == 'android' || fission # It relies on the bfcache [test_bug1379762.html]