mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1663487 - Set loading history entry for loads in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89420
This commit is contained in:
parent
fe3f64a907
commit
709c5edefe
@ -13001,5 +13001,7 @@ bool nsDocShell::GetIsAttemptingToNavigate() {
|
||||
|
||||
void nsDocShell::SetLoadingSessionHistoryInfo(
|
||||
const mozilla::dom::LoadingSessionHistoryInfo& aLoadingInfo) {
|
||||
// FIXME Would like to assert this, but can't yet.
|
||||
// MOZ_ASSERT(!mLoadingEntry);
|
||||
mLoadingEntry = MakeUnique<LoadingSessionHistoryInfo>(aLoadingInfo);
|
||||
}
|
||||
|
@ -274,6 +274,12 @@ class DocumentLoadListener : public nsIInterfaceRequestor,
|
||||
uint64_t GetLoadIdentifier() const { return mLoadIdentifier; }
|
||||
uint32_t GetLoadType() const { return mLoadStateLoadType; }
|
||||
|
||||
mozilla::dom::LoadingSessionHistoryInfo* GetLoadingSessionHistoryInfo() {
|
||||
return mLoadingSessionHistoryInfo.get();
|
||||
}
|
||||
|
||||
bool IsDocumentLoad() const { return mIsDocumentLoad; }
|
||||
|
||||
protected:
|
||||
virtual ~DocumentLoadListener();
|
||||
|
||||
|
@ -68,6 +68,12 @@ ParentProcessDocumentChannel::RedirectToRealChannel(
|
||||
}
|
||||
mStreamFilterEndpoints = std::move(aStreamFilterEndpoints);
|
||||
|
||||
if (mDocumentLoadListener->IsDocumentLoad() &&
|
||||
StaticPrefs::fission_sessionHistoryInParent() && GetDocShell()) {
|
||||
GetDocShell()->SetLoadingSessionHistoryInfo(
|
||||
*mDocumentLoadListener->GetLoadingSessionHistoryInfo());
|
||||
}
|
||||
|
||||
RefPtr<RedirectToRealChannelPromise> p = mPromise.Ensure(__func__);
|
||||
// We make the promise use direct task dispatch in order to reduce the number
|
||||
// of event loops iterations.
|
||||
|
Loading…
Reference in New Issue
Block a user