diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h index 2af0b964c7..b74f5af7eb 100644 --- a/src/parsing/parser-base.h +++ b/src/parsing/parser-base.h @@ -4069,6 +4069,8 @@ void ParserBase::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())) { diff --git a/test/mjsunit/regress/regress-899133.js b/test/mjsunit/regress/regress-899133.js new file mode 100644 index 0000000000..4e11d49160 --- /dev/null +++ b/test/mjsunit/regress/regress-899133.js @@ -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);