Bug 1301675 - Uncomment assertion for when removed live track was not found. r=jib

It needs an extra guard for when we're an audio element and a live video track
was removed. That's ok and we should ignore it.

MozReview-Commit-ID: FVw3lDKd4oU
This commit is contained in:
Andreas Pehrson
2016-09-23 16:56:39 +02:00
parent 938762071c
commit a3454bf495

View File

@@ -4273,10 +4273,10 @@ HTMLMediaElement::NotifyMediaStreamTrackRemoved(const RefPtr<MediaStreamTrack>&
} else if (MediaTrack* t = VideoTracks()->GetTrackById(id)) {
VideoTracks()->RemoveTrack(t);
} else {
// XXX (bug 1208328) Uncomment this when DOMMediaStream doesn't call
// NotifyTrackRemoved multiple times for the same track, i.e., when it
// implements the "addtrack" and "removetrack" events.
// NS_ASSERTION(false, "MediaStreamTrack ended but did not exist in track lists");
NS_ASSERTION(aTrack->AsVideoStreamTrack() && !IsVideo(),
"MediaStreamTrack ended but did not exist in track lists. "
"This is only allowed if a video element ends and we are an "
"audio element.");
return;
}
}