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

Unified Diff: src/preparser.cc

Issue 16549003: Fix crasher when checking for "of", but next token has no literal buffer (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test suite (thanks Michael) Created 7 years, 6 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 | src/scanner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index 243a3ed34c52e20ca31b48d4bcffadd25bc8c8dd..828177aee0a696ddf51c75b2ca7867aacc163522 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -662,6 +662,7 @@ PreParser::Statement PreParser::ParseWhileStatement(bool* ok) {
bool PreParser::CheckInOrOf() {
if (peek() == i::Token::IN ||
(allow_for_of() &&
+ peek() == i::Token::IDENTIFIER &&
scanner_->is_next_contextual_keyword(v8::internal::CStrVector("of")))) {
Next();
return true;
« no previous file with comments | « no previous file | src/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698