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 669749 a50a428b23fcfeaa84cb7f781d9a9f592216eaa8
parent 669748 f637adb3bb88ee6d6d429e7f30bf033dd63d76a7
child 669750 ff48fab67d3c8e41035cd8ea1cbda1696fdd12fc
push id81421
push usercholler@mozilla.com
push dateMon, 25 Sep 2017 11:21:04 +0000
reviewersmccr8
bugs1377914
milestone58.0a1
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) {