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

Unified Diff: third_party/WebKit/Source/wtf/text/StringBuilder.cpp

Issue 1391153004: Make StringImpl's content immutable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bug fix: StringBuffer::release returns m_data directly Created 5 years, 2 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 | « third_party/WebKit/Source/wtf/text/StringBuffer.h ('k') | third_party/WebKit/Source/wtf/text/StringImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/text/StringBuilder.cpp
diff --git a/third_party/WebKit/Source/wtf/text/StringBuilder.cpp b/third_party/WebKit/Source/wtf/text/StringBuilder.cpp
index f3a40bc3a4034c8a84f6452ff521bac0326ac028..c4c831a35853d6918c113193c2fdee27e5566416 100644
--- a/third_party/WebKit/Source/wtf/text/StringBuilder.cpp
+++ b/third_party/WebKit/Source/wtf/text/StringBuilder.cpp
@@ -57,12 +57,6 @@ void StringBuilder::reifyString()
return;
}
- if (m_buffer->hasOneRef()) {
- m_buffer->truncateAssumingIsolated(m_length);
- m_string = m_buffer.release();
- return;
- }
-
m_string = m_buffer->substring(0, m_length);
}
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringBuffer.h ('k') | third_party/WebKit/Source/wtf/text/StringImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698