diff --git a/content/media/MediaDecoder.cpp b/content/media/MediaDecoder.cpp index 0b5db4272d7d..a43302761142 100644 --- a/content/media/MediaDecoder.cpp +++ b/content/media/MediaDecoder.cpp @@ -1019,8 +1019,13 @@ void MediaDecoder::NotifyPrincipalChanged() void MediaDecoder::NotifyBytesConsumed(int64_t aBytes, int64_t aOffset) { + MOZ_ASSERT(NS_IsMainThread()); + if (mShuttingDown) { + return; + } + ReentrantMonitorAutoEnter mon(GetReentrantMonitor()); - NS_ENSURE_TRUE_VOID(mDecoderStateMachine); + MOZ_ASSERT(mDecoderStateMachine); if (mIgnoreProgressData) { return; }