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

Unified Diff: src/json-stringifier.h

Issue 740673002: Do fewer encoding checks in FlatStringReader used in the JSON stringifier. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix windows build Created 6 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
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json-stringifier.h
diff --git a/src/json-stringifier.h b/src/json-stringifier.h
index 4cdf31e45696f08f0a90c4fc31cc26948c09ff72..cbceaaead79c9c1a2f4efdc80fecae95a729089b 100644
--- a/src/json-stringifier.h
+++ b/src/json-stringifier.h
@@ -641,7 +641,7 @@ void BasicJsonStringifier::SerializeString_(Handle<String> string) {
} else {
FlatStringReader reader(isolate_, string);
for (int i = 0; i < reader.length(); i++) {
- SrcChar c = static_cast<SrcChar>(reader.Get(i));
+ SrcChar c = reader.Get<SrcChar>(i);
if (DoNotEscape(c)) {
builder_.Append<SrcChar, DestChar>(c);
} else {
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698