Chromium Code Reviews| Index: src/scopes.cc |
| diff --git a/src/scopes.cc b/src/scopes.cc |
| index 29712de6a8e04d0ab8e00567584ada6ef4c55011..5546875c4bc42536ecfb36be047b104da169df5d 100644 |
| --- a/src/scopes.cc |
| +++ b/src/scopes.cc |
| @@ -544,6 +544,15 @@ int Scope::ContextChainLength(Scope* scope) { |
| } |
| +Scope* Scope::DeclarationScope() { |
| + Scope* scope = this; |
| + while (scope->is_catch_scope()) { |
| + scope = scope->outer_scope(); |
| + } |
| + return scope; |
| +} |
| + |
| + |
| #ifdef DEBUG |
| static const char* Header(Scope::Type type) { |
| switch (type) { |