| Index: Source/core/html/HTMLMediaElement.cpp
|
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
|
| index 15c5c2119c09681ae4ad868ea87640d4fdc811db..d96bea5d3c3dcd40fba477b175f46ec53b65bc82 100644
|
| --- a/Source/core/html/HTMLMediaElement.cpp
|
| +++ b/Source/core/html/HTMLMediaElement.cpp
|
| @@ -1318,14 +1318,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);
|
| }
|
|
|
|
|
|
|