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

Unified Diff: src/compiler-dispatcher/compiler-dispatcher-job.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/compiler.cc ('k') | src/debug/debug-scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler-dispatcher/compiler-dispatcher-job.cc
diff --git a/src/compiler-dispatcher/compiler-dispatcher-job.cc b/src/compiler-dispatcher/compiler-dispatcher-job.cc
index ec814105b764b80d4bef332b335adea69141368c..fa328a0b429d73363614ee835f9e3895a1b341ac 100644
--- a/src/compiler-dispatcher/compiler-dispatcher-job.cc
+++ b/src/compiler-dispatcher/compiler-dispatcher-job.cc
@@ -83,8 +83,12 @@ void CompilerDispatcherJob::PrepareToParseOnMainThread() {
parse_info_->set_language_mode(shared->language_mode());
parser_.reset(new Parser(parse_info_.get()));
- parser_->DeserializeScopeChain(parse_info_.get(),
- handle(function_->context(), isolate_));
+ parser_->DeserializeScopeChain(
+ parse_info_.get(),
+ function_->context()->IsNativeContext()
+ ? MaybeHandle<ScopeInfo>()
+ : MaybeHandle<ScopeInfo>(function_->context()->scope_info(),
+ isolate_));
Handle<String> name(String::cast(shared->name()));
parse_info_->set_function_name(
@@ -141,7 +145,10 @@ bool CompilerDispatcherJob::FinalizeParsingOnMainThread() {
Handle<Script> script(Script::cast(shared->script()), isolate_);
parse_info_->set_script(script);
- parse_info_->set_context(handle(function_->context(), isolate_));
+ if (!function_->context()->IsNativeContext()) {
+ parse_info_->set_outer_scope_info(
+ handle(function_->context()->scope_info(), isolate_));
+ }
parse_info_->set_shared_info(handle(function_->shared(), isolate_));
{
« no previous file with comments | « src/compiler.cc ('k') | src/debug/debug-scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698