Bug 1540839 - Assert on browsing context creation in chrome; r=nika
☠☠ backed out by 0d1fd6730856 ☠ ☠
authorKyle Machulis <kyle@nonpolynomial.com>
Mon, 06 May 2019 16:26:57 -0700
changeset 473701 484a546133586d3b1a10b77fb5043df8e4127827
parent 473700 b34c4d71f20230205d4d676445e60a643108b94a
child 473702 b71b58e40426eb7847f1461ca390422b10a88fed
push id36010
push userapavel@mozilla.com
push dateTue, 14 May 2019 04:11:16 +0000
treeherdermozilla-central@e0a622476b77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1540839
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
docshell/base/BrowsingContext.h
--- a/docshell/base/BrowsingContext.h
+++ b/docshell/base/BrowsingContext.h
@@ -343,16 +343,17 @@ class BrowsingContext : public nsWrapper
     // Include each field, skipping mOpener, as we want to handle it
     // separately.
 #define MOZ_BC_FIELD(name, type) type m##name;
 #include "mozilla/dom/BrowsingContextFieldList.h"
   };
 
   // Create an IPCInitializer object for this BrowsingContext.
   IPCInitializer GetIPCInitializer() {
+    MOZ_ASSERT(IsContent());
     IPCInitializer init;
     init.mId = Id();
     init.mParentId = mParent ? mParent->Id() : 0;
     init.mCached = IsCached();
 
 #define MOZ_BC_FIELD(name, type) init.m##name = m##name;
 #include "mozilla/dom/BrowsingContextFieldList.h"
     return init;