Index: src/scopeinfo.cc |
diff --git a/src/scopeinfo.cc b/src/scopeinfo.cc |
index c9d91e1e2daae67e138c02978223d29940d653ce..f50af304a20a6dd4d07a87c5bf455c9f5da9c32a 100644 |
--- a/src/scopeinfo.cc |
+++ b/src/scopeinfo.cc |
@@ -142,7 +142,9 @@ Handle<ScopeInfo> ScopeInfo::Create(Scope* scope) { |
ASSERT(index == scope_info->length()); |
ASSERT(scope->num_parameters() == scope_info->ParameterCount()); |
ASSERT(scope->num_stack_slots() == scope_info->StackSlotCount()); |
- ASSERT(scope->num_heap_slots() == scope_info->ContextLength()); |
+ ASSERT(scope->num_heap_slots() == scope_info->ContextLength() || |
+ (scope->num_heap_slots() == kVariablePartIndex && |
+ scope_info->ContextLength() == 0)); |
return scope_info; |
} |