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

Unified Diff: src/scanner.cc

Issue 731953003: Fix one more missing c0_ < 0 check in scanner (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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/regress/regress-crbug-433766.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner.cc
diff --git a/src/scanner.cc b/src/scanner.cc
index bf7c9e39c42222dec3cff7bffd63e1b97f3a5993..3214c6f1c765ac9005d77179b2014224e3190641 100644
--- a/src/scanner.cc
+++ b/src/scanner.cc
@@ -312,8 +312,7 @@ Token::Value Scanner::SkipSourceURLComment() {
void Scanner::TryToParseSourceURLComment() {
// Magic comments are of the form: //[#@]\s<name>=\s*<value>\s*.* and this
// function will just return if it cannot parse a magic comment.
- if (!unicode_cache_->IsWhiteSpace(c0_))
- return;
+ if (c0_ < 0 || !unicode_cache_->IsWhiteSpace(c0_)) return;
Advance();
LiteralBuffer name;
while (c0_ >= 0 && !unicode_cache_->IsWhiteSpaceOrLineTerminator(c0_) &&
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-433766.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698