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

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

Issue 183993003: Revert commits r33138, r33135, and r33134. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | « pkg/barback/lib/src/group_runner.dart ('k') | pkg/barback/lib/src/phase_input.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/lib/src/phase_forwarder.dart
diff --git a/pkg/barback/lib/src/phase_forwarder.dart b/pkg/barback/lib/src/phase_forwarder.dart
index b540acdbd5098ed4ba40d05041968f45d2050a28..c1f7abdf76443adeff002eaf27287513102cb9ee 100644
--- a/pkg/barback/lib/src/phase_forwarder.dart
+++ b/pkg/barback/lib/src/phase_forwarder.dart
@@ -7,7 +7,6 @@ library barback.phase_forwarder;
import 'dart:async';
import 'asset_node.dart';
-import 'asset_node_set.dart';
/// A class that takes care of forwarding assets within a phase.
///
@@ -41,7 +40,7 @@ class PhaseForwarder {
int _numChannels;
/// The intermediate forwarded assets.
- final _intermediateAssets = new AssetNodeSet();
+ final _intermediateAssets = new Set<AssetNode>();
/// The final forwarded asset.
///
@@ -70,7 +69,11 @@ class PhaseForwarder {
}
_intermediateAssets.add(asset);
- asset.onStateChange.listen((_) => _adjustOutput());
+
+ asset.onStateChange.listen((state) {
+ if (state.isRemoved) _intermediateAssets.remove(asset);
+ _adjustOutput();
+ });
_adjustOutput();
}
« no previous file with comments | « pkg/barback/lib/src/group_runner.dart ('k') | pkg/barback/lib/src/phase_input.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698