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

Unified Diff: Source/modules/websockets/WebSocketHandshake.cpp

Issue 124943003: Remove 'String::append' from some of the blink source. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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
Index: Source/modules/websockets/WebSocketHandshake.cpp
diff --git a/Source/modules/websockets/WebSocketHandshake.cpp b/Source/modules/websockets/WebSocketHandshake.cpp
old mode 100644
new mode 100755
index b0ed328eb15260c46a096eeea958649db3264814..aa53cd75402f62129b067bbc34020d70675da582
--- a/Source/modules/websockets/WebSocketHandshake.cpp
+++ b/Source/modules/websockets/WebSocketHandshake.cpp
@@ -106,7 +106,7 @@ static String trimInputSample(const char* p, size_t len)
{
String s = String(p, std::min<size_t>(len, maxInputSampleSize));
if (len > maxInputSampleSize)
- s.append(horizontalEllipsis);
+ s = String(p, std::min<size_t>(len, maxInputSampleSize)) + horizontalEllipsis;
return s;
}

Powered by Google App Engine
This is Rietveld 408576698