Chromium Code Reviews| Index: src/scopes.cc |
| diff --git a/src/scopes.cc b/src/scopes.cc |
| index 10548f99381e933d3dc9ccd3063e25fdea38c378..e88c9e5cba35fbbc9b09b8dc7d2994ccf83a8d27 100644 |
| --- a/src/scopes.cc |
| +++ b/src/scopes.cc |
| @@ -726,7 +726,7 @@ 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++; |
|
Michael Starzinger
2013/04/26 11:31:10
As discussed offline: It is confusing that we don'
|
| } |
| return n; |
| } |