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

Unified Diff: src/parsing/scanner.cc

Issue 2536783003: Ensure consistent error handling on 32b/64b platforms. (Closed)
Patch Set: Message test instead of mjsunit. Created 4 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/message/regress/regress-crbug-669017.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/scanner.cc
diff --git a/src/parsing/scanner.cc b/src/parsing/scanner.cc
index 363ab7dfe9915091bae9b1bb7fcbf85b2ad1e8d6..39e0d831e772cbfb07a83ffa0005b0364d006849 100644
--- a/src/parsing/scanner.cc
+++ b/src/parsing/scanner.cc
@@ -1152,7 +1152,8 @@ Token::Value Scanner::ScanNumber(bool seen_period) {
}
if (next_.literal_chars->one_byte_literal().length() <= 10 &&
- value <= Smi::kMaxValue && c0_ != '.' && c0_ != 'e' && c0_ != 'E') {
+ value <= Smi::kMaxValue && c0_ != '.' &&
+ (c0_ == kEndOfInput || !unicode_cache_->IsIdentifierStart(c0_))) {
next_.smi_value_ = static_cast<uint32_t>(value);
literal.Complete();
HandleLeadSurrogate();
« no previous file with comments | « no previous file | test/message/regress/regress-crbug-669017.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698