Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: src/ast/scopes.cc

Issue 2351823005: Only create ScopeInfos for scopes that really need one (Closed)
Patch Set: updates Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/scopes.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « src/ast/scopes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698