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

Unified Diff: src/api.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 | « no previous file | src/ast/scopeinfo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index b500ef41fb16036a63982b6c0f46c25f19f861ab..814a4dfa9f8660a731893f566ecb6bc9461edba9 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2082,7 +2082,12 @@ MaybeLocal<Function> ScriptCompiler::CompileFunctionInContext(
if (!extension->IsJSObject()) return Local<Function>();
i::Handle<i::JSFunction> closure(context->closure(), isolate);
context = factory->NewWithContext(
- closure, context, i::ScopeInfo::CreateForWithScope(isolate), extension);
+ closure, context,
+ i::ScopeInfo::CreateForWithScope(
+ isolate, context->IsNativeContext()
+ ? i::Handle<i::ScopeInfo>::null()
+ : i::Handle<i::ScopeInfo>(context->scope_info())),
+ extension);
}
i::Handle<i::Object> name_obj;
« no previous file with comments | « no previous file | src/ast/scopeinfo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698