Backed out changeset 36b36b5cdab6 (bug 1521189) for causing multiple application crashes in various tests CLOSED TREE.
authorshindli <shindli@mozilla.com>
Tue, 22 Jan 2019 21:02:04 +0200
changeset 454857 69a2799081521866febfe2bbcbfc27b3d60133bd
parent 454856 89875cd4d9422dd0f7a169184ac2633a6669a196
child 454858 80d073eee75b5a5333c9293aa990ee8415837bc8
child 455015 3bdf5922a67c02fda006de28f60e91845b9944f7
push id111360
push userrgurzau@mozilla.com
push dateWed, 23 Jan 2019 00:06:13 +0000
treeherdermozilla-inbound@80d073eee75b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1521189
milestone66.0a1
backs out36b36b5cdab6c75c1cfd7e0e7c4784c297c2efa2
first release with
nightly linux32
69a279908152 / 66.0a1 / 20190122215349 / files
nightly linux64
69a279908152 / 66.0a1 / 20190122215349 / files
nightly mac
69a279908152 / 66.0a1 / 20190122215349 / files
nightly win32
69a279908152 / 66.0a1 / 20190122215349 / files
nightly win64
69a279908152 / 66.0a1 / 20190122215349 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 36b36b5cdab6 (bug 1521189) for causing multiple application crashes in various tests CLOSED TREE.
dom/base/nsGlobalWindowInner.cpp
dom/ipc/PWindowGlobal.ipdl
dom/ipc/WindowGlobalChild.h
dom/ipc/WindowGlobalParent.cpp
dom/ipc/WindowGlobalParent.h
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -1269,17 +1269,17 @@ void nsGlobalWindowInner::FreeInnerObjec
   if (mCleanMessageManager) {
     MOZ_ASSERT(mIsChrome, "only chrome should have msg manager cleaned");
     if (mChromeFields.mMessageManager) {
       mChromeFields.mMessageManager->Disconnect();
     }
   }
 
   if (mWindowGlobalChild && !mWindowGlobalChild->IsClosed()) {
-    mWindowGlobalChild->Destroy();
+    mWindowGlobalChild->Send__delete__(mWindowGlobalChild);
   }
   mWindowGlobalChild = nullptr;
 
   mIntlUtils = nullptr;
 }
 
 //*****************************************************************************
 // nsGlobalWindowInner::nsISupports
--- a/dom/ipc/PWindowGlobal.ipdl
+++ b/dom/ipc/PWindowGlobal.ipdl
@@ -18,23 +18,20 @@ namespace dom {
  * specifically a |nsGlobalWindowInner|. These actors will form a parent/child
  * link either between the chrome/content process, or will be in-process, for
  * documents which are loaded in the chrome process.
  */
 async protocol PWindowGlobal
 {
   manager PBrowser or PInProcess;
 
-child:
-  async __delete__();
-
 parent:
   /// Update the URI of the document in this WindowGlobal.
   async UpdateDocumentURI(nsIURI aUri);
 
   /// Notify the parent that this PWindowGlobal is now the current global.
   async BecomeCurrentWindowGlobal();
 
-  async Destroy();
+  async __delete__();
 };
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/ipc/WindowGlobalChild.h
+++ b/dom/ipc/WindowGlobalChild.h
@@ -37,20 +37,16 @@ class WindowGlobalChild : public nsWrapp
     return GetByInnerWindowId(aInnerWindowId);
   }
 
   dom::BrowsingContext* BrowsingContext() { return mBrowsingContext; }
   nsGlobalWindowInner* WindowGlobal() { return mWindowGlobal; }
 
   // Has this actor been shut down
   bool IsClosed() { return mIPCClosed; }
-  void Destroy() {
-    mIPCClosed = true;
-    SendDestroy();
-  }
 
   // Check if this actor is managed by PInProcess, as-in the document is loaded
   // in the chrome process.
   bool IsInProcess() { return XRE_IsParentProcess(); }
 
   // The Window ID for this WindowGlobal
   uint64_t InnerWindowId() { return mInnerWindowId; }
   uint64_t OuterWindowId() { return mOuterWindowId; }
--- a/dom/ipc/WindowGlobalParent.cpp
+++ b/dom/ipc/WindowGlobalParent.cpp
@@ -123,23 +123,16 @@ IPCResult WindowGlobalParent::RecvUpdate
   return IPC_OK();
 }
 
 IPCResult WindowGlobalParent::RecvBecomeCurrentWindowGlobal() {
   mBrowsingContext->SetCurrentWindowGlobal(this);
   return IPC_OK();
 }
 
-IPCResult WindowGlobalParent::RecvDestroy() {
-  if (!mIPCClosed) {
-    Unused << Send__delete__(this);
-  }
-  return IPC_OK();
-}
-
 bool WindowGlobalParent::IsCurrentGlobal() {
   return !mIPCClosed && mBrowsingContext->GetCurrentWindowGlobal() == this;
 }
 
 void WindowGlobalParent::ActorDestroy(ActorDestroyReason aWhy) {
   mIPCClosed = true;
   gWindowGlobalParentsById->Remove(mInnerWindowId);
   mBrowsingContext->UnregisterWindowGlobal(this);
--- a/dom/ipc/WindowGlobalParent.h
+++ b/dom/ipc/WindowGlobalParent.h
@@ -85,17 +85,16 @@ class WindowGlobalParent final : public 
   nsISupports* GetParentObject();
   JSObject* WrapObject(JSContext* aCx,
                        JS::Handle<JSObject*> aGivenProto) override;
 
  protected:
   // IPC messages
   mozilla::ipc::IPCResult RecvUpdateDocumentURI(nsIURI* aURI) override;
   mozilla::ipc::IPCResult RecvBecomeCurrentWindowGlobal() override;
-  mozilla::ipc::IPCResult RecvDestroy() override;
 
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
  private:
   ~WindowGlobalParent();
 
   // NOTE: This document principal doesn't reflect possible |document.domain|
   // mutations which may have been made in the actual document.