Index: src/compiler/ast-graph-builder.cc |
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc |
index 2b792be89472ed2c5b8715ec286fd4ecf2101d30..862141563bc537ca4347e9a2b25c9383083711bb 100644 |
--- a/src/compiler/ast-graph-builder.cc |
+++ b/src/compiler/ast-graph-builder.cc |
@@ -1139,7 +1139,7 @@ void AstGraphBuilder::VisitBlock(Block* stmt) { |
VisitStatements(stmt->statements()); |
} else { |
// Visit declarations and statements in a block scope. |
- if (stmt->scope()->ContextLocalCount() > 0) { |
+ if (stmt->scope()->NeedsContext()) { |
Node* context = BuildLocalBlockContext(stmt->scope()); |
ContextScope scope(this, stmt->scope(), context); |
VisitDeclarations(stmt->scope()->declarations()); |