Bug 1393392 P7 - export the VideoDecoderChild::mCanSend information; draft
authorKaku Kuo <kaku@mozilla.com>
Fri, 25 Aug 2017 16:03:15 +0800
changeset 652825 708b0ee70a73e6df5ac3929b3467a375fc6ef2b7
parent 652824 3af17147ce107cbb926582ef6aa8e3a85b02e422
child 652826 237b778ff2be0861528aeeea6b9c0c6e62725e35
push id76161
push userbmo:kaku@mozilla.com
push dateFri, 25 Aug 2017 08:18:23 +0000
bugs1393392
milestone57.0a1
Bug 1393392 P7 - export the VideoDecoderChild::mCanSend information; This is used in next patch to decide if we're closing a remote decoder normally or we're closing because of GPU process crashing. MozReview-Commit-ID: 85MtVO4FTFl
dom/media/ipc/VideoDecoderChild.cpp
dom/media/ipc/VideoDecoderChild.h
--- a/dom/media/ipc/VideoDecoderChild.cpp
+++ b/dom/media/ipc/VideoDecoderChild.cpp
@@ -329,10 +329,16 @@ VideoDecoderManagerChild*
 VideoDecoderChild::GetManager()
 {
   if (!mCanSend) {
     return nullptr;
   }
   return static_cast<VideoDecoderManagerChild*>(Manager());
 }
 
+bool
+VideoDecoderChild::CanSend() const
+{
+  return mCanSend;
+}
+
 } // namespace dom
 } // namespace mozilla
--- a/dom/media/ipc/VideoDecoderChild.h
+++ b/dom/media/ipc/VideoDecoderChild.h
@@ -51,16 +51,18 @@ public:
                 const layers::TextureFactoryIdentifier& aIdentifier);
   void DestroyIPDL();
 
   // Called from IPDL when our actor has been destroyed
   void IPDLActorDestroyed();
 
   VideoDecoderManagerChild* GetManager();
 
+  bool CanSend() const;
+
 private:
   ~VideoDecoderChild();
 
   void AssertOnManagerThread() const;
 
   RefPtr<VideoDecoderChild> mIPDLSelfRef;
   RefPtr<nsIThread> mThread;