diff options
Diffstat (limited to 'deps/v8/src/scopes.cc')
-rw-r--r-- | deps/v8/src/scopes.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/deps/v8/src/scopes.cc b/deps/v8/src/scopes.cc index 10548f9938..5ad970ad81 100644 --- a/deps/v8/src/scopes.cc +++ b/deps/v8/src/scopes.cc @@ -726,7 +726,9 @@ int Scope::ContextChainLength(Scope* scope) { int n = 0; for (Scope* s = this; s != scope; s = s->outer_scope_) { ASSERT(s != NULL); // scope must be in the scope chain - if (s->num_heap_slots() > 0) n++; + if (s->is_with_scope() || s->num_heap_slots() > 0) n++; + // Catch scopes always have heap slots. + ASSERT(!s->is_catch_scope() || s->num_heap_slots() > 0); } return n; } |