[parser] Temporarily restore RETURN_IF_PARSE_ERROR guarding DCHECK
Bug: chromium:899133, v8:7926 Change-Id: I44121c5e6a5bfc27da30bd574a202a6c579594e5 Reviewed-on: https://chromium-review.googlesource.com/c/1301482 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#57044}
This commit is contained in:
parent
dd9ef71161
commit
da024b5f94
@ -4069,6 +4069,8 @@ void ParserBase<Impl>::ParseFunctionBody(
|
||||
DCHECK_EQ(function_scope, scope());
|
||||
DCHECK_EQ(function_scope, inner_scope->outer_scope());
|
||||
impl()->SetLanguageMode(function_scope, inner_scope->language_mode());
|
||||
// TODO(verwaest): Disable DCHECKs in failure mode?
|
||||
RETURN_IF_PARSE_ERROR_VOID;
|
||||
BlockT init_block = impl()->BuildParameterInitializationBlock(parameters);
|
||||
|
||||
if (is_sloppy(inner_scope->language_mode())) {
|
||||
|
5
test/mjsunit/regress/regress-899133.js
Normal file
5
test/mjsunit/regress/regress-899133.js
Normal file
@ -0,0 +1,5 @@
|
||||
// Copyright 2015 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("let fun = ({a} = {a: 30}) => {", SyntaxError);
|
Loading…
Reference in New Issue
Block a user