Bug 1664274 - Call SetDocCurrentStateObj for session history in the parent too. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D89812
This commit is contained in:
Peter Van der Beken 2020-09-10 19:30:13 +00:00
parent 57fd870466
commit cca834e53b

View File

@ -5452,14 +5452,18 @@ nsresult nsDocShell::Embed(nsIContentViewer* aContentViewer,
NS_ENSURE_SUCCESS(rv, rv);
// XXX What if SetupNewViewer fails?
if (StaticPrefs::fission_sessionHistoryInParent() ? !!mLoadingEntry
: !!mLSHE) {
// Set history.state
SetDocCurrentStateObj(mLSHE,
mLoadingEntry ? &mLoadingEntry->mInfo : nullptr);
}
if (mLSHE) {
// Restore the editing state, if it's stored in session history.
if (mLSHE->HasDetachedEditor()) {
ReattachEditorToWindow(mLSHE);
}
// Set history.state
SetDocCurrentStateObj(mLSHE,
mLoadingEntry ? &mLoadingEntry->mInfo : nullptr);
SetHistoryEntryAndUpdateBC(Nothing(), Some<nsISHEntry*>(mLSHE));
}