Index: src/ast/scopes.cc |
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc |
index 86f87b15f26d575f9929752c1625978f0f9db78a..39fec0963e23e6d35f67fe72325c0ce07d90b5cd 100644 |
--- a/src/ast/scopes.cc |
+++ b/src/ast/scopes.cc |
@@ -1046,6 +1046,12 @@ 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. |
Toon Verwaest
2016/09/20 11:05:00
Add TODO(yangguo/jochen) to remove this requiremen
jochen (gone - plz use gerrit)
2016/09/20 11:13:17
done (also added to NeedsScopeInfo())
|
+ if (scope_info_.is_null()) { |
+ scope_info_ = ScopeInfo::Create(info->isolate(), zone(), this, outer_scope); |
+ } |
} |
bool Scope::AllowsLazyParsing() const { |