Index: src/parsing/parser.cc |
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
index d0cf28a488d078a317c763be8f6a03038bae8289..506a3d9e294fd11a9dc0ab555670db0595fb96bd 100644 |
--- a/src/parsing/parser.cc |
+++ b/src/parsing/parser.cc |
@@ -4420,7 +4420,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral( |
function_type == FunctionLiteral::kDeclaration && |
eager_compile_hint != FunctionLiteral::kShouldEagerCompile && |
!(FLAG_validate_asm && scope->asm_function()); |
- // Open a new BodyScope, which sets our AstNodeFactory to allocate in the |
+ // Open a new zone scope, which sets our AstNodeFactory to allocate in the |
// new temporary zone if the preconditions are satisfied, and ensures that |
// the previous zone is always restored after parsing the body. |
// For the purpose of scope analysis, some ZoneObjects allocated by the |
@@ -4429,8 +4429,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral( |
// parser-persistent zone (see parser_zone_ in AstNodeFactory). |
{ |
Zone temp_zone(zone()->allocator()); |
- AstNodeFactory::BodyScope inner(factory(), &temp_zone, use_temp_zone); |
- |
+ DiscardableZoneScope(this, &temp_zone, use_temp_zone); |
body = ParseEagerFunctionBody(function_name, pos, formals, kind, |
function_type, CHECK_OK); |
} |