Bug 1292449. Part 1 - Assert IsShutdown() is false in NotifyDataArrived().
1. Called from SourceBuffer::AppendDataCompletedWithSuccess() where mMediaSource->GetDecoder() is not null so this must happen before Shutdown().
2. Called from SourceBuffer::Ended() where mMediaSource->GetDecoder() is not null.
3. Called from MediaDecoder::ResourceCallback::TimerCallback() which is canceled in Disconnect().
MozReview-Commit-ID: 5dqVuOcrABy
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1647,22 +1647,17 @@ void MediaDecoder::AddSizeOfResources(Re
if (GetResource()) {
aSizes->mByteSize += GetResource()->SizeOfIncludingThis(aSizes->mMallocSizeOf);
}
}
void
MediaDecoder::NotifyDataArrived() {
MOZ_ASSERT(NS_IsMainThread());
-
- // Don't publish events since task queues might be shutting down.
- if (IsShutdown()) {
- return;
- }
-
+ MOZ_ASSERT(!IsShutdown());
mDataArrivedEvent.Notify();
}
// Provide access to the state machine object
MediaDecoderStateMachine*
MediaDecoder::GetStateMachine() const {
MOZ_ASSERT(NS_IsMainThread());
return mDecoderStateMachine;