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

Unified Diff: lib/runtime/dart/collection.js

Issue 1132113003: fixes #177, FunctionDeclarationStatement and closing over `this` (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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: lib/runtime/dart/collection.js
diff --git a/lib/runtime/dart/collection.js b/lib/runtime/dart/collection.js
index 5229600f8a95e32debb7b1034f0c3a67d687df1b..1c1617152da655c33d38f948be764144ab057058 100644
--- a/lib/runtime/dart/collection.js
+++ b/lib/runtime/dart/collection.js
@@ -3085,7 +3085,7 @@ var math = dart.lazyImport(math);
let found = false;
let initialSplayCount = this[_splayCount];
// Function visit: (_SplayTreeMapNode<dynamic, dynamic>) → bool
- function visit(node) {
+ let visit = (node => {
while (node != null) {
if (dart.equals(node.value, value))
return true;
@@ -3097,7 +3097,7 @@ var math = dart.lazyImport(math);
node = dart.as(node.left, _SplayTreeMapNode);
}
return false;
- }
+ }).bind(this);
return visit(dart.as(this[_root], _SplayTreeMapNode));
}
get keys() {

Powered by Google App Engine
This is Rietveld 408576698