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 511973 69a279908152
parent 511972 89875cd4d942
child 511974 3bdf5922a67c
child 512049 80d073eee75b
push id10566
push userarchaeopteryx@coole-files.de
push dateMon, 28 Jan 2019 12:41:12 +0000
treeherdermozilla-beta@69a3d7c8d04b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1521189
milestone66.0a1
backs out36b36b5cdab6
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.