Bug 1664776 - Fall back to loading entry if there is no active entry. r=peterv

Differential Revision: https://phabricator.services.mozilla.com/D90089
This commit is contained in:
Andreas Farre
2020-09-14 16:32:17 +00:00
parent 175921359a
commit b297123ada

View File

@@ -4141,10 +4141,14 @@ already_AddRefed<nsIInputStream> nsDocShell::GetPostDataFromCurrentEntry()
if (StaticPrefs::fission_sessionHistoryInParent()) {
if (mActiveEntry) {
postData = mActiveEntry->GetPostData();
} else if (mLoadingEntry) {
postData = mLoadingEntry->mInfo.GetPostData();
}
} else {
if (mOSHE) {
postData = mOSHE->GetPostData();
} else if (mLSHE) {
postData = mLSHE->GetPostData();
}
}
@@ -4156,10 +4160,18 @@ Maybe<uint32_t> nsDocShell::GetCacheKeyFromCurrentEntry() const {
if (mActiveEntry) {
return Some(mActiveEntry->GetCacheKey());
}
if (mLoadingEntry) {
return Some(mLoadingEntry->mInfo.GetCacheKey());
}
} else {
if (mOSHE) {
return Some(mOSHE->GetCacheKey());
}
if (mLSHE) {
return Some(mLSHE->GetCacheKey());
}
}
return Nothing();