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

Unified Diff: sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart

Issue 138413007: Don't serialize the return value of [Transformer.apply] in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart b/sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart
index 66938434704a247a78e057e5dd30ef11c67c534f..0f59bf93d350a443ffc7ae21021ed835bab0d652 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/load_transformers.dart
@@ -179,8 +179,11 @@ Map _serializeTransformer(Transformer transformer) {
return transformer.isPrimary(deserializeAsset(message['asset']));
} else {
assert(message['type'] == 'apply');
+
+ // Make sure we return null so that if the transformer's [apply] returns
+ // a non-serializable value it doesn't cause problems.
return transformer.apply(
- new ForeignTransform(message['transform']));
+ new ForeignTransform(message['transform'])).then((_) => null);
}
});
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698