Bug 1364856 - When VRLayerChild receives __delete__, stop sending IPC messages; r=kip
authorDaosheng Mu <daoshengmu@gmail.com>
Mon, 15 May 2017 18:55:42 +0800
changeset 358550 3c20408d22193e9179d9b092b65f5ea9af54deaf
parent 358549 1b51aa9afd06b56998da103ae853db5cac04ad8f
child 358551 471b374af5aba226c603bc9e1bad08b907ab214e
push id90352
push usercbook@mozilla.com
push dateTue, 16 May 2017 13:09:14 +0000
treeherdermozilla-inbound@8f89d291e303 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskip
bugs1364856
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1364856 - When VRLayerChild receives __delete__, stop sending IPC messages; r=kip MozReview-Commit-ID: 2vKdzipaga0
gfx/vr/ipc/VRLayerChild.cpp
gfx/vr/ipc/VRLayerChild.h
--- a/gfx/vr/ipc/VRLayerChild.cpp
+++ b/gfx/vr/ipc/VRLayerChild.cpp
@@ -83,16 +83,17 @@ VRLayerChild::IsIPCOpen()
 
 void
 VRLayerChild::ClearSurfaces()
 {
   mFront = nullptr;
   mShSurfClient = nullptr;
 }
 
-void
-VRLayerChild::ActorDestroy(ActorDestroyReason aWhy)
+mozilla::ipc::IPCResult
+VRLayerChild::Recv__delete__()
 {
   mIPCOpen = false;
+  return IPC_OK();
 }
 
 } // namespace gfx
 } // namespace mozilla
--- a/gfx/vr/ipc/VRLayerChild.h
+++ b/gfx/vr/ipc/VRLayerChild.h
@@ -35,17 +35,17 @@ public:
   VRLayerChild(uint32_t aVRDisplayID, VRManagerChild* aVRManagerChild);
   void Initialize(dom::HTMLCanvasElement* aCanvasElement);
   void SubmitFrame();
   bool IsIPCOpen();
 
 protected:
   virtual ~VRLayerChild();
   void ClearSurfaces();
-  virtual void ActorDestroy(ActorDestroyReason aWhy) override;
+  virtual mozilla::ipc::IPCResult Recv__delete__() override;
 
   uint32_t mVRDisplayID;
 
   RefPtr<dom::HTMLCanvasElement> mCanvasElement;
   RefPtr<layers::SharedSurfaceTextureClient> mShSurfClient;
   RefPtr<layers::TextureClient> mFront;
   bool mIPCOpen;
 };