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

Unified Diff: src/compiler.cc

Issue 2342443004: Only pass the outer scope info with ParseInfo (Closed)
Patch Set: 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
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index bdddfd35465f9d781c232b5fb5ab38604ccaf17b..842473e9f9ac40bf9ef29ec5a91ae23228b721fc 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1463,7 +1463,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);
@@ -1636,7 +1638,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();

Powered by Google App Engine
This is Rietveld 408576698