mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
Initialize the state machine task queue in the initializer list
This commit is contained in:
@@ -203,6 +203,7 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
|
||||
MediaDecoderReader* aReader,
|
||||
bool aRealTime) :
|
||||
mDecoder(aDecoder),
|
||||
mTaskQueue(new MediaTaskQueue(GetMediaThreadPool(), /* aAssertTailDispatch = */ true)),
|
||||
mWatchManager(this),
|
||||
mRealTime(aRealTime),
|
||||
mDispatchedStateMachine(false),
|
||||
@@ -252,11 +253,6 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
|
||||
MOZ_COUNT_CTOR(MediaDecoderStateMachine);
|
||||
NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
|
||||
|
||||
// Set up our task queue.
|
||||
RefPtr<SharedThreadPool> pool(GetMediaThreadPool());
|
||||
MOZ_DIAGNOSTIC_ASSERT(pool);
|
||||
mTaskQueue = new MediaTaskQueue(pool.forget(), /* aAssertTailDispatch = */ true);
|
||||
|
||||
// Initialize canonicals.
|
||||
mNextFrameStatus.Init(mTaskQueue, MediaDecoderOwner::NEXT_FRAME_UNINITIALIZED,
|
||||
"MediaDecoderStateMachine::mNextFrameStatus (Canonical)");
|
||||
|
||||
Reference in New Issue
Block a user