mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 23:35:18 +00:00
Synchronize SHistory entry with mLSHE.
This commit is contained in:
@@ -11425,6 +11425,21 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
|
||||
(void)AddToSessionHistory(aURI, aChannel, aOwner, aCloneSHChildren,
|
||||
getter_AddRefs(mLSHE));
|
||||
}
|
||||
} else if (mSessionHistory && mLSHE && mURIResultedInDocument) {
|
||||
// Even if we don't add anything to SHistory, ensure the current index
|
||||
// points to the same SHEntry as our mLSHE.
|
||||
int32_t index = 0;
|
||||
mSessionHistory->GetRequestedIndex(&index);
|
||||
if (index == -1) {
|
||||
mSessionHistory->GetIndex(&index);
|
||||
}
|
||||
nsCOMPtr<nsISHEntry> currentSH;
|
||||
mSessionHistory->GetEntryAtIndex(index, false, getter_AddRefs(currentSH));
|
||||
if (currentSH != mLSHE) {
|
||||
nsCOMPtr<nsISHistoryInternal> shPrivate =
|
||||
do_QueryInterface(mSessionHistory);
|
||||
shPrivate->ReplaceEntry(index, mLSHE);
|
||||
}
|
||||
}
|
||||
|
||||
// If this is a POST request, we do not want to include this in global
|
||||
|
||||
Reference in New Issue
Block a user