[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:
Toon Verwaest 2018-10-26 16:26:24 +02:00 committed by Commit Bot
parent dd9ef71161
commit da024b5f94
2 changed files with 7 additions and 0 deletions

View File

@ -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())) {

View 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);