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

Unified Diff: pkg/barback/lib/src/asset_node.dart

Issue 255283003: Don't assume that a transform node is consistently deferred or not. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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
Index: pkg/barback/lib/src/asset_node.dart
diff --git a/pkg/barback/lib/src/asset_node.dart b/pkg/barback/lib/src/asset_node.dart
index 6534bfc7de75bf63e0ccc775408969a2d923161c..c0593e58f0b73cb5edd1a131bbfe99543bd8c812 100644
--- a/pkg/barback/lib/src/asset_node.dart
+++ b/pkg/barback/lib/src/asset_node.dart
@@ -58,10 +58,10 @@ class AssetNode {
/// lazy.
Function _lazyCallback;
- /// Whether this asset's transform is deferred.
- ///
- /// See [TransformNode.deferred].
- bool get deferred => transform != null && transform.deferred;
+ /// Whether this node is lazy, meaning that [force] must be called to
+ /// guarantee that it will eventually become available.
+ bool get isLazy => _lazyCallback != null ||
+ (_origin != null && _origin.isLazy);
/// A broadcast stream that emits an event whenever the node changes state.
///
@@ -145,8 +145,7 @@ class AssetNode {
}
}
- String toString() =>
- "$state${_lazyCallback == null ? '' : ' lazy'} asset $id";
+ String toString() => "${isLazy ? 'lazy' : state} asset $id";
}
/// The controller for an [AssetNode].
« no previous file with comments | « no previous file | pkg/barback/lib/src/phase_input.dart » ('j') | pkg/barback/test/package_graph/declaring_transformer_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698