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

Unified Diff: src/scopes.cc

Issue 1405313002: [es6] Fix scoping for default parameters in arrow functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index dbcc4b60832bf33d5e096bab9f2634128263b25b..d23a45425a65888194b7a469bdc769643917572f 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -548,15 +548,16 @@ Variable* Scope::DeclareDynamicGlobal(const AstRawString* name) {
}
-void Scope::RemoveUnresolved(VariableProxy* var) {
+bool Scope::RemoveUnresolved(VariableProxy* var) {
// Most likely (always?) any variable we want to remove
// was just added before, so we search backwards.
for (int i = unresolved_.length(); i-- > 0;) {
if (unresolved_[i] == var) {
unresolved_.Remove(i);
- return;
+ return true;
}
}
+ return false;
}

Powered by Google App Engine
This is Rietveld 408576698