Backed out changeset 419fcafe1794 (bug 1289001) at baku's request a=backout
authorWes Kocher <wkocher@mozilla.com>
Fri, 11 Nov 2016 13:04:09 -0800
changeset 352344 2047f4b419bf3b059e6d26b2ac2f5357b551f0ad
parent 352343 355cce73963e81b06fc2e51b4981bc072709c6a1
child 352345 0114eda62ce256dfaf4eddb761cea277bdefe572
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1289001
milestone52.0a1
backs out419fcafe1794e153ae9e27c25835cf61ab07a823
Backed out changeset 419fcafe1794 (bug 1289001) at baku's request a=backout
dom/ipc/TabChild.cpp
dom/ipc/TabChild.h
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -309,17 +309,22 @@ private:
         MOZ_ASSERT(!mTabChild);
     }
 
     NS_IMETHOD
     Run() override
     {
         MOZ_ASSERT(NS_IsMainThread());
         MOZ_ASSERT(mTabChild);
-        mTabChild->SendDeleteIfOpen();
+
+        // Check in case ActorDestroy was called after RecvDestroy message.
+        if (mTabChild->IPCOpen()) {
+            Unused << PBrowserChild::Send__delete__(mTabChild);
+        }
+
         mTabChild = nullptr;
         return NS_OK;
     }
 };
 
 namespace {
 StaticRefPtr<TabChild> sPreallocatedTab;
 
@@ -1168,30 +1173,16 @@ TabChild::DestroyWindow()
         delete sTabChildren;
         sTabChildren = nullptr;
       }
       mLayersId = 0;
     }
 }
 
 void
-TabChild::SendDeleteIfOpen()
-{
-  // Check in case ActorDestroy was called after RecvDestroy message.
-  if (mIPCOpen) {
-
-    // We must consider the IPC actor already dismissed in order to return the
-    // corrent value in IPCOpen().
-    mIPCOpen = false;
-
-    Unused << PBrowserChild::Send__delete__(this);
-  }
-}
-
-void
 TabChild::ActorDestroy(ActorDestroyReason why)
 {
   mIPCOpen = false;
 
   DestroyWindow();
 
   if (mTabChildGlobal) {
     // The messageManager relays messages via the TabChild which
--- a/dom/ipc/TabChild.h
+++ b/dom/ipc/TabChild.h
@@ -744,18 +744,16 @@ private:
 
   ScreenIntRect GetOuterRect();
 
   void SetUnscaledInnerSize(const CSSSize& aSize)
   {
     mUnscaledInnerSize = aSize;
   }
 
-  void SendDeleteIfOpen();
-
   class DelayedDeleteRunnable;
 
   TextureFactoryIdentifier mTextureFactoryIdentifier;
   nsCOMPtr<nsIWebNavigation> mWebNav;
   RefPtr<PuppetWidget> mPuppetWidget;
   nsCOMPtr<nsIURI> mLastURI;
   RenderFrameChild* mRemoteFrame;
   RefPtr<nsIContentChild> mManager;