Bug 1377914 - Don't trigger a full GC in nsGlobalWindow::DetachFromDocShell(), r=mccr8
☠☠ backed out by 27ba09aa4be8 ☠ ☠
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Mon, 25 Sep 2017 11:46:07 +0300
changeset 382669 a50a428b23fcfeaa84cb7f781d9a9f592216eaa8
parent 382668 f637adb3bb88ee6d6d429e7f30bf033dd63d76a7
child 382686 ff48fab67d3c8e41035cd8ea1cbda1696fdd12fc
push id95393
push useropettay@mozilla.com
push dateMon, 25 Sep 2017 08:48:45 +0000
treeherdermozilla-inbound@a50a428b23fc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1377914
milestone58.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 1377914 - Don't trigger a full GC in nsGlobalWindow::DetachFromDocShell(), r=mccr8
dom/base/nsGlobalWindow.cpp
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -3584,22 +3584,18 @@ nsGlobalWindow::DetachFromDocShell()
     mFocusedNode = nullptr;
   }
 
   ClearControllers();
 
   mChromeEventHandler = nullptr; // force release now
 
   if (mContext) {
-    // When we're about to destroy a top level content window
-    // (for example a tab), we trigger a full GC by passing null as the last
-    // param. We also trigger a full GC for chrome windows.
     nsJSContext::PokeGC(JS::gcreason::SET_DOC_SHELL,
-                        (mTopLevelOuterContentWindow || mIsChrome) ?
-                          nullptr : GetWrapperPreserveColor());
+                        GetWrapperPreserveColor());
     mContext = nullptr;
   }
 
   mDocShell = nullptr; // Weak Reference
 
   NS_ASSERTION(!mNavigator, "Non-null mNavigator in outer window!");
 
   if (mFrames) {