Bug 1660001 - Don't assert when creating popup from shutting down process, r=kmag

Differential Revision: https://phabricator.services.mozilla.com/D87921
This commit is contained in:
Nika Layzell 2020-08-26 19:18:44 +00:00
Родитель 6b98a54c44
Коммит 62ed33101c
1 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -127,9 +127,14 @@ void BrowsingContextGroup::Subscribe(ContentParent* aProcess) {
}
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
auto hostEntry = mHosts.Lookup(aProcess->GetRemoteType());
MOZ_DIAGNOSTIC_ASSERT(hostEntry && hostEntry.Data() == aProcess,
"Cannot subscribe a non-host process");
// If the process is already marked as dead, we won't be the host, but may
// still need to subscribe to the process due to creating a popup while
// shutting down.
if (!aProcess->IsDead()) {
auto hostEntry = mHosts.Lookup(aProcess->GetRemoteType());
MOZ_DIAGNOSTIC_ASSERT(hostEntry && hostEntry.Data() == aProcess,
"Cannot subscribe a non-host process");
}
#endif
// FIXME: This won't send non-discarded children of discarded BCs, but those