Index: src/scopes.cc |
diff --git a/src/scopes.cc b/src/scopes.cc |
index d41a0da3104f950f8d3e5104409a3198cd0e5a40..ad8b6a5e5e072dffc5ea95608f96e6a96b83b323 100644 |
--- a/src/scopes.cc |
+++ b/src/scopes.cc |
@@ -148,12 +148,10 @@ Scope::Scope(Scope* inner_scope, |
SetDefaults(type, NULL, scope_info); |
if (!scope_info.is_null()) { |
num_heap_slots_ = scope_info_->ContextLength(); |
- if (*scope_info != ScopeInfo::Empty()) { |
- language_mode_ = scope_info->language_mode(); |
- } |
- } else if (is_with_scope()) { |
- num_heap_slots_ = Context::MIN_CONTEXT_SLOTS; |
} |
+ // Ensure at least MIN_CONTEXT_SLOTS to indicate a materialized context. |
+ num_heap_slots_ = Max(num_heap_slots_, |
+ static_cast<int>(Context::MIN_CONTEXT_SLOTS)); |
AddInnerScope(inner_scope); |
} |