| Index: Source/core/html/track/TextTrackCueList.cpp
|
| diff --git a/Source/core/html/track/TextTrackCueList.cpp b/Source/core/html/track/TextTrackCueList.cpp
|
| index 40052b9b4aef97ea42f7f0571ba537dd3492b12b..646a818fddc3f9e470c458ef5d5b9cf06b2a0959 100644
|
| --- a/Source/core/html/track/TextTrackCueList.cpp
|
| +++ b/Source/core/html/track/TextTrackCueList.cpp
|
| @@ -62,18 +62,13 @@ TextTrackCue* TextTrackCueList::getCueById(const AtomicString& id) const
|
| return nullptr;
|
| }
|
|
|
| -TextTrackCueList* TextTrackCueList::activeCues()
|
| +void TextTrackCueList::collectActiveCues(TextTrackCueList& activeCues) const
|
| {
|
| - if (!m_activeCues)
|
| - m_activeCues = create();
|
| -
|
| - m_activeCues->clear();
|
| - for (size_t i = 0; i < m_list.size(); ++i) {
|
| - RefPtrWillBeRawPtr<TextTrackCue> cue = m_list[i];
|
| + activeCues.clear();
|
| + for (auto& cue : m_list) {
|
| if (cue->isActive())
|
| - m_activeCues->add(cue);
|
| + activeCues.add(cue);
|
| }
|
| - return m_activeCues.get();
|
| }
|
|
|
| bool TextTrackCueList::add(PassRefPtrWillBeRawPtr<TextTrackCue> cue)
|
| @@ -153,7 +148,6 @@ void TextTrackCueList::invalidateCueIndexes(size_t start)
|
| DEFINE_TRACE(TextTrackCueList)
|
| {
|
| visitor->trace(m_list);
|
| - visitor->trace(m_activeCues);
|
| }
|
|
|
| } // namespace blink
|
|
|