| Index: src/parsing/preparser.h
|
| diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
|
| index c803928fd8e30582acf74c3657e3f40f05660241..ecc63c740577789b54aa2465f96861584587e6bc 100644
|
| --- a/src/parsing/preparser.h
|
| +++ b/src/parsing/preparser.h
|
| @@ -1149,8 +1149,14 @@ PreParserStatementList PreParser::ParseEagerFunctionBody(
|
| FunctionLiteral::FunctionType function_type, bool* ok) {
|
| ParsingModeScope parsing_mode(this, PARSE_EAGERLY);
|
|
|
| - ParseStatementList(Token::RBRACE, ok);
|
| - if (!*ok) return PreParserStatementList();
|
| + Scope* inner_scope = scope_;
|
| + if (!parameters.is_simple) inner_scope = NewScope(scope_, BLOCK_SCOPE);
|
| +
|
| + {
|
| + BlockState block_state(&scope_, inner_scope);
|
| + ParseStatementList(Token::RBRACE, ok);
|
| + if (!*ok) return PreParserStatementList();
|
| + }
|
|
|
| Expect(Token::RBRACE, ok);
|
| return PreParserStatementList();
|
|
|