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

Unified Diff: Source/core/html/track/WebVTTTokenizer.cpp

Issue 23903041: Make the Vector copy constructor for mismatched inline sizes explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review feedback. Created 7 years, 3 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/css/StylePropertySet.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/WebVTTTokenizer.cpp
diff --git a/Source/core/html/track/WebVTTTokenizer.cpp b/Source/core/html/track/WebVTTTokenizer.cpp
index b2c30e78d740fb21fd657d5bb5f78c73fe976d8a..f290cb67e272ee517297d3703ada8d2b429d9cd1 100644
--- a/Source/core/html/track/WebVTTTokenizer.cpp
+++ b/Source/core/html/track/WebVTTTokenizer.cpp
@@ -83,8 +83,10 @@ bool WebVTTTokenizer::nextToken(SegmentedString& source, WebVTTToken& token)
m_buffer.append(static_cast<LChar>(cc));
WEBVTT_ADVANCE_TO(EscapeState);
} else if (cc == '<') {
+ // FIXME: the explicit Vector conversion copies into a temporary
+ // and is wasteful.
if (m_token->type() == WebVTTTokenTypes::Uninitialized
- || vectorEqualsString<UChar>(m_token->characters(), emptyString()))
+ || vectorEqualsString<UChar>(Vector<UChar, 32>(m_token->characters()), emptyString()))
WEBVTT_ADVANCE_TO(TagState);
else
return emitAndResumeIn(source, WebVTTTokenizerState::TagState);
« no previous file with comments | « Source/core/css/StylePropertySet.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698