Backed out changeset 3f1501ac45d0 (bug 1516240) for causing build bustages on WindowGlobalParent. a=backout
authorCosmin Sabou <csabou@mozilla.com>
Sat, 23 Feb 2019 23:58:49 +0200
changeset 516113 3e124918dc6827e285d5aac82d046086cf2b0ea5
parent 516112 3f1501ac45d0630bddba90054d27ed96c60a7f6f
child 516114 8e269f80753c2ed75a3a36d9d2d88a496bfc8618
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1516240
milestone66.0
backs out3f1501ac45d0630bddba90054d27ed96c60a7f6f
Backed out changeset 3f1501ac45d0 (bug 1516240) for causing build bustages on WindowGlobalParent. a=backout
dom/ipc/WindowGlobalChild.cpp
dom/ipc/WindowGlobalParent.cpp
--- a/dom/ipc/WindowGlobalChild.cpp
+++ b/dom/ipc/WindowGlobalChild.cpp
@@ -41,20 +41,16 @@ already_AddRefed<WindowGlobalChild> Wind
 
   // Send the link constructor over PInProcessChild or PBrowser.
   if (XRE_IsParentProcess()) {
     InProcessChild* ipc = InProcessChild::Singleton();
     if (!ipc) {
       return nullptr;
     }
 
-    // Note: Take a ref to our BrowsingContext to prevent it being freed until
-    // after the message has been recieved on the other side.
-    Unused << do_AddRef(bc);
-
     // Note: ref is released in DeallocPWindowGlobalChild
     ipc->SendPWindowGlobalConstructor(do_AddRef(wgc).take(), init);
   } else {
     RefPtr<TabChild> tabChild =
         TabChild::GetFrom(static_cast<mozIDOMWindow*>(aWindow));
     MOZ_ASSERT(tabChild);
 
     // Note: ref is released in DeallocPWindowGlobalChild
--- a/dom/ipc/WindowGlobalParent.cpp
+++ b/dom/ipc/WindowGlobalParent.cpp
@@ -76,19 +76,16 @@ void WindowGlobalParent::Init(const Wind
     if (otherSide && otherSide->WindowGlobal()) {
       // Get the toplevel window from the other side.
       RefPtr<nsDocShell> docShell =
           nsDocShell::Cast(otherSide->WindowGlobal()->GetDocShell());
       if (docShell) {
         docShell->GetTopFrameElement(getter_AddRefs(frameElement));
       }
     }
-
-    // We took a reference to our BrowsingContext in WindowGlobalChild::Create.
-    RefPtr<BrowsingContext> dummy = dont_AddRef(mBrowsingContext);
   } else {
     // In the cross-process case, we can get the frame element from our manager.
     MOZ_ASSERT(Manager()->GetProtocolTypeId() == PBrowserMsgStart);
     frameElement = static_cast<TabParent*>(Manager())->GetOwnerElement();
   }
 
   // Extract the nsFrameLoader from the current frame element. We may not have a
   // nsFrameLoader if we are a chrome document.