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

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: Code review changes. 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
« no previous file with comments | « no previous file | pkg/barback/lib/src/phase_output.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1230bea094e36970d402547ec6b386c868c33ec0 100644
--- a/pkg/barback/lib/src/phase.dart
+++ b/pkg/barback/lib/src/phase.dart
@@ -148,6 +148,7 @@ 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;
+ output.output.whenRemoved.then((_) => _outputs.remove(output.output.id));
_next.addInput(output.output);
}
return _next;
@@ -188,8 +189,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698