зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1700719 - Discard-check both the top-level and current context before restoring, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D109722
This commit is contained in:
Родитель
02b9c24a63
Коммит
a69f8cc71b
|
@ -1745,6 +1745,8 @@ void CanonicalBrowsingContext::SetRestoreData(SessionStoreRestoreData* aData) {
|
|||
|
||||
void CanonicalBrowsingContext::RequestRestoreTabContent(
|
||||
WindowGlobalParent* aWindow) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(IsTop());
|
||||
|
||||
if (IsDiscarded() || !mRestoreData || mRestoreData->IsEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1294,9 +1294,9 @@ mozilla::ipc::IPCResult WindowGlobalParent::RecvResetSessionStore(
|
|||
}
|
||||
|
||||
mozilla::ipc::IPCResult WindowGlobalParent::RecvRequestRestoreTabContent() {
|
||||
CanonicalBrowsingContext* bc = BrowsingContext()->Top();
|
||||
if (bc && !bc->IsDiscarded()) {
|
||||
bc->RequestRestoreTabContent(this);
|
||||
CanonicalBrowsingContext* bc = BrowsingContext();
|
||||
if (bc && bc->AncestorsAreCurrent()) {
|
||||
bc->Top()->RequestRestoreTabContent(this);
|
||||
}
|
||||
return IPC_OK();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче