From aadc51ecc89b0bf1df0191b90cbc49471166003f Mon Sep 17 00:00:00 2001 From: JW Wang Date: Wed, 30 Sep 2015 07:04:49 +0800 Subject: [PATCH] Bug 1211766 - Remove AbstractMediaDecoder::GetReentrantMonitor(). r=jya. --- dom/media/AbstractMediaDecoder.h | 4 ---- dom/media/MediaDecoder.cpp | 5 ----- dom/media/MediaDecoder.h | 4 ---- dom/media/webaudio/BufferDecoder.cpp | 9 +-------- dom/media/webaudio/BufferDecoder.h | 7 ------- 5 files changed, 1 insertion(+), 28 deletions(-) diff --git a/dom/media/AbstractMediaDecoder.h b/dom/media/AbstractMediaDecoder.h index 29ca357e912f..b9a150e10ff6 100644 --- a/dom/media/AbstractMediaDecoder.h +++ b/dom/media/AbstractMediaDecoder.h @@ -48,10 +48,6 @@ enum class MediaDecoderEventVisibility : int8_t { class AbstractMediaDecoder : public nsIObserver { public: - // Returns the monitor for other threads to synchronise access to - // state. - virtual ReentrantMonitor& GetReentrantMonitor() = 0; - // A special version of the above for the ogg decoder that is allowed to be // called cross-thread. virtual bool IsOggDecoderShutdown() { return false; } diff --git a/dom/media/MediaDecoder.cpp b/dom/media/MediaDecoder.cpp index b6bf368fad00..a61e89e18011 100644 --- a/dom/media/MediaDecoder.cpp +++ b/dom/media/MediaDecoder.cpp @@ -1269,11 +1269,6 @@ MediaDecoder::SetStateMachine(MediaDecoderStateMachine* aStateMachine) } } -ReentrantMonitor& -MediaDecoder::GetReentrantMonitor() { - return mReentrantMonitor; -} - ImageContainer* MediaDecoder::GetImageContainer() { diff --git a/dom/media/MediaDecoder.h b/dom/media/MediaDecoder.h index 32e110e1d3db..e86d277af95d 100644 --- a/dom/media/MediaDecoder.h +++ b/dom/media/MediaDecoder.h @@ -524,10 +524,6 @@ public: MediaDecoderStateMachine* GetStateMachine() const; void SetStateMachine(MediaDecoderStateMachine* aStateMachine); - // Returns the monitor for other threads to synchronise access to - // state. - ReentrantMonitor& GetReentrantMonitor() override; - // Constructs the time ranges representing what segments of the media // are buffered and playable. virtual media::TimeIntervals GetBuffered(); diff --git a/dom/media/webaudio/BufferDecoder.cpp b/dom/media/webaudio/BufferDecoder.cpp index a2caa5057a66..8d3b5643dcf6 100644 --- a/dom/media/webaudio/BufferDecoder.cpp +++ b/dom/media/webaudio/BufferDecoder.cpp @@ -16,8 +16,7 @@ extern PRLogModuleInfo* gMediaDecoderLog; NS_IMPL_ISUPPORTS0(BufferDecoder) BufferDecoder::BufferDecoder(MediaResource* aResource) - : mReentrantMonitor("BufferDecoder") - , mResource(aResource) + : mResource(aResource) { MOZ_ASSERT(NS_IsMainThread()); MOZ_COUNT_CTOR(BufferDecoder); @@ -39,12 +38,6 @@ BufferDecoder::BeginDecoding(TaskQueue* aTaskQueueIdentity) mTaskQueueIdentity = aTaskQueueIdentity; } -ReentrantMonitor& -BufferDecoder::GetReentrantMonitor() -{ - return mReentrantMonitor; -} - bool BufferDecoder::OnStateMachineTaskQueue() const { diff --git a/dom/media/webaudio/BufferDecoder.h b/dom/media/webaudio/BufferDecoder.h index e8d971d89da0..cd53e2d73df6 100644 --- a/dom/media/webaudio/BufferDecoder.h +++ b/dom/media/webaudio/BufferDecoder.h @@ -31,8 +31,6 @@ public: // This has to be called before decoding begins void BeginDecoding(TaskQueue* aTaskQueueIdentity); - virtual ReentrantMonitor& GetReentrantMonitor() final override; - virtual bool OnStateMachineTaskQueue() const final override; virtual bool OnDecodeTaskQueue() const final override; @@ -67,11 +65,6 @@ public: private: virtual ~BufferDecoder(); - - // This monitor object is not really used to synchronize access to anything. - // It's just there in order for us to be able to override - // GetReentrantMonitor correctly. - ReentrantMonitor mReentrantMonitor; nsRefPtr mTaskQueueIdentity; nsRefPtr mResource; };