Bug 1540839 - Assert on browsing context creation in chrome; r=nika

We shouldn't be creating browsing contexts in chrome. Add
assertion (behind pref that guards the rest of this patch set) to make
sure that doesn't happen.

Differential Revision: https://phabricator.services.mozilla.com/D30561
This commit is contained in:
Kyle Machulis 2019-05-06 16:26:57 -07:00
Родитель fe60360473
Коммит 19cab0495b
1 изменённых файлов: 1 добавлений и 0 удалений

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

@ -348,6 +348,7 @@ class BrowsingContext : public nsWrapperCache,
// Create an IPCInitializer object for this BrowsingContext. // Create an IPCInitializer object for this BrowsingContext.
IPCInitializer GetIPCInitializer() { IPCInitializer GetIPCInitializer() {
MOZ_ASSERT(IsContent());
IPCInitializer init; IPCInitializer init;
init.mId = Id(); init.mId = Id();
init.mParentId = mParent ? mParent->Id() : 0; init.mParentId = mParent ? mParent->Id() : 0;