Index: Source/core/html/track/TextTrackList.cpp |
diff --git a/Source/core/html/track/TextTrackList.cpp b/Source/core/html/track/TextTrackList.cpp |
index 348d4abcb79586c940ff92d0e3427342c149845a..470cd164c6bcd09f1fb5568cd9c32fa9665d769a 100644 |
--- a/Source/core/html/track/TextTrackList.cpp |
+++ b/Source/core/html/track/TextTrackList.cpp |
@@ -45,13 +45,15 @@ TextTrackList::TextTrackList(HTMLMediaElement* owner) |
TextTrackList::~TextTrackList() |
{ |
+#if !ENABLE(OILPAN) |
ASSERT(!m_owner); |
- |
+#endif |
m_asyncEventQueue->close(); |
- |
+#if !ENABLE(OILPAN) |
for (unsigned i = 0; i < length(); ++i) { |
item(i)->setTrackList(0); |
} |
+#endif |
} |
unsigned TextTrackList::length() const |
@@ -153,7 +155,7 @@ TextTrack* TextTrackList::getTrackById(const AtomicString& id) |
void TextTrackList::invalidateTrackIndexesAfterTrack(TextTrack* track) |
{ |
- Vector<RefPtr<TextTrack> >* tracks = 0; |
+ WillBeHeapVector<RefPtrWillBeMember<TextTrack> >* tracks = 0; |
if (track->trackType() == TextTrack::TrackElement) { |
tracks = &m_elementTracks; |
@@ -178,9 +180,9 @@ void TextTrackList::invalidateTrackIndexesAfterTrack(TextTrack* track) |
tracks->at(index)->invalidateTrackIndex(); |
} |
-void TextTrackList::append(PassRefPtr<TextTrack> prpTrack) |
+void TextTrackList::append(PassRefPtrWillBeRawPtr<TextTrack> prpTrack) |
{ |
- RefPtr<TextTrack> track = prpTrack; |
+ RefPtrWillBeRawPtr<TextTrack> track = prpTrack; |
if (track->trackType() == TextTrack::AddTrack) |
m_addTrackTracks.append(track); |
@@ -205,7 +207,7 @@ void TextTrackList::append(PassRefPtr<TextTrack> prpTrack) |
void TextTrackList::remove(TextTrack* track) |
{ |
- Vector<RefPtr<TextTrack> >* tracks = 0; |
+ WillBeHeapVector<RefPtrWillBeMember<TextTrack> >* tracks = 0; |
if (track->trackType() == TextTrack::TrackElement) { |
tracks = &m_elementTracks; |
@@ -241,7 +243,7 @@ void TextTrackList::removeAllInbandTracks() |
bool TextTrackList::contains(TextTrack* track) const |
{ |
- const Vector<RefPtr<TextTrack> >* tracks = 0; |
+ const WillBeHeapVector<RefPtrWillBeMember<TextTrack> >* tracks = 0; |
if (track->trackType() == TextTrack::TrackElement) |
tracks = &m_elementTracks; |
@@ -266,12 +268,14 @@ ExecutionContext* TextTrackList::executionContext() const |
return m_owner->executionContext(); |
} |
+#if !ENABLE(OILPAN) |
void TextTrackList::clearOwner() |
{ |
- m_owner = 0; |
+ m_owner = nullptr; |
} |
+#endif |
-void TextTrackList::scheduleTrackEvent(const AtomicString& eventName, PassRefPtr<TextTrack> track) |
+void TextTrackList::scheduleTrackEvent(const AtomicString& eventName, PassRefPtrWillBeRawPtr<TextTrack> track) |
{ |
TrackEventInit initializer; |
initializer.track = track; |
@@ -281,7 +285,7 @@ void TextTrackList::scheduleTrackEvent(const AtomicString& eventName, PassRefPtr |
m_asyncEventQueue->enqueueEvent(TrackEvent::create(eventName, initializer)); |
} |
-void TextTrackList::scheduleAddTrackEvent(PassRefPtr<TextTrack> track) |
+void TextTrackList::scheduleAddTrackEvent(PassRefPtrWillBeRawPtr<TextTrack> track) |
{ |
// 4.8.10.12.3 Sourcing out-of-band text tracks |
// 4.8.10.12.4 Text track API |
@@ -309,7 +313,7 @@ void TextTrackList::scheduleChangeEvent() |
m_asyncEventQueue->enqueueEvent(Event::create(EventTypeNames::change, initializer)); |
} |
-void TextTrackList::scheduleRemoveTrackEvent(PassRefPtr<TextTrack> track) |
+void TextTrackList::scheduleRemoveTrackEvent(PassRefPtrWillBeRawPtr<TextTrack> track) |
{ |
// 4.8.10.12.3 Sourcing out-of-band text tracks |
// When a track element's parent element changes and the old parent was a |
@@ -327,3 +331,11 @@ HTMLMediaElement* TextTrackList::owner() const |
{ |
return m_owner; |
} |
+ |
+void TextTrackList::trace(Visitor* visitor) |
+{ |
+ visitor->trace(m_owner); |
+ visitor->trace(m_addTrackTracks); |
+ visitor->trace(m_elementTracks); |
+ visitor->trace(m_inbandTracks); |
+} |