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

Unified Diff: src/parser.cc

Issue 13408005: Force context allocation for variables in generator scopes. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 7 years, 9 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/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index e468cb970c09bc75a32f21938c9a7cb839124b4c..f34bf59a2208e4dd8f0b0416951e548a4374f9d1 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -4392,6 +4392,8 @@ FunctionLiteral* Parser::ParseFunctionLiteral(Handle<String> function_name,
// Parse function body.
{ FunctionState function_state(this, scope, is_generator, isolate());
top_scope_->SetScopeName(function_name);
+ if (is_generator)
Michael Starzinger 2013/04/05 11:38:42 style: Either the whole conditional on one line or
wingo 2013/04/05 12:25:06 Done.
+ top_scope_->ForceContextAllocation();
// FormalParameterList ::
// '(' (Identifier)*[','] ')'

Powered by Google App Engine
This is Rietveld 408576698