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

Unified Diff: src/ast/scopes.cc

Issue 2574753002: Disable lazy parsing inside eval (see bug). (Closed)
Patch Set: . Created 4 years 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 | test/mjsunit/regress/regress-5736.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.cc
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
index 0258ff023a1abe9f9579ab13e12b10a940b97379..e1ec664a1428379319690ad4b9842ad628df4e64 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -124,7 +124,8 @@ Scope::Scope(Zone* zone, Scope* outer_scope, ScopeType scope_type)
SetDefaults();
set_language_mode(outer_scope->language_mode());
force_context_allocation_ =
adamk 2016/12/14 08:00:14 Another option would be to add an if (is_eval_sco
- !is_function_scope() && outer_scope->has_forced_context_allocation();
+ (!is_function_scope() && outer_scope->has_forced_context_allocation()) ||
+ is_eval_scope();
outer_scope_->AddInnerScope(this);
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-5736.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698