Chromium Code Reviews| Index: src/parser.cc |
| diff --git a/src/parser.cc b/src/parser.cc |
| index dc8cec240fa8f9329519eafacd6c9f7b71c2e107..6df216dc32c4d4406086f98fc84e511afcb32b98 100644 |
| --- a/src/parser.cc |
| +++ b/src/parser.cc |
| @@ -1334,7 +1334,7 @@ Statement* Parser::ParseStatement(ZoneStringList* labels, bool* ok) { |
| // FunctionDeclaration |
| // Common language extension is to allow function declaration in place |
| // of any statement. This language extension is disabled in strict mode. |
| - if (top_scope_->is_strict_mode()) { |
| + if (top_scope_->is_strict_mode() || harmony_scoping_) { |
|
Lasse Reichstein
2011/10/17 11:31:45
Ditto for the preparser?
Steven
2011/10/17 11:57:22
Oops, indeed. Done.
On 2011/10/17 11:31:45, Lasse
|
| ReportMessageAt(scanner().peek_location(), "strict_function", |
| Vector<const char*>::empty()); |
| *ok = false; |