Bug 1650257: Add more diagnostic assertions. r=nika

Differential Revision: https://phabricator.services.mozilla.com/D86085
This commit is contained in:
Kris Maglione 2020-08-05 22:47:41 +00:00
parent ba6b415906
commit 636561ac6f
2 changed files with 4 additions and 0 deletions

View File

@ -1321,6 +1321,8 @@ IPCResult BrowserParent::RecvIndexedDBPermissionRequest(
IPCResult BrowserParent::RecvNewWindowGlobal(
ManagedEndpoint<PWindowGlobalParent>&& aEndpoint,
const WindowGlobalInit& aInit) {
MOZ_DIAGNOSTIC_ASSERT(mBrowsingContext,
"Should not receive messages after being unlinked");
RefPtr<CanonicalBrowsingContext> browsingContext =
CanonicalBrowsingContext::Get(aInit.context().mBrowsingContextId);
if (!browsingContext) {

View File

@ -115,6 +115,8 @@ already_AddRefed<WindowGlobalChild> WindowGlobalChild::Create(
MOZ_ASSERT(browserChild);
MOZ_DIAGNOSTIC_ASSERT(!aWindow->GetBrowsingContext()->IsDiscarded());
MOZ_DIAGNOSTIC_ASSERT(aWindow->GetBrowsingContext()->EverAttached());
MOZ_DIAGNOSTIC_ASSERT(aWindow->GetBrowsingContext()->IsInProcess());
ManagedEndpoint<PWindowGlobalParent> endpoint =
browserChild->OpenPWindowGlobalEndpoint(wgc);