Chromium Code Reviews| Index: pkg/barback/lib/src/phase.dart |
| diff --git a/pkg/barback/lib/src/phase.dart b/pkg/barback/lib/src/phase.dart |
| index af20bc7e2f26eeed51999e7eee9027e9d3ccbf8f..6ad4ea68411a3c83cf6b8d8a83dac0d423dd2812 100644 |
| --- a/pkg/barback/lib/src/phase.dart |
| +++ b/pkg/barback/lib/src/phase.dart |
| @@ -139,8 +139,12 @@ class Phase { |
| Phase addPhase(Iterable<Transformer> transformers) { |
| assert(_next == null); |
| _next = new Phase(cascade, transformers); |
| - for (var outputs in _outputs.values) { |
| - _next.addInput(outputs.output); |
| + for (var output in _outputs.values.toList()) { |
| + output.removeListeners(); |
|
Bob Nystrom
2013/08/22 19:34:19
Document why its listeners are being removed.
|
| + // Removing [output]'s listeners will cause it to be removed from |
| + // [_outputs], so we have to put it back. |
| + _outputs[output.output.id] = output; |
| + _next.addInput(output.output); |
| } |
| return _next; |
| } |