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

Unified Diff: Source/core/fetch/ScriptResource.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/core/fetch/ScriptResource.cpp
diff --git a/Source/core/fetch/ScriptResource.cpp b/Source/core/fetch/ScriptResource.cpp
old mode 100644
new mode 100755
index 873ef3322722f711ff22d971252932b792fd5174..8dbc2d3f4da91642bd8835924fc471a86b35ddfe
--- a/Source/core/fetch/ScriptResource.cpp
+++ b/Source/core/fetch/ScriptResource.cpp
@@ -71,8 +71,7 @@ const String& ScriptResource::script()
ASSERT(isLoaded());
if (!m_script && m_data) {
- String script = m_decoder->decode(m_data->data(), encodedSize());
- script.append(m_decoder->flush());
+ String script = m_decoder->decode(m_data->data(), encodedSize()) + m_decoder->flush();
m_data.clear();
// We lie a it here and claim that script counts as encoded data (even though it's really decoded data).
// That's because the MemoryCache thinks that it can clear out decoded data by calling destroyDecodedData(),

Powered by Google App Engine
This is Rietveld 408576698