Reviewers: Yang,
Message:
PTAL
Description:
The expected key is a valid identifier, which is already free of \\,
<0x20, ".
BUG=
Please review this at https://codereview.chromium.org/936613006/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+2, -4 lines):
M src/json-parser.h
Index: src/json-parser.h
diff --git a/src/json-parser.h b/src/json-parser.h
index
61043db307290e5996cda7d5ed98741bba37e74f..9a22738e98d9ae806366d94da030a345b10fed63
100644
--- a/src/json-parser.h
+++ b/src/json-parser.h
@@ -108,10 +108,8 @@ class JsonParser BASE_EMBEDDED {
const uint8_t* expected_chars = content.ToOneByteVector().start();
for (int i = 0; i < length; i++) {
uint8_t c0 = input_chars[i];
- if (c0 != expected_chars[i] ||
- c0 == '"' || c0 < 0x20 || c0 == '\\') {
- return false;
- }
+ // The expected string has to be free of \, " and characters <
0x20.
+ if (c0 != expected_chars[i]) return false;
}
if (input_chars[length] == '"') {
position_ = position_ + length + 1;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.