Bug 1547871 - BrowsingContext needs a group to evict from cache. r=neha
authorAndreas Farre <farre@mozilla.com>
Fri, 03 May 2019 16:08:40 +0000
changeset 531332 42a61320b49b43123e2c71770d9b32cdb15fc6a0
parent 531331 1963ed5da9820e633eae778edd690ed5c529ee31
child 531333 67590bfca46ffa5d84426b453cd4e88ac36d6b0b
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)
reviewersneha
bugs1547871
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 1547871 - BrowsingContext needs a group to evict from cache. r=neha Differential Revision: https://phabricator.services.mozilla.com/D29669
docshell/base/BrowsingContext.cpp
--- a/docshell/base/BrowsingContext.cpp
+++ b/docshell/base/BrowsingContext.cpp
@@ -278,17 +278,17 @@ void BrowsingContext::Attach(bool aFromI
 void BrowsingContext::Detach(bool aFromIPC) {
   MOZ_LOG(GetLog(), LogLevel::Debug,
           ("%s: Detaching 0x%08" PRIx64 " from 0x%08" PRIx64,
            XRE_IsParentProcess() ? "Parent" : "Child", Id(),
            mParent ? mParent->Id() : 0));
 
   RefPtr<BrowsingContext> kungFuDeathGrip(this);
 
-  if (!Group()->EvictCachedContext(this)) {
+  if (Group() && !Group()->EvictCachedContext(this)) {
     Children* children = nullptr;
     if (mParent) {
       children = &mParent->mChildren;
     } else if (mGroup) {
       children = &mGroup->Toplevels();
     }
 
     if (children) {