Index: Source/core/html/track/vtt/VTTParser.cpp |
diff --git a/Source/core/html/track/vtt/VTTParser.cpp b/Source/core/html/track/vtt/VTTParser.cpp |
index 8be59eff3ef9e68f12611fb51ab523316da3fc74..33f72013dab1c069f1a718aa017643ed4350e3c2 100644 |
--- a/Source/core/html/track/vtt/VTTParser.cpp |
+++ b/Source/core/html/track/vtt/VTTParser.cpp |
@@ -90,16 +90,16 @@ VTTParser::VTTParser(VTTParserClient* client, Document& document) |
{ |
} |
-void VTTParser::getNewCues(WillBeHeapVector<RefPtrWillBeMember<VTTCue>>& outputCues) |
+void VTTParser::getNewCues(WillBeHeapVector<RefPtrWillBeMember<TextTrackCue>>& outputCues) |
{ |
- outputCues = m_cueList; |
- m_cueList.clear(); |
+ ASSERT(outputCues.isEmpty()); |
+ outputCues.swap(m_cueList); |
} |
void VTTParser::getNewRegions(WillBeHeapVector<RefPtrWillBeMember<VTTRegion>>& outputRegions) |
{ |
- outputRegions = m_regionList; |
- m_regionList.clear(); |
+ ASSERT(outputRegions.isEmpty()); |
+ outputRegions.swap(m_regionList); |
} |
void VTTParser::parseBytes(const char* data, unsigned length) |