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

Side by Side Diff: pkg/barback/lib/src/phase.dart

Issue 36463002: Fix a synchrony bug in barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library barback.phase; 5 library barback.phase;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'asset_cascade.dart'; 10 import 'asset_cascade.dart';
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 forwarder.onForwarding.listen((asset) { 144 forwarder.onForwarding.listen((asset) {
145 _addOutput(asset); 145 _addOutput(asset);
146 146
147 var exception = _outputs[asset.id].collisionException; 147 var exception = _outputs[asset.id].collisionException;
148 if (exception != null) cascade.reportError(exception); 148 if (exception != null) cascade.reportError(exception);
149 }); 149 });
150 150
151 _inputOrigins.add(node.origin); 151 _inputOrigins.add(node.origin);
152 var input = new PhaseInput(this, node, _transformers); 152 var input = new PhaseInput(this, node, _transformers);
153 _inputs[node.id] = input; 153 _inputs[node.id] = input;
154 input.input.whenRemoved.then((_) { 154 input.input.whenRemoved(() {
155 _inputOrigins.remove(node.origin); 155 _inputOrigins.remove(node.origin);
156 _inputs.remove(node.id); 156 _inputs.remove(node.id);
157 _forwarders.remove(node.id).remove(); 157 _forwarders.remove(node.id).remove();
158 }); 158 });
159 _onDirtyPool.add(input.onDirty); 159 _onDirtyPool.add(input.onDirty);
160 _onDirtyController.add(null); 160 _onDirtyController.add(null);
161 _onLogPool.add(input.onLog); 161 _onLogPool.add(input.onLog);
162 162
163 for (var group in _groups.values) { 163 for (var group in _groups.values) {
164 group.addInput(node); 164 group.addInput(node);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 _outputs[asset.id].add(asset); 308 _outputs[asset.id].add(asset);
309 } else { 309 } else {
310 _outputs[asset.id] = new PhaseOutput(this, asset); 310 _outputs[asset.id] = new PhaseOutput(this, asset);
311 _outputs[asset.id].onAsset.listen((output) { 311 _outputs[asset.id].onAsset.listen((output) {
312 if (_next != null) _next.addInput(output); 312 if (_next != null) _next.addInput(output);
313 }, onDone: () => _outputs.remove(asset.id)); 313 }, onDone: () => _outputs.remove(asset.id));
314 if (_next != null) _next.addInput(_outputs[asset.id].output); 314 if (_next != null) _next.addInput(_outputs[asset.id].output);
315 } 315 }
316 } 316 }
317 } 317 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698