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

Unified Diff: src/parser.cc

Issue 1005063002: Strawman: check strong mode free variables against the global object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: arrow func param fix Created 5 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
« no previous file with comments | « src/objects.h ('k') | src/pending-compilation-error-handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index f24f7107d8fd444235349dcc2601166dcc8ebbdc..708de9ac0eb782298959035a0b19c0ad3196be79 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -3668,6 +3668,10 @@ bool CheckAndDeclareArrowParameter(ParserTraits* traits, Expression* expression,
return false;
}
+ // When the variable was seen, it was recorded as unresolved in the outer
+ // scope. But it's really not unresolved.
+ scope->outer_scope()->RemoveUnresolved(expression->AsVariableProxy());
+
scope->DeclareParameter(raw_name, VAR);
++(*num_params);
return true;
« no previous file with comments | « src/objects.h ('k') | src/pending-compilation-error-handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698