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

Unified Diff: Source/wtf/text/WTFString.cpp

Issue 531913002: Ensure that conversions from/to 8bit and 16bit never return null string. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@documentordered
Patch Set: Created 6 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 | « LayoutTests/fast/text/text-transform-quoted-turkish-azeri-lithuanian-and-greek-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/text/WTFString.cpp
diff --git a/Source/wtf/text/WTFString.cpp b/Source/wtf/text/WTFString.cpp
index 1ae107ea6aebee860a7c1c814357bcd5ed5fd4ef..d72969f19a6a82d4f4f9e513510ec2b01ad2749f 100644
--- a/Source/wtf/text/WTFString.cpp
+++ b/Source/wtf/text/WTFString.cpp
@@ -874,7 +874,7 @@ CString String::utf8(UTF8ConversionMode mode) const
String String::make8BitFrom16BitSource(const UChar* source, size_t length)
{
if (!length)
- return String();
+ return emptyString();
LChar* destination;
String result = String::createUninitialized(length, destination);
@@ -887,7 +887,7 @@ String String::make8BitFrom16BitSource(const UChar* source, size_t length)
String String::make16BitFrom8BitSource(const LChar* source, size_t length)
{
if (!length)
- return String();
+ return emptyString();
UChar* destination;
String result = String::createUninitialized(length, destination);
« no previous file with comments | « LayoutTests/fast/text/text-transform-quoted-turkish-azeri-lithuanian-and-greek-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698