Commit c8cbf23a authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[scanner] Reset invalid_template_escape_message during Bookmark::Apply

Bug: chromium:905587
Change-Id: I168fdfd433edcda61dcefd0df9df8a12c5294339
Reviewed-on: https://chromium-review.googlesource.com/c/1340040
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57568}
parent b3614b00
......@@ -1168,7 +1168,10 @@ void Scanner::SeekNext(size_t position) {
// 1, Reset the current_, next_ and next_next_ tokens
// (next_ + next_next_ will be overwrittem by Next(),
// current_ will remain unchanged, so overwrite it fully.)
for (TokenDesc& token : token_storage_) token.token = Token::UNINITIALIZED;
for (TokenDesc& token : token_storage_) {
token.token = Token::UNINITIALIZED;
token.invalid_template_escape_message = MessageTemplate::kNone;
}
// 2, reset the source to the desired position,
source_->Seek(position);
// 3, re-scan, by scanning the look-ahead char + 1 token (next_).
......
// Copyright 2018 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.
assertThrows("function test() { '\\u`''\\u' }", SyntaxError)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment