зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1663488 - Forward ChildSHistory::Reload to the parent process with session history in the parent. r=smaug
Depends on D89420 Differential Revision: https://phabricator.services.mozilla.com/D89421
This commit is contained in:
Родитель
709c5edefe
Коммит
f5c5e66824
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "mozilla/dom/ChildSHistory.h"
|
||||
#include "mozilla/dom/ChildSHistoryBinding.h"
|
||||
#include "mozilla/dom/CanonicalBrowsingContext.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/dom/ContentFrameMessageManager.h"
|
||||
#include "mozilla/StaticPrefs_fission.h"
|
||||
|
@ -105,6 +106,20 @@ void ChildSHistory::SetIndexAndLength(uint32_t aIndex, uint32_t aLength,
|
|||
}
|
||||
|
||||
void ChildSHistory::Reload(uint32_t aReloadFlags, ErrorResult& aRv) {
|
||||
if (StaticPrefs::fission_sessionHistoryInParent()) {
|
||||
if (XRE_IsParentProcess()) {
|
||||
nsISHistory* shistory =
|
||||
mBrowsingContext->Canonical()->GetSessionHistory();
|
||||
if (shistory) {
|
||||
aRv = shistory->Reload(aReloadFlags);
|
||||
}
|
||||
} else {
|
||||
ContentChild::GetSingleton()->SendHistoryReload(mBrowsingContext,
|
||||
aReloadFlags);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
aRv = mHistory->Reload(aReloadFlags);
|
||||
}
|
||||
|
||||
|
|
|
@ -7072,6 +7072,18 @@ mozilla::ipc::IPCResult ContentParent::RecvRemoveFromSessionHistory(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult ContentParent::RecvHistoryReload(
|
||||
const MaybeDiscarded<BrowsingContext>& aContext,
|
||||
const uint32_t aReloadFlags) {
|
||||
if (!aContext.IsDiscarded()) {
|
||||
nsISHistory* shistory = aContext.get_canonical()->GetSessionHistory();
|
||||
if (shistory) {
|
||||
shistory->Reload(aReloadFlags);
|
||||
}
|
||||
}
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult ContentParent::RecvCommitWindowContextTransaction(
|
||||
const MaybeDiscarded<WindowContext>& aContext,
|
||||
WindowContext::BaseTransaction&& aTransaction, uint64_t aEpoch) {
|
||||
|
|
|
@ -1379,6 +1379,10 @@ class ContentParent final
|
|||
mozilla::ipc::IPCResult RecvRemoveFromSessionHistory(
|
||||
const MaybeDiscarded<BrowsingContext>& aContext);
|
||||
|
||||
mozilla::ipc::IPCResult RecvHistoryReload(
|
||||
const MaybeDiscarded<BrowsingContext>& aContext,
|
||||
const uint32_t aReloadFlags);
|
||||
|
||||
// Notify the ContentChild to enable the input event prioritization when
|
||||
// initializing.
|
||||
void MaybeEnableRemoteInputEventQueue();
|
||||
|
|
|
@ -1668,6 +1668,8 @@ parent:
|
|||
*/
|
||||
async AbortOtherOrientationPendingPromises(MaybeDiscardedBrowsingContext aContext);
|
||||
|
||||
async HistoryReload(MaybeDiscardedBrowsingContext aContext, uint32_t aReloadFlags);
|
||||
|
||||
async NotifyOnHistoryReload(MaybeDiscardedBrowsingContext aContext)
|
||||
returns (bool canReload, nsDocShellLoadState? loadState,
|
||||
bool? reloadActiveEntry);
|
||||
|
|
Загрузка…
Ссылка в новой задаче