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

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

Issue 23363002: Factor out an input-handling class from Phase in barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 7 years, 4 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
« no previous file with comments | « pkg/barback/lib/src/phase_input.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.transform_node; 5 library barback.transform_node;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'asset.dart'; 9 import 'asset.dart';
10 import 'asset_id.dart'; 10 import 'asset_id.dart';
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 error = new TransformerException(info, error); 125 error = new TransformerException(info, error);
126 } 126 }
127 127
128 // Catch all transformer errors and pipe them to the results stream. 128 // Catch all transformer errors and pipe them to the results stream.
129 // This is so a broken transformer doesn't take down the whole graph. 129 // This is so a broken transformer doesn't take down the whole graph.
130 phase.cascade.reportError(error); 130 phase.cascade.reportError(error);
131 131
132 // Don't allow partial results from a failed transform. 132 // Don't allow partial results from a failed transform.
133 newOutputs.clear(); 133 newOutputs.clear();
134 }).then((_) { 134 }).then((_) {
135 if (_isDirty) return []; 135 if (_isDirty) return new Set();
136 136
137 return _adjustOutputs(newOutputs); 137 return _adjustOutputs(newOutputs);
138 }); 138 });
139 } 139 }
140 140
141 /// Gets the asset for an input [id]. 141 /// Gets the asset for an input [id].
142 /// 142 ///
143 /// If an input with that ID cannot be found, throws an 143 /// If an input with that ID cannot be found, throws an
144 /// [AssetNotFoundException]. 144 /// [AssetNotFoundException].
145 Future<Asset> getInput(AssetId id) { 145 Future<Asset> getInput(AssetId id) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } else { 194 } else {
195 var controller = new AssetNodeController.available(asset, this); 195 var controller = new AssetNodeController.available(asset, this);
196 _outputControllers[asset.id] = controller; 196 _outputControllers[asset.id] = controller;
197 brandNewOutputs.add(controller.node); 197 brandNewOutputs.add(controller.node);
198 } 198 }
199 } 199 }
200 200
201 return brandNewOutputs; 201 return brandNewOutputs;
202 } 202 }
203 } 203 }
OLDNEW
« no previous file with comments | « pkg/barback/lib/src/phase_input.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698