summaryrefslogtreecommitdiff
path: root/deps/v8/src/scopes.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/scopes.cc')
-rw-r--r--deps/v8/src/scopes.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/deps/v8/src/scopes.cc b/deps/v8/src/scopes.cc
index d0ee8ec7f2..a7ff28789f 100644
--- a/deps/v8/src/scopes.cc
+++ b/deps/v8/src/scopes.cc
@@ -149,12 +149,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);
}