Skip to content
Permalink
Browse files
ASSERT in WebCore::TextTrackList::remove when running media/track/tra…
…ck-remove-track.html

https://bugs.webkit.org/show_bug.cgi?id=158071
<rdar://problem/26432041>

Reviewed by Chris Dumez.

No new tests, this prevents media/track/track-remove-track.html from crashing.

* html/track/TextTrackList.cpp:
(TextTrackList::remove): Don't assert when the media element has  been set to null.


Canonical link: https://commits.webkit.org/176189@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201385 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eric-carlson committed May 25, 2016
1 parent 1ec2056 commit e80e054b1476bc71e552c19fe9aa0302cffc72f4
Showing with 14 additions and 1 deletion.
  1. +13 −0 Source/WebCore/ChangeLog
  2. +1 −1 Source/WebCore/html/track/TextTrackList.cpp
@@ -1,3 +1,16 @@
2016-05-25 Eric Carlson <eric.carlson@apple.com>

ASSERT in WebCore::TextTrackList::remove when running media/track/track-remove-track.html
https://bugs.webkit.org/show_bug.cgi?id=158071
<rdar://problem/26432041>

Reviewed by Chris Dumez.

No new tests, this prevents media/track/track-remove-track.html from crashing.

* html/track/TextTrackList.cpp:
(TextTrackList::remove): Don't assert when the media element has been set to null.

2016-05-25 Zalan Bujtas <zalan@apple.com>

Addressing post-review comments on r200971.
@@ -217,7 +217,7 @@ void TextTrackList::remove(TrackBase& track, bool scheduleEvent)

invalidateTrackIndexesAfterTrack(textTrack);

ASSERT(!track.mediaElement() || track.mediaElement() == element());
ASSERT(!track.mediaElement() || !element() || track.mediaElement() == element());
track.setMediaElement(nullptr);

Ref<TrackBase> trackRef = *(*tracks)[index];

0 comments on commit e80e054

Please sign in to comment.