Bug 1733067 - Update SHEntrySharedParentState::mExpired when loading a page, r=peterv
The main part of the patch is to get the state to CanonicalBrowsingContext::SessionHistoryCommit. The old code does similar thing in https://searchfox.org/mozilla-central/rev/d37daf2f82ed22b6a2a5cbbb975423825dfd69fa/docshell/base/nsDocShell.cpp#11630-11638 This is not fixing the issue with session store where the flag is lost. Also, I think SessionHistoryEntry should probably store a timestamp and not just a flag, but that would change the behavior more vs. the old implementation. Differential Revision: https://phabricator.services.mozilla.com/D128313
This commit is contained in:
@@ -3443,7 +3443,8 @@ bool BrowsingContext::IsPopupAllowed() {
|
||||
|
||||
void BrowsingContext::SessionHistoryCommit(
|
||||
const LoadingSessionHistoryInfo& aInfo, uint32_t aLoadType,
|
||||
bool aHadActiveEntry, bool aPersist, bool aCloneEntryChildren) {
|
||||
bool aHadActiveEntry, bool aPersist, bool aCloneEntryChildren,
|
||||
bool aChannelExpired) {
|
||||
nsID changeID = {};
|
||||
if (XRE_IsContentProcess()) {
|
||||
RefPtr<ChildSHistory> rootSH = Top()->GetChildSessionHistory();
|
||||
@@ -3468,12 +3469,13 @@ void BrowsingContext::SessionHistoryCommit(
|
||||
}
|
||||
}
|
||||
ContentChild* cc = ContentChild::GetSingleton();
|
||||
mozilla::Unused << cc->SendHistoryCommit(this, aInfo.mLoadId, changeID,
|
||||
aLoadType, aPersist,
|
||||
aCloneEntryChildren);
|
||||
mozilla::Unused << cc->SendHistoryCommit(
|
||||
this, aInfo.mLoadId, changeID, aLoadType, aPersist, aCloneEntryChildren,
|
||||
aChannelExpired);
|
||||
} else {
|
||||
Canonical()->SessionHistoryCommit(aInfo.mLoadId, changeID, aLoadType,
|
||||
aPersist, aCloneEntryChildren);
|
||||
aPersist, aCloneEntryChildren,
|
||||
aChannelExpired);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user