Bug 1597499 - Make Session Restore work in Fission, r=nika

Differential Revision: https://phabricator.services.mozilla.com/D107883
This commit is contained in:
Kashav Madan
2021-03-17 16:43:05 +00:00
parent 48ca73ce30
commit ad57811557
25 changed files with 786 additions and 111 deletions

View File

@@ -2683,8 +2683,8 @@ bool BrowsingContext::LegacyCheckOnlyOwningProcessCanSet(
return true;
}
auto BrowsingContext::LegacyRevertIfNotOwningOrParentProcess(ContentParent* aSource)
-> CanSetResult {
auto BrowsingContext::LegacyRevertIfNotOwningOrParentProcess(
ContentParent* aSource) -> CanSetResult {
if (aSource) {
MOZ_ASSERT(XRE_IsParentProcess());
@@ -3168,6 +3168,11 @@ bool BrowsingContext::CanSet(FieldIndex<IDX_PendingInitialization>,
return IsTop() && GetPendingInitialization() && !aNewValue;
}
bool BrowsingContext::CanSet(FieldIndex<IDX_HasRestoreData>, bool aNewValue,
ContentParent* aSource) {
return IsTop();
}
bool BrowsingContext::IsPopupAllowed() {
for (auto* context = GetCurrentWindowContext(); context;
context = context->GetParentWindowContext()) {