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

Unified Diff: src/compiler.cc

Issue 2342443004: Only pass the outer scope info with ParseInfo (Closed)
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/background-parsing-task.cc ('k') | src/compiler-dispatcher/compiler-dispatcher-job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index b889f5baa4777b75f7b627b194abe6020845c499..c062b3c4104ad484150dcbb483dcb8e475e18f4f 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1482,7 +1482,9 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
if (context->IsNativeContext()) parse_info.set_global();
parse_info.set_language_mode(language_mode);
parse_info.set_parse_restriction(restriction);
- parse_info.set_context(context);
+ if (!context->IsNativeContext()) {
+ parse_info.set_outer_scope_info(handle(context->scope_info()));
+ }
shared_info = CompileToplevel(&info);
@@ -1655,7 +1657,9 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript(
}
parse_info.set_compile_options(compile_options);
parse_info.set_extension(extension);
- parse_info.set_context(context);
+ if (!context->IsNativeContext()) {
+ parse_info.set_outer_scope_info(handle(context->scope_info()));
+ }
if (FLAG_serialize_toplevel &&
compile_options == ScriptCompiler::kProduceCodeCache) {
info.PrepareForSerializing();
« no previous file with comments | « src/background-parsing-task.cc ('k') | src/compiler-dispatcher/compiler-dispatcher-job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698