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

Unified Diff: base/values.cc

Issue 2475583002: Adds option for JSON reader to allow invalid utf characters (Closed)
Patch Set: cleanup Created 4 years, 1 month 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: base/values.cc
diff --git a/base/values.cc b/base/values.cc
index f00a03f8d3097896b7176052368cfdbb7fbfb8dd..407f9c5edcc55c28dc84436941f55f74a18fd3d2 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -253,7 +253,8 @@ bool FundamentalValue::Equals(const Value* other) const {
StringValue::StringValue(StringPiece in_value)
: Value(TYPE_STRING), value_(in_value.as_string()) {
- DCHECK(IsStringUTF8(in_value));
+ // NOTE: no DCHECK that |in_value| is valid utf-8. We explicitly allow invalid
sky 2016/11/03 19:14:14 My rationale here for removing the DCHECK is that
+ // utf-8.
}
StringValue::StringValue(const string16& in_value)

Powered by Google App Engine
This is Rietveld 408576698