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

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

Issue 1054343004: Update to use the latest analyzer (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 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 9936fce10d9a5a35f63d6e04a4cfc034df52a457..134246f48c0810dcec7f761308d913f7a68a779e 100644
--- a/lib/runtime/dart/collection.js
+++ b/lib/runtime/dart/collection.js
@@ -1481,10 +1481,8 @@ var collection;
let growable = opts && 'growable' in opts ? opts.growable : true;
let result = null;
if (growable) {
- result = ((_) => {
- _[core.$length] = this.length;
- return _;
- }).bind(this)(new (core.List$(E))());
+ result = new (core.List$(E))();
+ result[core.$length] = this.length;
} else {
result = new (core.List$(E))(this.length);
}
@@ -2382,10 +2380,8 @@ var collection;
let growable = opts && 'growable' in opts ? opts.growable : true;
let list = null;
if (growable) {
- list = ((_) => {
- _[core.$length] = this.length;
- return _;
- }).bind(this)(new (core.List$(E))());
+ list = new (core.List$(E))();
+ list[core.$length] = this.length;
} else {
list = new (core.List$(E))(this.length);
}

Powered by Google App Engine
This is Rietveld 408576698