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

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

Issue 1177343004: Add Stream.empty. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove the null future "optimization". Fix some missing type parameters. Created 5 years, 6 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 a4116cd7a4771d3e1e0997b93e43b16607e2fdc9..5764ecdd2102e6dc975a6c1ca3d81a0ed4db3ad4 100644
--- a/sdk/lib/async/stream_controller.dart
+++ b/sdk/lib/async/stream_controller.dart
@@ -80,8 +80,8 @@ abstract class StreamController<T> implements StreamSink<T> {
if (onListen == null && onPause == null &&
onResume == null && onCancel == null) {
return sync
- ? new _NoCallbackSyncStreamController/*<T>*/()
- : new _NoCallbackAsyncStreamController/*<T>*/();
+ ? new _NoCallbackSyncStreamController<T>()
+ : new _NoCallbackAsyncStreamController<T>();
}
return sync
? new _SyncStreamController<T>(onListen, onPause, onResume, onCancel)
@@ -176,9 +176,6 @@ abstract class StreamController<T> implements StreamSink<T> {
* Send or enqueue an error event.
*
* If [error] is `null`, it is replaced by a [NullThrownError].
- *
- * Also allows an objection stack trace object, on top of what [EventSink]
- * allows.
*/
void addError(Object error, [StackTrace stackTrace]);
@@ -394,7 +391,7 @@ abstract class _StreamController<T> implements StreamController<T>,
_NotificationHandler get _onCancel;
// Return a new stream every time. The streams are equal, but not identical.
- Stream<T> get stream => new _ControllerStream(this);
+ Stream<T> get stream => new _ControllerStream<T>(this);
/**
* Returns a view of this object that only exposes the [StreamSink] interface.
@@ -758,11 +755,11 @@ abstract class _NoCallbacks {
_NotificationHandler get _onCancel => null;
}
-class _NoCallbackAsyncStreamController/*<T>*/ = _StreamController/*<T>*/
- with _AsyncStreamControllerDispatch/*<T>*/, _NoCallbacks;
+class _NoCallbackAsyncStreamController<T> = _StreamController<T>
+ with _AsyncStreamControllerDispatch<T>, _NoCallbacks;
-class _NoCallbackSyncStreamController/*<T>*/ = _StreamController/*<T>*/
- with _SyncStreamControllerDispatch/*<T>*/, _NoCallbacks;
+class _NoCallbackSyncStreamController<T> = _StreamController<T>
+ with _SyncStreamControllerDispatch<T>, _NoCallbacks;
typedef _NotificationHandler();
« 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