Bug 1215023. Part 1 - make MediaDecoder::mOwner a const member. We will check mShuttingDown before calling functions of mOwner. r=kinetik.

This commit is contained in:
JW Wang 2015-10-19 13:55:26 +08:00
parent 8f6e7dcf09
commit 6d842ecf29
2 changed files with 1 additions and 3 deletions

View File

@ -478,8 +478,6 @@ MediaDecoder::Shutdown()
ChangeState(PLAY_STATE_SHUTDOWN);
mOwner = nullptr;
MediaShutdownManager::Instance().Unregister(this);
}

View File

@ -868,7 +868,7 @@ protected:
// This should only ever be accessed from the main thread.
// It is set in Init and cleared in Shutdown when the element goes away.
// The decoder does not add a reference the element.
MediaDecoderOwner* mOwner;
MediaDecoderOwner* const mOwner;
// Counters related to decode and presentation of frames.
FrameStatistics mFrameStats;