[scanner] Fix string scanning corner-case
No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: I287197c8603e9e550d7f4832c1f85009136f4bb0 Reviewed-on: https://chromium-review.googlesource.com/c/1329961 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#57407}
This commit is contained in:
parent
233cb0bfc6
commit
f4a586f06e
@ -548,6 +548,7 @@ Token::Value Scanner::ScanString() {
|
||||
|
||||
LiteralScope literal(this);
|
||||
while (true) {
|
||||
if (V8_UNLIKELY(c0_ == kEndOfInput)) return Token::ILLEGAL;
|
||||
if ((V8_UNLIKELY(static_cast<uint32_t>(c0_) >= kMaxAscii) &&
|
||||
!unibrow::IsStringLiteralLineTerminator(c0_)) ||
|
||||
!MayTerminateString(character_scan_flags[c0_])) {
|
||||
|
Loading…
Reference in New Issue
Block a user