Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1059)

Unified Diff: Source/core/html/track/vtt/VTTParser.cpp

Issue 941973005: Push cue timeline management out of LoadableTextTrack (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/track/vtt/VTTParser.h ('k') | Source/core/loader/TextTrackLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « Source/core/html/track/vtt/VTTParser.h ('k') | Source/core/loader/TextTrackLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698