| Index: src/ast/scopes.cc
|
| diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
|
| index 86f87b15f26d575f9929752c1625978f0f9db78a..ced29e8c50b6495800edc8b240843ba83b82907a 100644
|
| --- a/src/ast/scopes.cc
|
| +++ b/src/ast/scopes.cc
|
| @@ -1046,6 +1046,13 @@ void DeclarationScope::AllocateVariables(ParseInfo* info, AnalyzeMode mode) {
|
| break;
|
| }
|
| AllocateScopeInfosRecursively(info->isolate(), mode, outer_scope);
|
| + // The debugger expects all shared function infos to contain a scope info.
|
| + // Since the top-most scope will end up in a shared function info, make sure
|
| + // it has one, even if it doesn't need a scope info.
|
| + // TODO(jochen|yangguo): Remove this requirement.
|
| + if (scope_info_.is_null()) {
|
| + scope_info_ = ScopeInfo::Create(info->isolate(), zone(), this, outer_scope);
|
| + }
|
| }
|
|
|
| bool Scope::AllowsLazyParsing() const {
|
|
|