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

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

Issue 23803006: Fix a subtle bug in barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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/phase.dart
diff --git a/pkg/barback/lib/src/phase.dart b/pkg/barback/lib/src/phase.dart
index 48fd46f748dc60a865358f0df8487a9e529e0028..e2facf3afe2b1829b598a8b2ba3b9977b6e8bef1 100644
--- a/pkg/barback/lib/src/phase.dart
+++ b/pkg/barback/lib/src/phase.dart
@@ -148,6 +148,9 @@ class Phase {
// Removing [output]'s listeners will cause it to be removed from
// [_outputs], so we have to put it back.
_outputs[output.output.id] = output;
+ _outputs[output.output.id].output.whenRemoved.then((_) {
Bob Nystrom 2013/09/05 00:09:55 Instead of "_outputs[output.output.id]" here, can
nweiz 2013/09/05 00:13:09 Done.
+ _outputs.remove(output.output.id);
+ });
_next.addInput(output.output);
}
return _next;
@@ -188,8 +191,9 @@ class Phase {
_outputs[asset.id].add(asset);
} else {
_outputs[asset.id] = new PhaseOutput(this, asset);
- _outputs[asset.id].output.whenRemoved
- .then((_) => _outputs.remove(asset.id));
+ _outputs[asset.id].output.whenRemoved.then((_) {
+ _outputs.remove(asset.id);
+ });
if (_next != null) _next.addInput(_outputs[asset.id].output);
}
}
« no previous file with comments | « no previous file | pkg/barback/lib/src/phase_output.dart » ('j') | pkg/barback/test/package_graph/add_remove_transform_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698