Backed out changeset db52cf052477 (bug 1660342) for causing Bug 1661364 a=backout
authorNoemi Erli <nerli@mozilla.com>
Mon, 31 Aug 2020 12:15:29 +0300
changeset 546990 b4055ac79297914c4b33dde0c7832fe63a5d5787
parent 546963 37b3648fa3157dd18909434197358397bafb4cdc
child 546991 2849a0212bb9de4ebaf89780100e7515c046ff51
push id125323
push usernerli@mozilla.com
push dateMon, 31 Aug 2020 09:24:40 +0000
treeherderautoland@2849a0212bb9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1660342, 1661364
milestone82.0a1
backs outdb52cf052477ff4d0079c1dd6cd4522d40ed0ce7
first release with
nightly linux32
b4055ac79297 / 82.0a1 / 20200831091558 / files
nightly linux64
b4055ac79297 / 82.0a1 / 20200831091558 / files
nightly mac
b4055ac79297 / 82.0a1 / 20200831091558 / files
nightly win32
b4055ac79297 / 82.0a1 / 20200831091558 / files
nightly win64
b4055ac79297 / 82.0a1 / 20200831091558 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset db52cf052477 (bug 1660342) for causing Bug 1661364 a=backout
docshell/base/BrowsingContextGroup.cpp
dom/ipc/ContentParent.cpp
--- a/docshell/base/BrowsingContextGroup.cpp
+++ b/docshell/base/BrowsingContextGroup.cpp
@@ -89,17 +89,16 @@ void BrowsingContextGroup::EnsureHostPro
     entry.OrInsert([&] { return do_AddRef(aProcess); });
   }
 
   aProcess->AddBrowsingContextGroup(this);
 }
 
 void BrowsingContextGroup::RemoveHostProcess(ContentParent* aProcess) {
   MOZ_DIAGNOSTIC_ASSERT(aProcess);
-  MOZ_DIAGNOSTIC_ASSERT(aProcess->GetRemoteType() != PREALLOC_REMOTE_TYPE);
   auto entry = mHosts.Lookup(aProcess->GetRemoteType());
   if (entry && entry.Data() == aProcess) {
     entry.Remove();
   }
 }
 
 static void CollectContextInitializers(
     Span<RefPtr<BrowsingContext>> aContexts,
@@ -114,17 +113,16 @@ static void CollectContextInitializers(
       CollectContextInitializers(window->Children(), aInits);
     }
   }
 }
 
 void BrowsingContextGroup::Subscribe(ContentParent* aProcess) {
   MOZ_ASSERT(!mDestroyed);
   MOZ_DIAGNOSTIC_ASSERT(aProcess && !aProcess->IsLaunching());
-  MOZ_DIAGNOSTIC_ASSERT(aProcess->GetRemoteType() != PREALLOC_REMOTE_TYPE);
 
   // Check if we're already subscribed to this process.
   if (!mSubscribers.EnsureInserted(aProcess)) {
     return;
   }
 
 #ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
   // If the process is already marked as dead, we won't be the host, but may
@@ -161,17 +159,16 @@ void BrowsingContextGroup::Subscribe(Con
     if (focused || active) {
       Unused << aProcess->SendSetupFocusedAndActive(focused, active);
     }
   }
 }
 
 void BrowsingContextGroup::Unsubscribe(ContentParent* aProcess) {
   MOZ_DIAGNOSTIC_ASSERT(aProcess);
-  MOZ_DIAGNOSTIC_ASSERT(aProcess->GetRemoteType() != PREALLOC_REMOTE_TYPE);
   mSubscribers.RemoveEntry(aProcess);
   aProcess->RemoveBrowsingContextGroup(this);
 
 #ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
   auto hostEntry = mHosts.Lookup(aProcess->GetRemoteType());
   MOZ_DIAGNOSTIC_ASSERT(!hostEntry || hostEntry.Data() != aProcess,
                         "Unsubscribing existing host entry");
 #endif
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -1666,21 +1666,16 @@ void ContentParent::AssertNotInPool() {
     MOZ_RELEASE_ASSERT(!sJSPluginContentParents ||
                        !sJSPluginContentParents->Get(mJSPluginID));
   } else {
     MOZ_RELEASE_ASSERT(
         !sBrowserContentParents ||
         !sBrowserContentParents->Contains(mRemoteType) ||
         !sBrowserContentParents->Get(mRemoteType)->Contains(this) ||
         !sCanLaunchSubprocesses);  // aka in shutdown - avoid timing issues
-
-    for (auto& group : mGroups) {
-      MOZ_RELEASE_ASSERT(group.GetKey()->GetHostProcess(mRemoteType) != this,
-                         "still a host process for one of our groups?");
-    }
   }
 }
 
 void ContentParent::AssertAlive() {
   MOZ_DIAGNOSTIC_ASSERT(!IsDead());
   MOZ_DIAGNOSTIC_ASSERT(!mShutdownPending);
 }
 
@@ -1932,20 +1927,16 @@ void ContentParent::ActorDestroy(ActorDe
   }
 
   mBlobURLs.Clear();
 
 #if defined(XP_WIN) && defined(ACCESSIBILITY)
   a11y::AccessibleWrap::ReleaseContentProcessIdFor(ChildID());
 #endif
 
-#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
-  AssertNotInPool();
-#endif
-
   // As this process is going away, ensure that every BrowsingContextGroup has
   // been fully unsubscribed.
   nsTHashtable<nsRefPtrHashKey<BrowsingContextGroup>> groups;
   mGroups.SwapElements(groups);
   for (auto& group : groups) {
     group.GetKey()->Unsubscribe(this);
   }
   MOZ_DIAGNOSTIC_ASSERT(mGroups.IsEmpty());
@@ -2497,19 +2488,16 @@ ContentParent::ContentParent(const nsACS
       mCalledKillHard(false),
       mCreatedPairedMinidumps(false),
       mShutdownPending(false),
       mIPCOpen(true),
       mIsRemoteInputEventQueueEnabled(false),
       mIsInputPriorityEventEnabled(false),
       mIsInPool(false),
       mHangMonitorActor(nullptr) {
-  MOZ_DIAGNOSTIC_ASSERT(!IsForJSPlugin(),
-                        "XXX(nika): How are we creating a JSPlugin?");
-
   // Insert ourselves into the global linked list of ContentParent objects.
   if (!sContentParents) {
     sContentParents = MakeUnique<LinkedList<ContentParent>>();
   }
   sContentParents->insertBack(this);
 
   mMessageManager = nsFrameMessageManager::NewProcessMessageManager(true);