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

Unified Diff: src/json-parser.h

Issue 11185050: Make sure the fast case of ScanJsonString bails out to the slow case correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | « no previous file | test/mjsunit/json.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json-parser.h
diff --git a/src/json-parser.h b/src/json-parser.h
index d940c140464bd2c1fe567eeafc75231f39ef2514..80991f0c236cad4886a039be9eccd055040386f5 100644
--- a/src/json-parser.h
+++ b/src/json-parser.h
@@ -580,9 +580,12 @@ Handle<String> JsonParser<seq_ascii>::ScanJsonString() {
uc32 c0 = c0_;
do {
if (c0 == '\\') {
+ c0_ = c0;
+ int beg_pos = position_;
+ position_ = position;
return SlowScanJsonString<SeqAsciiString, char>(source_,
- position_,
- position);
+ beg_pos,
+ position_);
}
if (c0 < 0x20) return Handle<String>::null();
running_hash = StringHasher::AddCharacterCore(running_hash, c0);
« no previous file with comments | « no previous file | test/mjsunit/json.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698