Index: src/parsing/parser.cc |
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
index efb76fd5d8ac0eccf8b14e223ab4e3b0bae84ae1..750648a3d1444754a3b2761fd9e52aae28566060 100644 |
--- a/src/parsing/parser.cc |
+++ b/src/parsing/parser.cc |
@@ -1488,8 +1488,7 @@ Statement* Parser::DeclareFunction(const AstRawString* variable_name, |
VariableProxy* proxy = |
factory()->NewVariableProxy(variable_name, NORMAL_VARIABLE); |
- DeclarationScope* target_scope = GetDeclarationScope(); |
- MarkTopLevelVariableAsAssigned(target_scope, proxy); |
+ MarkTopLevelVariableAsAssigned(scope(), proxy); |
Declaration* declaration = |
factory()->NewFunctionDeclaration(proxy, function, scope(), pos); |
@@ -1499,7 +1498,8 @@ Statement* Parser::DeclareFunction(const AstRawString* variable_name, |
if (is_sloppy_block_function) { |
SloppyBlockFunctionStatement* statement = |
factory()->NewSloppyBlockFunctionStatement(); |
- target_scope->DeclareSloppyBlockFunction(variable_name, scope(), statement); |
+ GetDeclarationScope()->DeclareSloppyBlockFunction(variable_name, scope(), |
+ statement); |
return statement; |
} |
return factory()->NewEmptyStatement(kNoSourcePosition); |