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

Unified Diff: third_party/WebKit/Source/wtf/text/StringImpl.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/StringImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/text/StringImpl.cpp
diff --git a/third_party/WebKit/Source/wtf/text/StringImpl.cpp b/third_party/WebKit/Source/wtf/text/StringImpl.cpp
index 303ee9d1ddd1707c356393bd1b2eabdde4c4fce9..56b81dabfe350d8e03258d5204c07c00f4dc51b7 100644
--- a/third_party/WebKit/Source/wtf/text/StringImpl.cpp
+++ b/third_party/WebKit/Source/wtf/text/StringImpl.cpp
@@ -682,7 +682,7 @@ static PassRefPtr<StringImpl> caseConvert(const UChar* source16, size_t length,
targetLength = converter(data16, targetLength, source16, length, locale, &status);
if (U_SUCCESS(status)) {
if (length > 0)
- output->truncateAssumingIsolated(targetLength);
+ return output->substring(0, targetLength);
return output.release();
}
if (status != U_BUFFER_OVERFLOW_ERROR)
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698