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

Unified Diff: pkg/barback/lib/src/asset_graph.dart

Issue 18650004: Make Assets know their ID. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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: pkg/barback/lib/src/asset_graph.dart
diff --git a/pkg/barback/lib/src/asset_graph.dart b/pkg/barback/lib/src/asset_graph.dart
index 5d77a5c8bc7944b24da693713285736f9c0454ad..488c284b7bcabd532854a3111ec3e8cba556621a 100644
--- a/pkg/barback/lib/src/asset_graph.dart
+++ b/pkg/barback/lib/src/asset_graph.dart
@@ -190,12 +190,12 @@ class AssetGraph {
var changes = _sourceChanges;
_sourceChanges = null;
- var updated = new Map<AssetId, Asset>();
+ var updated = new Set<Asset>();
nweiz 2013/07/03 20:08:25 Does Set<Asset> work? Asset doesn't define [hash]
Bob Nystrom 2013/07/03 22:32:11 Object implements hashCode and == (based on identi
var futures = [];
for (var id in changes.updated) {
// TODO(rnystrom): Catch all errors from provider and route to results.
futures.add(_provider.getAsset(id).then((asset) {
- updated[id] = asset;
+ updated.add(asset);
}).catchError((error) {
if (error is AssetNotFoundException) {
// Handle missing asset errors like regular missing assets.

Powered by Google App Engine
This is Rietveld 408576698