| Index: Source/core/html/HTMLMediaElement.cpp
|
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
|
| index 4d22096f951810c15135982ae1558a9c438185a2..9c65dc05637971d5e2afa0ae1cc4b72fd9de5714 100644
|
| --- a/Source/core/html/HTMLMediaElement.cpp
|
| +++ b/Source/core/html/HTMLMediaElement.cpp
|
| @@ -1308,14 +1308,20 @@ void HTMLMediaElement::textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue> c
|
| CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, cue.get());
|
| m_cueTree.remove(interval);
|
|
|
| + // Since the cue will be removed from the media element and likely the
|
| + // TextTrack might also be destructed, notifying the region of the cue
|
| + // removal shouldn't be done.
|
| + cue->notifyRegionWhenRemovingDisplayTree(false);
|
| +
|
| size_t index = m_currentlyActiveCues.find(interval);
|
| if (index != kNotFound) {
|
| m_currentlyActiveCues.remove(index);
|
| cue->setIsActive(false);
|
| }
|
| -
|
| cue->removeDisplayTree();
|
| updateActiveTextTrackCues(currentTime());
|
| +
|
| + cue->notifyRegionWhenRemovingDisplayTree(true);
|
| }
|
|
|
|
|
|
|