Bug 1570255 - Remove sync session history implementation. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D65326
This commit is contained in:
@@ -198,7 +198,7 @@
|
||||
#include "nsSandboxFlags.h"
|
||||
#include "nsSHEntry.h"
|
||||
#include "nsSHistory.h"
|
||||
#include "SHEntryChild.h"
|
||||
#include "nsSHEntry.h"
|
||||
#include "nsStructuredCloneContainer.h"
|
||||
#include "nsSubDocumentFrame.h"
|
||||
#include "nsView.h"
|
||||
@@ -10707,9 +10707,7 @@ nsresult nsDocShell::AddToSessionHistory(
|
||||
NS_ENSURE_TRUE(webnav, NS_ERROR_FAILURE);
|
||||
|
||||
RefPtr<ChildSHistory> shistory = webnav->GetSessionHistory();
|
||||
entry = CreateSHEntryForDocShell(shistory ? shistory->LegacySHistory()
|
||||
: nullptr);
|
||||
NS_ENSURE_TRUE(entry, NS_ERROR_FAILURE);
|
||||
entry = new nsSHEntry(shistory ? shistory->LegacySHistory() : nullptr);
|
||||
}
|
||||
|
||||
// Get the post data & referrer
|
||||
@@ -10998,24 +10996,6 @@ void nsDocShell::SetHistoryEntryAndUpdateBC(const Maybe<nsISHEntry*>& aLSHE,
|
||||
deathGripOldOSHE = SetHistoryEntry(&mOSHE, aOSHE.value());
|
||||
MOZ_ASSERT(mOSHE.get() == aOSHE.value());
|
||||
}
|
||||
|
||||
// Do not update the BC if the SH pref is off and we are not a parent process
|
||||
// or if it is discarded
|
||||
if ((!StaticPrefs::fission_sessionHistoryInParent() &&
|
||||
XRE_IsContentProcess()) ||
|
||||
mBrowsingContext->IsDiscarded()) {
|
||||
return;
|
||||
}
|
||||
if (XRE_IsParentProcess()) {
|
||||
// We are in the parent process, thus we can update the entries directly
|
||||
mBrowsingContext->Canonical()->UpdateSHEntries(mLSHE, mOSHE);
|
||||
} else {
|
||||
ContentChild* cc = ContentChild::GetSingleton();
|
||||
// We can't update canonical BC directly, so do it over IPC call
|
||||
cc->SendUpdateSHEntriesInBC(static_cast<SHEntryChild*>(mLSHE.get()),
|
||||
static_cast<SHEntryChild*>(mOSHE.get()),
|
||||
mBrowsingContext);
|
||||
}
|
||||
}
|
||||
|
||||
already_AddRefed<nsISHEntry> nsDocShell::SetHistoryEntry(
|
||||
|
||||
Reference in New Issue
Block a user