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

Unified Diff: src/objects.cc

Issue 121173009: String:WriteUtf8: Add REPLACE_INVALID_UTF8 option (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: DISALLOW_INVALID_UTF8 flag and fixes 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: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index aa7f500c8a36198355b85b37a4ae11484f87a15f..f3c94e4e814b468a7256a070603eb662036e7387 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -8312,6 +8312,7 @@ SmartArrayPointer<char> String::ToCString(AllowNullsFlag allow_nulls,
if (allow_nulls == DISALLOW_NULLS && character == 0) {
character = ' ';
}
+ // @TODO Fix this Utf8::Encode call site somehow.
utf8_byte_position +=
unibrow::Utf8::Encode(result + utf8_byte_position, character, last);
last = character;

Powered by Google App Engine
This is Rietveld 408576698