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

Unified Diff: sdk/lib/_internal/pub/lib/src/utils.dart

Issue 22952002: Add missing return. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 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/utils.dart
diff --git a/sdk/lib/_internal/pub/lib/src/utils.dart b/sdk/lib/_internal/pub/lib/src/utils.dart
index da8f640e85dbed58d61939d658fcb017c0310d53..372f7def98b8a7a98928bf1d3e0fc52bfd7787a0 100644
--- a/sdk/lib/_internal/pub/lib/src/utils.dart
+++ b/sdk/lib/_internal/pub/lib/src/utils.dart
@@ -191,7 +191,10 @@ Future<Stream> validateStream(Stream stream) {
controller.add(value);
}, onError: (error) {
// If the error came after values, it's OK.
- if (completer.isCompleted) controller.addError(error);
+ if (completer.isCompleted) {
+ controller.addError(error);
+ return;
+ }
// Otherwise, the error came first and the stream is invalid.
completer.completeError(error);
« 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