Index: src/json-parser.h |
diff --git a/src/json-parser.h b/src/json-parser.h |
index 2f980cc05b22d53e4471952e2d219459bed3fee0..5d2fae4c930a851ee1f0992767e0cafc00c2a33d 100644 |
--- a/src/json-parser.h |
+++ b/src/json-parser.h |
@@ -631,7 +631,17 @@ Handle<String> JsonParser<seq_ascii>::ScanJsonString() { |
position_); |
} |
if (c0 < 0x20) return Handle<String>::null(); |
- running_hash = StringHasher::AddCharacterCore(running_hash, c0); |
+ if (static_cast<uint32_t>(c0) > |
+ unibrow::Utf16::kMaxNonSurrogateCharCode) { |
+ running_hash = |
+ StringHasher::AddCharacterCore(running_hash, |
+ unibrow::Utf16::LeadSurrogate(c0)); |
+ running_hash = |
+ StringHasher::AddCharacterCore(running_hash, |
+ unibrow::Utf16::TrailSurrogate(c0)); |
+ } else { |
+ running_hash = StringHasher::AddCharacterCore(running_hash, c0); |
+ } |
position++; |
if (position >= source_length_) return Handle<String>::null(); |
c0 = seq_source_->SeqOneByteStringGet(position); |