Chromium Code Reviews| Index: src/parsing/parser.cc |
| diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
| index e978f0b6b4ed311c5c55229dbe4ce41f31b12b88..2fdd9db5b0cf71dd3d504414b96d795dfe39f47e 100644 |
| --- a/src/parsing/parser.cc |
| +++ b/src/parsing/parser.cc |
| @@ -4019,6 +4019,10 @@ FunctionLiteral* Parser::ParseFunctionLiteral( |
| // Parsing the body may change the language mode in our scope. |
| language_mode = scope->language_mode(); |
| + scope->DeclareArguments(ast_value_factory()); |
| + if (main_scope != scope) { |
| + main_scope->DeclareArguments(ast_value_factory()); |
|
adamk
2016/08/30 20:45:56
What happens if you leave this out? I'm a bit surp
lpy
2016/09/01 01:17:30
There's a DCHECK here: https://cs.chromium.org/chr
|
| + } |
| // Validate name and parameter names. We can do this only after parsing the |
| // function, since the function can declare itself strict. |