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

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: Fix class literal handling 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
« no previous file with comments | « src/scopes.h ('k') | test/mjsunit/harmony/regress/regress-4395.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index 4e6acca5fc64ba5f6be60a0e70d6f739aa87dea4..fa86e11c0b64dd88f5d06bc8dd9d2d6ac21288af 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;
}
« no previous file with comments | « src/scopes.h ('k') | test/mjsunit/harmony/regress/regress-4395.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698