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

Unified Diff: lib/src/graph/transform_node.dart

Issue 1262483002: Fix a deadlock. (Closed) Base URL: git@github.com:dart-lang/barback@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/graph/transform_node.dart
diff --git a/lib/src/graph/transform_node.dart b/lib/src/graph/transform_node.dart
index f715814af03197a0de504a04eac3456bf87494d0..61bab3f258943d925ef0be951fec42fe2f1156e5 100644
--- a/lib/src/graph/transform_node.dart
+++ b/lib/src/graph/transform_node.dart
@@ -334,6 +334,13 @@ class TransformNode {
// transformation.
_restartRun();
} else if (input.state.isAvailable) {
+ if (_state == _State.DECLARED) {
+ // If we're passing through this input and its contents don't matter,
+ // update the pass-through controller.
+ var controller = _passThroughControllers[input.id];
+ if (controller != null) controller.setAvailable(input.asset);
+ }
+
if (_state == _State.DECLARED && _canRunDeclaringEagerly) {
// If [this] is fully declared but hasn't started applying, this input
// becoming available may mean that all inputs are available, in which
@@ -358,6 +365,10 @@ class TransformNode {
}
} else {
if (_forced) input.force();
+
+ var controller = _passThroughControllers[input.id];
+ if (controller != null) controller.setDirty();
+
if (_state == _State.APPLYING && !_applyController.addedId(input.id) &&
(_forced || !input.isLazy)) {
// If the input hasn't yet been added to the transform's input stream,
« no previous file with comments | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698