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

Unified Diff: sdk/lib/async/stream_controller.dart

Issue 2762953003: More minor type improvements in dart:async. (Closed)
Patch Set: More fixes. Created 3 years, 9 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 | « sdk/lib/async/stream.dart ('k') | sdk/lib/async/stream_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/stream_controller.dart
diff --git a/sdk/lib/async/stream_controller.dart b/sdk/lib/async/stream_controller.dart
index 4b88281fd0fe2f605f4553511af567649d53a4ea..1f15703dd2853843a962623a709947828c1301e7 100644
--- a/sdk/lib/async/stream_controller.dart
+++ b/sdk/lib/async/stream_controller.dart
@@ -792,12 +792,10 @@ class _SyncStreamController<T> = _StreamController<T>
typedef _NotificationHandler();
-Future _runGuarded(_NotificationHandler notificationHandler) {
- if (notificationHandler == null) return null;
+void _runGuarded(_NotificationHandler notificationHandler) {
+ if (notificationHandler == null) return;
try {
- var result = notificationHandler();
- if (result is Future) return result;
- return null;
+ notificationHandler();
} catch (e, s) {
Zone.current.handleUncaughtError(e, s);
}
« no previous file with comments | « sdk/lib/async/stream.dart ('k') | sdk/lib/async/stream_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698