Bug 1289976. Part 6 - Remove the IsShutdown() check from MediaDecoder::RemoveMediaTracks(). r?kaku
1. It is called from ChangeState() when IsEnded() is true.
2. It is called from OnMetadataUpdate(). The callback is disconnected in Shutdown().
MozReview-Commit-ID: 8m4jtcl91hT
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1887,20 +1887,17 @@ MediaDecoder::ConstructMediaTracks()
track->SetEnabledInternal(info.mEnabled, MediaTrack::FIRE_NO_EVENTS);
}
}
void
MediaDecoder::RemoveMediaTracks()
{
MOZ_ASSERT(NS_IsMainThread());
-
- if (IsShutdown()) {
- return;
- }
+ MOZ_ASSERT(!IsShutdown());
HTMLMediaElement* element = mOwner->GetMediaElement();
if (!element) {
return;
}
AudioTrackList* audioList = element->AudioTracks();
if (audioList) {