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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user