Index: Source/core/html/track/TextTrack.cpp |
diff --git a/Source/core/html/track/TextTrack.cpp b/Source/core/html/track/TextTrack.cpp |
index 5789476a8f848fd66ba5818692bb11e87bcb4c15..4c5de8448173c4444c5ef8b8c0d2cb500d262b02 100644 |
--- a/Source/core/html/track/TextTrack.cpp |
+++ b/Source/core/html/track/TextTrack.cpp |
@@ -100,7 +100,7 @@ TextTrack::TextTrack(Document& document, const AtomicString& kind, const AtomicS |
, m_cues(nullptr) |
, m_regions(nullptr) |
, m_document(&document) |
- , m_trackList(0) |
+ , m_trackList(nullptr) |
, m_mode(disabledKeyword()) |
, m_trackType(type) |
, m_readinessState(NotLoaded) |
@@ -114,6 +114,7 @@ TextTrack::TextTrack(Document& document, const AtomicString& kind, const AtomicS |
TextTrack::~TextTrack() |
{ |
+#if !ENABLE(OILPAN) |
ASSERT(!m_trackList); |
if (m_cues) { |
@@ -125,6 +126,7 @@ TextTrack::~TextTrack() |
for (size_t i = 0; i < m_regions->length(); ++i) |
m_regions->item(i)->setTrack(0); |
} |
haraken
2014/04/21 01:30:54
Actually I don't fully understand the relationship
sof
2014/04/21 15:23:42
Cues and regions for a text track are explicitly a
haraken
2014/04/22 02:37:47
Thanks for the detailed explanation. You explanati
sof
2014/04/22 06:27:51
That is a good observation. As the pointers in the
|
+#endif |
} |
bool TextTrack::isValidKindKeyword(const AtomicString& value) |
@@ -224,12 +226,12 @@ TextTrackCueList* TextTrack::activeCues() const |
return 0; |
} |
-void TextTrack::addCue(PassRefPtr<TextTrackCue> prpCue) |
+void TextTrack::addCue(PassRefPtrWillBeRawPtr<TextTrackCue> prpCue) |
{ |
if (!prpCue) |
return; |
- RefPtr<TextTrackCue> cue = prpCue; |
+ RefPtrWillBeRawPtr<TextTrackCue> cue = prpCue; |
// TODO(93143): Add spec-compliant behavior for negative time values. |
if (std::isnan(cue->startTime()) || std::isnan(cue->endTime()) || cue->startTime() < 0 || cue->endTime() < 0) |
@@ -301,12 +303,12 @@ VTTRegionList* TextTrack::regions() |
return 0; |
} |
-void TextTrack::addRegion(PassRefPtr<VTTRegion> prpRegion) |
+void TextTrack::addRegion(PassRefPtrWillBeRawPtr<VTTRegion> prpRegion) |
{ |
if (!prpRegion) |
return; |
- RefPtr<VTTRegion> region = prpRegion; |
+ RefPtrWillBeRawPtr<VTTRegion> region = prpRegion; |
VTTRegionList* regionList = ensureVTTRegionList(); |
// 1. If the given region is in a text track list of regions, then remove |
@@ -433,4 +435,12 @@ HTMLMediaElement* TextTrack::mediaElement() |
return m_trackList ? m_trackList->owner() : 0; |
} |
+void TextTrack::trace(Visitor* visitor) |
+{ |
+ visitor->trace(m_cues); |
+ visitor->trace(m_regions); |
+ visitor->trace(m_trackList); |
+ TrackBase::trace(visitor); |
+} |
+ |
} // namespace WebCore |