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

Unified Diff: src/parsing/parse-info.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/parsing/parse-info.h ('k') | src/parsing/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parse-info.cc
diff --git a/src/parsing/parse-info.cc b/src/parsing/parse-info.cc
index dfec0610e1dc7d3300fcabd671d2b8a76fab94cc..6b8fdf5f0dbcf3143b976535b1b68f3969520d35 100644
--- a/src/parsing/parse-info.cc
+++ b/src/parsing/parse-info.cc
@@ -33,7 +33,9 @@ ParseInfo::ParseInfo(Zone* zone)
ParseInfo::ParseInfo(Zone* zone, Handle<JSFunction> function)
: ParseInfo(zone, Handle<SharedFunctionInfo>(function->shared())) {
- set_context(Handle<Context>(function->context()));
+ if (!function->context()->IsNativeContext()) {
+ set_outer_scope_info(handle(function->context()->scope_info()));
+ }
}
ParseInfo::ParseInfo(Zone* zone, Handle<SharedFunctionInfo> shared)
« no previous file with comments | « src/parsing/parse-info.h ('k') | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698