Bug 1547911 - Don't assert that there are no children when restoring BC. r=nika
authorAndreas Farre <farre@mozilla.com>
Sun, 05 May 2019 19:26:51 +0000
changeset 531451 f59b3336d254c80bf2b315a74fea0cb0fa8e0d47
parent 531450 a08af741bd23f9837b6dc6aa74829fbe933568e4
child 531452 f0566d1a9ab14fec0dc9e570fa138de14c535ccf
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1547911
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 1547911 - Don't assert that there are no children when restoring BC. r=nika This is essentially equal to restoring cached children and removing current children from a BrowsingContext, which is the correct behaviour. It would've been better if the current children were removed in a more transparent manner, but it is more important to remove an assert that too eagerly triggers. Differential Revision: https://phabricator.services.mozilla.com/D29945
docshell/base/BrowsingContext.cpp
--- a/docshell/base/BrowsingContext.cpp
+++ b/docshell/base/BrowsingContext.cpp
@@ -334,18 +334,16 @@ void BrowsingContext::CacheChildren(bool
   }
 }
 
 void BrowsingContext::RestoreChildren(Children&& aChildren, bool aFromIPC) {
   MOZ_LOG(GetLog(), LogLevel::Debug,
           ("%s: Restoring children of 0x%08" PRIx64 "",
            XRE_IsParentProcess() ? "Parent" : "Child", Id()));
 
-  MOZ_DIAGNOSTIC_ASSERT(mChildren.IsEmpty());
-
   for (BrowsingContext* child : aChildren) {
     MOZ_DIAGNOSTIC_ASSERT(child->GetParent() == this);
     Unused << Group()->EvictCachedContext(child);
   }
 
   mChildren.SwapElements(aChildren);
 
   if (!aFromIPC && XRE_IsContentProcess()) {