[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: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#57186}
This commit is contained in:
parent
322d5978f4
commit
9bd6e601cb
@ -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);
|
||||
}
|
||||
|
5
test/mjsunit/regress/regress-900585.js
Normal file
5
test/mjsunit/regress/regress-900585.js
Normal file
@ -0,0 +1,5 @@
|
||||
// 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);
|
Loading…
Reference in New Issue
Block a user