Chromium Code Reviews| Index: src/preparser.cc |
| diff --git a/src/preparser.cc b/src/preparser.cc |
| index 6cf0f1db4589797c2f2eaa5affe46167d0412636..93810fdba653ec27485ef94c8b062af6638abc9f 100644 |
| --- a/src/preparser.cc |
| +++ b/src/preparser.cc |
| @@ -1004,9 +1004,8 @@ PreParserExpression PreParser::ParseClassLiteral( |
| scope_->SetStrictMode(STRICT); |
| scope_->SetScopeName(name); |
| - if (Check(Token::EXTENDS)) { |
| - ParseLeftHandSideExpression(CHECK_OK); |
| - } |
| + bool has_extends = Check(Token::EXTENDS); |
| + if (has_extends) ParseLeftHandSideExpression(CHECK_OK); |
|
rossberg
2015/02/03 15:52:42
Actually, I just realised that you need to put bra
Dmitry Lomov (no reviews)
2015/02/03 15:59:13
Good catch, done.
|
| ClassLiteralChecker checker(this); |
| bool has_seen_constructor = false; |
| @@ -1018,8 +1017,8 @@ PreParserExpression PreParser::ParseClassLiteral( |
| const bool is_static = false; |
| bool is_computed_name = false; // Classes do not care about computed |
| // property names here. |
| - ParsePropertyDefinition(&checker, in_class, is_static, &is_computed_name, |
| - &has_seen_constructor, CHECK_OK); |
| + ParsePropertyDefinition(&checker, in_class, has_extends, is_static, |
| + &is_computed_name, &has_seen_constructor, CHECK_OK); |
| } |
| Expect(Token::RBRACE, CHECK_OK); |