зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1300390 - Add more assertions to MediaFormatReader to clarify threading model. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D65672 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
f1ffb8000a
Коммит
5cbd62da48
|
@ -99,6 +99,8 @@ void MediaFormatReader::ShutdownPromisePool::Track(
|
|||
}
|
||||
|
||||
void MediaFormatReader::DecoderData::ShutdownDecoder() {
|
||||
MOZ_ASSERT(mOwner->OnTaskQueue());
|
||||
|
||||
MutexAutoLock lock(mMutex);
|
||||
|
||||
if (!mDecoder) {
|
||||
|
@ -131,6 +133,8 @@ void MediaFormatReader::DecoderData::ShutdownDecoder() {
|
|||
}
|
||||
|
||||
void MediaFormatReader::DecoderData::Flush() {
|
||||
MOZ_ASSERT(mOwner->OnTaskQueue());
|
||||
|
||||
if (mFlushing || mFlushed) {
|
||||
// Flush still pending or already flushed, nothing more to do.
|
||||
return;
|
||||
|
|
Загрузка…
Ссылка в новой задаче