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
--- 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;