From: sandholm@chromium.org Date: Mon, 3 Jan 2011 10:51:34 +0000 (+0000) Subject: Simplify ScanJsonString. X-Git-Tag: upstream/4.7.83~20719 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cdf948c33dc0dddb5fb3e96d8154884e612c6e0f;p=platform%2Fupstream%2Fv8.git Simplify ScanJsonString. Review URL: http://codereview.chromium.org/6009009 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/scanner.cc b/src/scanner.cc index 38d0b1c..7fd6ef2 100755 --- a/src/scanner.cc +++ b/src/scanner.cc @@ -457,7 +457,7 @@ Token::Value JsonScanner::ScanJsonString() { ASSERT_EQ('"', c0_); Advance(); LiteralScope literal(this); - while (c0_ != '"' && c0_ > 0) { + while (c0_ != '"') { // Check for control character (0x00-0x1f) or unterminated string (<0). if (c0_ < 0x20) return Token::ILLEGAL; if (c0_ != '\\') { @@ -504,9 +504,6 @@ Token::Value JsonScanner::ScanJsonString() { Advance(); } } - if (c0_ != '"') { - return Token::ILLEGAL; - } literal.Complete(); Advance(); return Token::STRING;