| OLD | NEW |
| 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 | 8 |
| 9 import 'asset_cascade.dart'; | 9 import 'asset_cascade.dart'; |
| 10 import 'asset_id.dart'; | 10 import 'asset_id.dart'; |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 // be re-run and will consume the output from the new final phase. | 318 // be re-run and will consume the output from the new final phase. |
| 319 output.removeListeners(); | 319 output.removeListeners(); |
| 320 } | 320 } |
| 321 return _next; | 321 return _next; |
| 322 } | 322 } |
| 323 | 323 |
| 324 /// Mark this phase as removed. | 324 /// Mark this phase as removed. |
| 325 /// | 325 /// |
| 326 /// This will remove all the phase's outputs and all following phases. | 326 /// This will remove all the phase's outputs and all following phases. |
| 327 void remove() { | 327 void remove() { |
| 328 _previous._next = null; | 328 if (_previous != null) _previous._next = null; |
| 329 removeFollowing(); | 329 removeFollowing(); |
| 330 for (var input in _inputs.values.toList()) { | 330 for (var input in _inputs.values.toList()) { |
| 331 input.remove(); | 331 input.remove(); |
| 332 } | 332 } |
| 333 for (var group in _groups.values) { | 333 for (var group in _groups.values) { |
| 334 group.remove(); | 334 group.remove(); |
| 335 } | 335 } |
| 336 _onAssetController.close(); | 336 _onAssetController.close(); |
| 337 _onLogPool.close(); | 337 _onLogPool.close(); |
| 338 } | 338 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 assert(asset.state.isDirty); | 398 assert(asset.state.isDirty); |
| 399 asset.force(); | 399 asset.force(); |
| 400 asset.whenStateChanges().then((state) { | 400 asset.whenStateChanges().then((state) { |
| 401 if (state.isRemoved) return getOutput(asset.id); | 401 if (state.isRemoved) return getOutput(asset.id); |
| 402 return asset; | 402 return asset; |
| 403 }).then(request.complete).catchError(request.completeError); | 403 }).then(request.complete).catchError(request.completeError); |
| 404 } | 404 } |
| 405 | 405 |
| 406 String toString() => "phase $_location.$_index"; | 406 String toString() => "phase $_location.$_index"; |
| 407 } | 407 } |
| OLD | NEW |