Chromium Code Reviews| Index: sdk/lib/async/stream_impl.dart |
| diff --git a/sdk/lib/async/stream_impl.dart b/sdk/lib/async/stream_impl.dart |
| index 8c9af64bb9e01fd4bfe9511e9024117bcce3e8e8..680ed0ef1ad9350c72882a0629b39373337fcccb 100644 |
| --- a/sdk/lib/async/stream_impl.dart |
| +++ b/sdk/lib/async/stream_impl.dart |
| @@ -778,7 +778,7 @@ class _DoneStreamSubscription<T> implements StreamSubscription<T> { |
| } |
| } |
| - Future cancel() => null; |
| + Future cancel() => new Future.value(null); |
|
Lasse Reichstein Nielsen
2016/08/01 15:23:26
Future._nullFuture
floitsch
2016/08/01 21:00:37
Done.
|
| Future/*<E>*/ asFuture/*<E>*/([var/*=E*/ futureValue]) { |
| _Future/*<E>*/ result = new _Future/*<E>*/(); |
| @@ -916,7 +916,7 @@ class _BroadcastSubscriptionWrapper<T> implements StreamSubscription<T> { |
| Future cancel() { |
| _stream._cancelSubscription(); |
| - return null; |
| + return new Future.value(null); |
|
Lasse Reichstein Nielsen
2016/08/01 15:23:26
Future._nullFuture
(I will stop saying it now, but
floitsch
2016/08/01 21:00:37
Done.
|
| } |
| bool get isPaused { |
| @@ -1032,7 +1032,7 @@ class _StreamIteratorImpl<T> implements StreamIterator<T> { |
| Future cancel() { |
| StreamSubscription subscription = _subscription; |
| - if (subscription == null) return null; |
| + if (subscription == null) return new Future.value(null); |
| if (_state == _STATE_MOVING) { |
| _Future<bool> hasNext = _futureOrPrefetch as Object /*=_Future<bool>*/; |
| _clear(); |