diff --git a/dom/media/ipc/RemoteDecoderManagerChild.cpp b/dom/media/ipc/RemoteDecoderManagerChild.cpp index a473f011b0fc..3e1ab2041341 100644 --- a/dom/media/ipc/RemoteDecoderManagerChild.cpp +++ b/dom/media/ipc/RemoteDecoderManagerChild.cpp @@ -156,10 +156,10 @@ void RemoteDecoderManagerChild::OpenForRDDProcess( // ipdl if: // 1) haven't init'd sRemoteDecoderManagerChild // or - // 2) if ActorDestroy was called (mCanSend is false) meaning the other - // end of the ipc channel was torn down + // 2) if ActorDestroy was called meaning the other end of the ipc channel was + // torn down if (sRemoteDecoderManagerChildForRDDProcess && - sRemoteDecoderManagerChildForRDDProcess->mCanSend) { + sRemoteDecoderManagerChildForRDDProcess->CanSend()) { return; } sRemoteDecoderManagerChildForRDDProcess = nullptr; @@ -193,21 +193,11 @@ void RemoteDecoderManagerChild::OpenForGPUProcess( } void RemoteDecoderManagerChild::InitIPDL() { - mCanSend = true; mIPDLSelfRef = this; } -void RemoteDecoderManagerChild::ActorDestroy(ActorDestroyReason aWhy) { - mCanSend = false; -} - void RemoteDecoderManagerChild::ActorDealloc() { mIPDLSelfRef = nullptr; } -bool RemoteDecoderManagerChild::CanSend() { - MOZ_ASSERT(NS_GetCurrentThread() == GetManagerThread()); - return mCanSend; -} - bool RemoteDecoderManagerChild::DeallocShmem(mozilla::ipc::Shmem& aShmem) { if (NS_GetCurrentThread() != sRemoteDecoderManagerChildThread) { RefPtr self = this; diff --git a/dom/media/ipc/RemoteDecoderManagerChild.h b/dom/media/ipc/RemoteDecoderManagerChild.h index 0bc1bb72fe17..fe49ae43fa34 100644 --- a/dom/media/ipc/RemoteDecoderManagerChild.h +++ b/dom/media/ipc/RemoteDecoderManagerChild.h @@ -63,13 +63,11 @@ class RemoteDecoderManagerChild final // called from the manager thread. void RunWhenGPUProcessRecreated(already_AddRefed aTask); - bool CanSend(); layers::VideoBridgeSource GetSource() const { return mSource; } protected: void InitIPDL(); - void ActorDestroy(ActorDestroyReason aWhy) override; void ActorDealloc() override; void HandleFatalError(const char* aMsg) const override; @@ -97,9 +95,6 @@ class RemoteDecoderManagerChild final // The associated source of this decoder manager layers::VideoBridgeSource mSource; - - // Should only ever be accessed on the manager thread. - bool mCanSend = false; }; } // namespace mozilla