Bug 1211766 - Remove AbstractMediaDecoder::GetReentrantMonitor(). r=jya.

This commit is contained in:
JW Wang 2015-09-30 07:04:49 +08:00
parent 48d057951d
commit aadc51ecc8
5 changed files with 1 additions and 28 deletions

View File

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

View File

@ -1269,11 +1269,6 @@ MediaDecoder::SetStateMachine(MediaDecoderStateMachine* aStateMachine)
}
}
ReentrantMonitor&
MediaDecoder::GetReentrantMonitor() {
return mReentrantMonitor;
}
ImageContainer*
MediaDecoder::GetImageContainer()
{

View File

@ -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();

View File

@ -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
{

View File

@ -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<TaskQueue> mTaskQueueIdentity;
nsRefPtr<MediaResource> mResource;
};