Ensure consistent error handling on 32b/64b platforms.
BUG=chromium:669017 Review-Url: https://codereview.chromium.org/2536783003 Cr-Commit-Position: refs/heads/master@{#41364}
This commit is contained in:
parent
8fcfe66f94
commit
c44008b01f
@ -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();
|
||||
|
5
test/message/regress/regress-crbug-669017.js
Normal file
5
test/message/regress/regress-crbug-669017.js
Normal file
@ -0,0 +1,5 @@
|
||||
// Copyright 2016 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
1073741824O0
|
8
test/message/regress/regress-crbug-669017.out
Normal file
8
test/message/regress/regress-crbug-669017.out
Normal file
@ -0,0 +1,8 @@
|
||||
# Copyright 2016 the V8 project authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
*%(basename)s:5: SyntaxError: Invalid or unexpected token
|
||||
1073741824O0
|
||||
^^^^^^^^^^
|
||||
SyntaxError: Invalid or unexpected token
|
Loading…
Reference in New Issue
Block a user