зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1601773 - Make ReloadCurrentEntry forward to the child process if called from session history in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D56080 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
84d2d38d11
Коммит
b1af3a7da0
|
@ -63,6 +63,9 @@ parent:
|
|||
async EvictContentViewersOrReplaceEntry(nullable PSHEntry newSHEntry, bool replace);
|
||||
async NotifyListenersContentViewerEvicted(uint32_t numEvicted);
|
||||
async __delete__();
|
||||
|
||||
child:
|
||||
async ReloadCurrentEntryFromChild();
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -40,6 +40,11 @@ class SHistoryChild final : public PSHistoryChild,
|
|||
}
|
||||
|
||||
private:
|
||||
bool RecvReloadCurrentEntryFromChild() {
|
||||
ReloadCurrentEntry();
|
||||
return true;
|
||||
}
|
||||
|
||||
// The timer based history tracker is used to evict bfcache on expiration.
|
||||
class HistoryTracker final
|
||||
: public nsExpirationTracker<SHEntryChildShared, 3> {
|
||||
|
|
|
@ -365,5 +365,11 @@ LegacySHistory::CreateEntry(nsISHEntry** aEntry) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
LegacySHistory::ReloadCurrentEntry() {
|
||||
return mSHistoryParent->SendReloadCurrentEntryFromChild() ? NS_OK
|
||||
: NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -37,6 +37,8 @@ class LegacySHistory final : public nsSHistory {
|
|||
CanonicalBrowsingContext* aRootBC, const nsID& aDocShellID);
|
||||
|
||||
NS_IMETHOD CreateEntry(nsISHEntry** aEntry) override;
|
||||
using nsSHistory::ReloadCurrentEntry;
|
||||
NS_IMETHOD ReloadCurrentEntry() override;
|
||||
|
||||
SHistoryParent* GetActor() { return mSHistoryParent; }
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче