Commit 9bd6e601 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[parser] Don't rewrite if we're in error state

Bug: chromium:900585
Change-Id: I2f6045ce23af9a15baddc73127b0c4e3e514841c
Reviewed-on: https://chromium-review.googlesource.com/c/1310294
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57186}
parent 322d5978
......@@ -134,6 +134,7 @@ void Parser::DeclareAndInitializeVariables(
Block* block, const DeclarationDescriptor* declaration_descriptor,
const DeclarationParsingResult::Declaration* declaration,
ZonePtrList<const AstRawString>* names) {
if (has_error()) return;
PatternRewriter::DeclareAndInitializeVariables(
this, block, declaration_descriptor, declaration, names);
}
......
// 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("/*for..in*/for(var [x5, functional] = this = function(id) { return id } in false) var x2, x;", ReferenceError);
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