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

Unified Diff: src/contexts.cc

Issue 2271993002: Chain ScopeInfos together (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase 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.cc ('k') | src/debug/debug-evaluate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/contexts.cc
diff --git a/src/contexts.cc b/src/contexts.cc
index 01ce0d2a7f2bf77550ec013e86e0a45d75e76eaa..d4910eac03d6bf38a607d7c5f992b5907fc52a0e 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -110,8 +110,10 @@ JSReceiver* Context::extension_receiver() {
}
ScopeInfo* Context::scope_info() {
- DCHECK(IsModuleContext() || IsScriptContext() || IsBlockContext() ||
- IsCatchContext() || IsWithContext() || IsDebugEvaluateContext());
+ DCHECK(!IsNativeContext());
+ if (IsFunctionContext() || IsModuleContext()) {
+ return closure()->shared()->scope_info();
+ }
HeapObject* object = extension();
if (object->IsContextExtension()) {
DCHECK(IsBlockContext() || IsCatchContext() || IsWithContext() ||
« no previous file with comments | « src/ast/scopes.cc ('k') | src/debug/debug-evaluate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698