| OLD | NEW |
| 1 part of dart.async; | 1 part of dart.async; |
| 2 abstract class StreamController<T> implements StreamSink<T> {Stream<T> get stre
am; | 2 abstract class StreamController<T> implements StreamSink<T> {Stream<T> get stre
am; |
| 3 factory StreamController({ | 3 factory StreamController({ |
| 4 void onListen(), void onPause(), void onResume(), onCancel(), bool sync : fals
e} | 4 void onListen(), void onPause(), void onResume(), onCancel(), bool sync : fals
e} |
| 5 ) { | 5 ) { |
| 6 if (onListen == null && onPause == null && onResume == null && onCancel == nul
l) { | 6 if (onListen == null && onPause == null && onResume == null && onCancel == nul
l) { |
| 7 return ((__x82) => DEVC$RT.cast(__x82, DEVC$RT.type((_StreamController<dynam
ic> _) { | 7 return ((__x82) => DEVC$RT.cast(__x82, DEVC$RT.type((_StreamController<dynam
ic> _) { |
| 8 } | 8 } |
| 9 ), DEVC$RT.type((StreamController<T> _) { | 9 ), DEVC$RT.type((StreamController<T> _) { |
| 10 } | 10 } |
| 11 ), "CastDynamic", """line 83, column 14 of dart:async/stream_controller.dart
: """, __x82 is StreamController<T>, false))(sync ? new _NoCallbackSyncStreamCon
troller() : new _NoCallbackAsyncStreamController()); | 11 ), "CompositeCast", """line 83, column 14 of dart:async/stream_controller.da
rt: """, __x82 is StreamController<T>, false))(sync ? new _NoCallbackSyncStreamC
ontroller() : new _NoCallbackAsyncStreamController()); |
| 12 } | 12 } |
| 13 return sync ? new _SyncStreamController<T>(onListen, onPause, onResume, onCan
cel) : new _AsyncStreamController<T>(onListen, onPause, onResume, onCancel); | 13 return sync ? new _SyncStreamController<T>(onListen, onPause, onResume, onCan
cel) : new _AsyncStreamController<T>(onListen, onPause, onResume, onCancel); |
| 14 } | 14 } |
| 15 factory StreamController.broadcast({ | 15 factory StreamController.broadcast({ |
| 16 void onListen(), void onCancel(), bool sync : false} | 16 void onListen(), void onCancel(), bool sync : false} |
| 17 ) { | 17 ) { |
| 18 return sync ? new _SyncBroadcastStreamController<T>(onListen, onCancel) : new
_AsyncBroadcastStreamController<T>(onListen, onCancel); | 18 return sync ? new _SyncBroadcastStreamController<T>(onListen, onCancel) : new
_AsyncBroadcastStreamController<T>(onListen, onCancel); |
| 19 } | 19 } |
| 20 StreamSink<T> get sink; | 20 StreamSink<T> get sink; |
| 21 bool get isClosed; | 21 bool get isClosed; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 44 _Future _doneFuture; | 44 _Future _doneFuture; |
| 45 _StreamController(); | 45 _StreamController(); |
| 46 _NotificationHandler get _onListen; | 46 _NotificationHandler get _onListen; |
| 47 _NotificationHandler get _onPause; | 47 _NotificationHandler get _onPause; |
| 48 _NotificationHandler get _onResume; | 48 _NotificationHandler get _onResume; |
| 49 _NotificationHandler get _onCancel; | 49 _NotificationHandler get _onCancel; |
| 50 Stream<T> get stream => ((__x83) => DEVC$RT.cast(__x83, DEVC$RT.type((_Controll
erStream<dynamic> _) { | 50 Stream<T> get stream => ((__x83) => DEVC$RT.cast(__x83, DEVC$RT.type((_Controll
erStream<dynamic> _) { |
| 51 } | 51 } |
| 52 ), DEVC$RT.type((Stream<T> _) { | 52 ), DEVC$RT.type((Stream<T> _) { |
| 53 } | 53 } |
| 54 ), "CastExact", """line 293, column 27 of dart:async/stream_controller.dart: """
, __x83 is Stream<T>, false))(new _ControllerStream(this)); | 54 ), "InferableAllocation", """line 293, column 27 of dart:async/stream_controller
.dart: """, __x83 is Stream<T>, false))(new _ControllerStream(this)); |
| 55 StreamSink<T> get sink => new _StreamSinkWrapper<T>(this); | 55 StreamSink<T> get sink => new _StreamSinkWrapper<T>(this); |
| 56 bool get _isCanceled => (_state & _STATE_CANCELED) != 0; | 56 bool get _isCanceled => (_state & _STATE_CANCELED) != 0; |
| 57 bool get hasListener => (_state & _STATE_SUBSCRIBED) != 0; | 57 bool get hasListener => (_state & _STATE_SUBSCRIBED) != 0; |
| 58 bool get _isInitialState => (_state & _STATE_SUBSCRIPTION_MASK) == _STATE_INITI
AL; | 58 bool get _isInitialState => (_state & _STATE_SUBSCRIPTION_MASK) == _STATE_INITI
AL; |
| 59 bool get isClosed => (_state & _STATE_CLOSED) != 0; | 59 bool get isClosed => (_state & _STATE_CLOSED) != 0; |
| 60 bool get isPaused => hasListener ? _subscription._isInputPaused : !_isCanceled; | 60 bool get isPaused => hasListener ? _subscription._isInputPaused : !_isCanceled; |
| 61 bool get _isAddingStream => (_state & _STATE_ADDSTREAM) != 0; | 61 bool get _isAddingStream => (_state & _STATE_ADDSTREAM) != 0; |
| 62 bool get _mayAddEvent => (_state < _STATE_CLOSED); | 62 bool get _mayAddEvent => (_state < _STATE_CLOSED); |
| 63 _PendingEvents get _pendingEvents { | 63 _PendingEvents get _pendingEvents { |
| 64 assert (_isInitialState); if (!_isAddingStream) { | 64 assert (_isInitialState); if (!_isAddingStream) { |
| 65 return DEVC$RT.cast(_varData, dynamic, _PendingEvents, "CastGeneral", """line 33
4, column 14 of dart:async/stream_controller.dart: """, _varData is _PendingEven
ts, true); | 65 return DEVC$RT.cast(_varData, dynamic, _PendingEvents, "DynamicCast", """line 33
4, column 14 of dart:async/stream_controller.dart: """, _varData is _PendingEven
ts, true); |
| 66 } | 66 } |
| 67 _StreamControllerAddStreamState state = DEVC$RT.cast(_varData, dynamic, DEVC$RT
.type((_StreamControllerAddStreamState<dynamic> _) { | 67 _StreamControllerAddStreamState state = DEVC$RT.cast(_varData, dynamic, DEVC$RT
.type((_StreamControllerAddStreamState<dynamic> _) { |
| 68 } | 68 } |
| 69 ), "CastGeneral", """line 336, column 45 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); | 69 ), "DynamicCast", """line 336, column 45 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); |
| 70 return DEVC$RT.cast(state.varData, dynamic, _PendingEvents, "CastGeneral", """l
ine 337, column 12 of dart:async/stream_controller.dart: """, state.varData is _
PendingEvents, true); | 70 return DEVC$RT.cast(state.varData, dynamic, _PendingEvents, "DynamicCast", """l
ine 337, column 12 of dart:async/stream_controller.dart: """, state.varData is _
PendingEvents, true); |
| 71 } | 71 } |
| 72 _StreamImplEvents _ensurePendingEvents() { | 72 _StreamImplEvents _ensurePendingEvents() { |
| 73 assert (_isInitialState); if (!_isAddingStream) { | 73 assert (_isInitialState); if (!_isAddingStream) { |
| 74 if (_varData == null) _varData = new _StreamImplEvents(); | 74 if (_varData == null) _varData = new _StreamImplEvents(); |
| 75 return DEVC$RT.cast(_varData, dynamic, _StreamImplEvents, "CastGeneral", """lin
e 345, column 14 of dart:async/stream_controller.dart: """, _varData is _StreamI
mplEvents, true); | 75 return DEVC$RT.cast(_varData, dynamic, _StreamImplEvents, "DynamicCast", """lin
e 345, column 14 of dart:async/stream_controller.dart: """, _varData is _StreamI
mplEvents, true); |
| 76 } | 76 } |
| 77 _StreamControllerAddStreamState state = DEVC$RT.cast(_varData, dynamic, DEVC$RT
.type((_StreamControllerAddStreamState<dynamic> _) { | 77 _StreamControllerAddStreamState state = DEVC$RT.cast(_varData, dynamic, DEVC$RT
.type((_StreamControllerAddStreamState<dynamic> _) { |
| 78 } | 78 } |
| 79 ), "CastGeneral", """line 347, column 45 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); | 79 ), "DynamicCast", """line 347, column 45 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); |
| 80 if (state.varData == null) state.varData = new _StreamImplEvents(); | 80 if (state.varData == null) state.varData = new _StreamImplEvents(); |
| 81 return DEVC$RT.cast(state.varData, dynamic, _StreamImplEvents, "CastGeneral", "
""line 349, column 12 of dart:async/stream_controller.dart: """, state.varData i
s _StreamImplEvents, true); | 81 return DEVC$RT.cast(state.varData, dynamic, _StreamImplEvents, "DynamicCast", "
""line 349, column 12 of dart:async/stream_controller.dart: """, state.varData i
s _StreamImplEvents, true); |
| 82 } | 82 } |
| 83 _ControllerSubscription get _subscription { | 83 _ControllerSubscription get _subscription { |
| 84 assert (hasListener); if (_isAddingStream) { | 84 assert (hasListener); if (_isAddingStream) { |
| 85 _StreamControllerAddStreamState addState = DEVC$RT.cast(_varData, dynamic, DEVC$
RT.type((_StreamControllerAddStreamState<dynamic> _) { | 85 _StreamControllerAddStreamState addState = DEVC$RT.cast(_varData, dynamic, DEVC$
RT.type((_StreamControllerAddStreamState<dynamic> _) { |
| 86 } | 86 } |
| 87 ), "CastGeneral", """line 358, column 50 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); | 87 ), "DynamicCast", """line 358, column 50 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); |
| 88 return DEVC$RT.cast(addState.varData, dynamic, DEVC$RT.type((_ControllerSubscri
ption<dynamic> _) { | 88 return DEVC$RT.cast(addState.varData, dynamic, DEVC$RT.type((_ControllerSubscri
ption<dynamic> _) { |
| 89 } | 89 } |
| 90 ), "CastGeneral", """line 359, column 14 of dart:async/stream_controller.dart: "
"", addState.varData is _ControllerSubscription<dynamic>, true); | 90 ), "DynamicCast", """line 359, column 14 of dart:async/stream_controller.dart: "
"", addState.varData is _ControllerSubscription<dynamic>, true); |
| 91 } | 91 } |
| 92 return DEVC$RT.cast(_varData, dynamic, DEVC$RT.type((_ControllerSubscription<dy
namic> _) { | 92 return DEVC$RT.cast(_varData, dynamic, DEVC$RT.type((_ControllerSubscription<dy
namic> _) { |
| 93 } | 93 } |
| 94 ), "CastGeneral", """line 361, column 12 of dart:async/stream_controller.dart: "
"", _varData is _ControllerSubscription<dynamic>, true); | 94 ), "DynamicCast", """line 361, column 12 of dart:async/stream_controller.dart: "
"", _varData is _ControllerSubscription<dynamic>, true); |
| 95 } | 95 } |
| 96 Error _badEventState() { | 96 Error _badEventState() { |
| 97 if (isClosed) { | 97 if (isClosed) { |
| 98 return new StateError("Cannot add event after closing"); | 98 return new StateError("Cannot add event after closing"); |
| 99 } | 99 } |
| 100 assert (_isAddingStream); return new StateError("Cannot add event while adding
a stream"); | 100 assert (_isAddingStream); return new StateError("Cannot add event while adding
a stream"); |
| 101 } | 101 } |
| 102 Future addStream(Stream<T> source, { | 102 Future addStream(Stream<T> source, { |
| 103 bool cancelOnError : true} | 103 bool cancelOnError : true} |
| 104 ) { | 104 ) { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 if (hasListener) { | 159 if (hasListener) { |
| 160 _sendError(error, stackTrace); | 160 _sendError(error, stackTrace); |
| 161 } | 161 } |
| 162 else if (_isInitialState) { | 162 else if (_isInitialState) { |
| 163 _ensurePendingEvents().add(new _DelayedError(error, stackTrace)); | 163 _ensurePendingEvents().add(new _DelayedError(error, stackTrace)); |
| 164 } | 164 } |
| 165 } | 165 } |
| 166 void _close() { | 166 void _close() { |
| 167 assert (_isAddingStream); _StreamControllerAddStreamState addState = DEVC$RT.cas
t(_varData, dynamic, DEVC$RT.type((_StreamControllerAddStreamState<dynamic> _) { | 167 assert (_isAddingStream); _StreamControllerAddStreamState addState = DEVC$RT.cas
t(_varData, dynamic, DEVC$RT.type((_StreamControllerAddStreamState<dynamic> _) { |
| 168 } | 168 } |
| 169 ), "CastGeneral", """line 482, column 48 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); | 169 ), "DynamicCast", """line 482, column 48 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); |
| 170 _varData = addState.varData; | 170 _varData = addState.varData; |
| 171 _state &= ~_STATE_ADDSTREAM; | 171 _state &= ~_STATE_ADDSTREAM; |
| 172 addState.complete(); | 172 addState.complete(); |
| 173 } | 173 } |
| 174 StreamSubscription<T> _subscribe(void onData(T data), Function onError, void on
Done(), bool cancelOnError) { | 174 StreamSubscription<T> _subscribe(void onData(T data), Function onError, void on
Done(), bool cancelOnError) { |
| 175 if (!_isInitialState) { | 175 if (!_isInitialState) { |
| 176 throw new StateError("Stream has already been listened to."); | 176 throw new StateError("Stream has already been listened to."); |
| 177 } | 177 } |
| 178 _ControllerSubscription subscription = new _ControllerSubscription(this, onData
, onError, onDone, cancelOnError); | 178 _ControllerSubscription subscription = new _ControllerSubscription(this, onData
, onError, onDone, cancelOnError); |
| 179 _PendingEvents pendingEvents = _pendingEvents; | 179 _PendingEvents pendingEvents = _pendingEvents; |
| 180 _state |= _STATE_SUBSCRIBED; | 180 _state |= _STATE_SUBSCRIBED; |
| 181 if (_isAddingStream) { | 181 if (_isAddingStream) { |
| 182 _StreamControllerAddStreamState addState = DEVC$RT.cast(_varData, dynamic, DEVC$
RT.type((_StreamControllerAddStreamState<dynamic> _) { | 182 _StreamControllerAddStreamState addState = DEVC$RT.cast(_varData, dynamic, DEVC$
RT.type((_StreamControllerAddStreamState<dynamic> _) { |
| 183 } | 183 } |
| 184 ), "CastGeneral", """line 505, column 50 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); | 184 ), "DynamicCast", """line 505, column 50 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); |
| 185 addState.varData = subscription; | 185 addState.varData = subscription; |
| 186 addState.resume(); | 186 addState.resume(); |
| 187 } | 187 } |
| 188 else { | 188 else { |
| 189 _varData = subscription; | 189 _varData = subscription; |
| 190 } | 190 } |
| 191 subscription._setPendingEvents(pendingEvents); | 191 subscription._setPendingEvents(pendingEvents); |
| 192 subscription._guardCallback(() { | 192 subscription._guardCallback(() { |
| 193 _runGuarded(_onListen); | 193 _runGuarded(_onListen); |
| 194 } | 194 } |
| 195 ); | 195 ); |
| 196 return DEVC$RT.cast(subscription, DEVC$RT.type((_ControllerSubscription<dynamic
> _) { | 196 return DEVC$RT.cast(subscription, DEVC$RT.type((_ControllerSubscription<dynamic
> _) { |
| 197 } | 197 } |
| 198 ), DEVC$RT.type((StreamSubscription<T> _) { | 198 ), DEVC$RT.type((StreamSubscription<T> _) { |
| 199 } | 199 } |
| 200 ), "CastDynamic", """line 516, column 12 of dart:async/stream_controller.dart: "
"", subscription is StreamSubscription<T>, false); | 200 ), "CompositeCast", """line 516, column 12 of dart:async/stream_controller.dart:
""", subscription is StreamSubscription<T>, false); |
| 201 } | 201 } |
| 202 Future _recordCancel(StreamSubscription<T> subscription) { | 202 Future _recordCancel(StreamSubscription<T> subscription) { |
| 203 Future result; | 203 Future result; |
| 204 if (_isAddingStream) { | 204 if (_isAddingStream) { |
| 205 _StreamControllerAddStreamState addState = DEVC$RT.cast(_varData, dynamic, DEVC$
RT.type((_StreamControllerAddStreamState<dynamic> _) { | 205 _StreamControllerAddStreamState addState = DEVC$RT.cast(_varData, dynamic, DEVC$
RT.type((_StreamControllerAddStreamState<dynamic> _) { |
| 206 } | 206 } |
| 207 ), "CastGeneral", """line 530, column 50 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); | 207 ), "DynamicCast", """line 530, column 50 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); |
| 208 result = addState.cancel(); | 208 result = addState.cancel(); |
| 209 } | 209 } |
| 210 _varData = null; | 210 _varData = null; |
| 211 _state = (_state & ~(_STATE_SUBSCRIBED | _STATE_ADDSTREAM)) | _STATE_CANCELED; | 211 _state = (_state & ~(_STATE_SUBSCRIBED | _STATE_ADDSTREAM)) | _STATE_CANCELED; |
| 212 if (_onCancel != null) { | 212 if (_onCancel != null) { |
| 213 if (result == null) { | 213 if (result == null) { |
| 214 try { | 214 try { |
| 215 result = ((__x84) => DEVC$RT.cast(__x84, dynamic, DEVC$RT.type((Future<dynam
ic> _) { | 215 result = ((__x84) => DEVC$RT.cast(__x84, dynamic, DEVC$RT.type((Future<dynam
ic> _) { |
| 216 } | 216 } |
| 217 ), "CastGeneral", """line 542, column 20 of dart:async/stream_controller.dar
t: """, __x84 is Future<dynamic>, true))(_onCancel()); | 217 ), "DynamicCast", """line 542, column 20 of dart:async/stream_controller.dar
t: """, __x84 is Future<dynamic>, true))(_onCancel()); |
| 218 } | 218 } |
| 219 catch (e, s) { | 219 catch (e, s) { |
| 220 result = new _Future().._asyncCompleteError(e, s); | 220 result = new _Future().._asyncCompleteError(e, s); |
| 221 } | 221 } |
| 222 } | 222 } |
| 223 else { | 223 else { |
| 224 result = result.whenComplete(_onCancel); | 224 result = result.whenComplete(_onCancel); |
| 225 } | 225 } |
| 226 } | 226 } |
| 227 void complete() { | 227 void complete() { |
| 228 if (_doneFuture != null && _doneFuture._mayComplete) { | 228 if (_doneFuture != null && _doneFuture._mayComplete) { |
| 229 _doneFuture._asyncComplete(null); | 229 _doneFuture._asyncComplete(null); |
| 230 } | 230 } |
| 231 } | 231 } |
| 232 if (result != null) { | 232 if (result != null) { |
| 233 result = result.whenComplete(complete); | 233 result = result.whenComplete(complete); |
| 234 } | 234 } |
| 235 else { | 235 else { |
| 236 complete(); | 236 complete(); |
| 237 } | 237 } |
| 238 return result; | 238 return result; |
| 239 } | 239 } |
| 240 void _recordPause(StreamSubscription<T> subscription) { | 240 void _recordPause(StreamSubscription<T> subscription) { |
| 241 if (_isAddingStream) { | 241 if (_isAddingStream) { |
| 242 _StreamControllerAddStreamState addState = DEVC$RT.cast(_varData, dynamic, DEVC$
RT.type((_StreamControllerAddStreamState<dynamic> _) { | 242 _StreamControllerAddStreamState addState = DEVC$RT.cast(_varData, dynamic, DEVC$
RT.type((_StreamControllerAddStreamState<dynamic> _) { |
| 243 } | 243 } |
| 244 ), "CastGeneral", """line 572, column 50 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); | 244 ), "DynamicCast", """line 572, column 50 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); |
| 245 addState.pause(); | 245 addState.pause(); |
| 246 } | 246 } |
| 247 _runGuarded(_onPause); | 247 _runGuarded(_onPause); |
| 248 } | 248 } |
| 249 void _recordResume(StreamSubscription<T> subscription) { | 249 void _recordResume(StreamSubscription<T> subscription) { |
| 250 if (_isAddingStream) { | 250 if (_isAddingStream) { |
| 251 _StreamControllerAddStreamState addState = DEVC$RT.cast(_varData, dynamic, DEVC$
RT.type((_StreamControllerAddStreamState<dynamic> _) { | 251 _StreamControllerAddStreamState addState = DEVC$RT.cast(_varData, dynamic, DEVC$
RT.type((_StreamControllerAddStreamState<dynamic> _) { |
| 252 } | 252 } |
| 253 ), "CastGeneral", """line 580, column 50 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); | 253 ), "DynamicCast", """line 580, column 50 of dart:async/stream_controller.dart: "
"", _varData is _StreamControllerAddStreamState<dynamic>, true); |
| 254 addState.resume(); | 254 addState.resume(); |
| 255 } | 255 } |
| 256 _runGuarded(_onResume); | 256 _runGuarded(_onResume); |
| 257 } | 257 } |
| 258 } | 258 } |
| 259 abstract class _SyncStreamControllerDispatch<T> implements _StreamController<T>
{void _sendData(T data) { | 259 abstract class _SyncStreamControllerDispatch<T> implements _StreamController<T>
{void _sendData(T data) { |
| 260 _subscription._add(data); | 260 _subscription._add(data); |
| 261 } | 261 } |
| 262 void _sendError(Object error, StackTrace stackTrace) { | 262 void _sendError(Object error, StackTrace stackTrace) { |
| 263 _subscription._addError(error, stackTrace); | 263 _subscription._addError(error, stackTrace); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 } | 295 } |
| 296 class _NoCallbackAsyncStreamController = _StreamController with _AsyncStreamCon
trollerDispatch, _NoCallbacks; | 296 class _NoCallbackAsyncStreamController = _StreamController with _AsyncStreamCon
trollerDispatch, _NoCallbacks; |
| 297 class _NoCallbackSyncStreamController = _StreamController with _SyncStreamContr
ollerDispatch, _NoCallbacks; | 297 class _NoCallbackSyncStreamController = _StreamController with _SyncStreamContr
ollerDispatch, _NoCallbacks; |
| 298 typedef _NotificationHandler(); | 298 typedef _NotificationHandler(); |
| 299 Future _runGuarded(_NotificationHandler notificationHandler) { | 299 Future _runGuarded(_NotificationHandler notificationHandler) { |
| 300 if (notificationHandler == null) return null; | 300 if (notificationHandler == null) return null; |
| 301 try { | 301 try { |
| 302 var result = notificationHandler(); | 302 var result = notificationHandler(); |
| 303 if (result is Future) return DEVC$RT.cast(result, dynamic, DEVC$RT.type((Future
<dynamic> _) { | 303 if (result is Future) return DEVC$RT.cast(result, dynamic, DEVC$RT.type((Future
<dynamic> _) { |
| 304 } | 304 } |
| 305 ), "CastGeneral", """line 665, column 34 of dart:async/stream_controller.dart: "
"", result is Future<dynamic>, true); | 305 ), "DynamicCast", """line 665, column 34 of dart:async/stream_controller.dart: "
"", result is Future<dynamic>, true); |
| 306 return null; | 306 return null; |
| 307 } | 307 } |
| 308 catch (e, s) { | 308 catch (e, s) { |
| 309 Zone.current.handleUncaughtError(e, s); | 309 Zone.current.handleUncaughtError(e, s); |
| 310 } | 310 } |
| 311 } | 311 } |
| 312 class _ControllerStream<T> extends _StreamImpl<T> {_StreamControllerLifecycle<T
> _controller; | 312 class _ControllerStream<T> extends _StreamImpl<T> {_StreamControllerLifecycle<T
> _controller; |
| 313 _ControllerStream(this._controller); | 313 _ControllerStream(this._controller); |
| 314 StreamSubscription<T> _createSubscription(void onData(T data), Function onError
, void onDone(), bool cancelOnError) => _controller._subscribe(onData, onError,
onDone, cancelOnError); | 314 StreamSubscription<T> _createSubscription(void onData(T data), Function onError
, void onDone(), bool cancelOnError) => _controller._subscribe(onData, onError,
onDone, cancelOnError); |
| 315 int get hashCode => _controller.hashCode ^ 0x35323532; | 315 int get hashCode => _controller.hashCode ^ 0x35323532; |
| 316 bool operator ==(Object other) { | 316 bool operator ==(Object other) { |
| 317 if (identical(this, other)) return true; | 317 if (identical(this, other)) return true; |
| 318 if (other is! _ControllerStream) return false; | 318 if (other is! _ControllerStream) return false; |
| 319 _ControllerStream otherStream = DEVC$RT.cast(other, Object, DEVC$RT.type((_Cont
rollerStream<dynamic> _) { | 319 _ControllerStream otherStream = DEVC$RT.cast(other, Object, DEVC$RT.type((_Cont
rollerStream<dynamic> _) { |
| 320 } | 320 } |
| 321 ), "CastGeneral", """line 693, column 37 of dart:async/stream_controller.dart: "
"", other is _ControllerStream<dynamic>, true); | 321 ), "AssignmentCast", """line 693, column 37 of dart:async/stream_controller.dart
: """, other is _ControllerStream<dynamic>, true); |
| 322 return identical(otherStream._controller, this._controller); | 322 return identical(otherStream._controller, this._controller); |
| 323 } | 323 } |
| 324 } | 324 } |
| 325 class _ControllerSubscription<T> extends _BufferingStreamSubscription<T> {final
_StreamControllerLifecycle<T> _controller; | 325 class _ControllerSubscription<T> extends _BufferingStreamSubscription<T> {final
_StreamControllerLifecycle<T> _controller; |
| 326 _ControllerSubscription(this._controller, void onData(T data), Function onError
, void onDone(), bool cancelOnError) : super(onData, onError, onDone, cancelOnEr
ror); | 326 _ControllerSubscription(this._controller, void onData(T data), Function onError
, void onDone(), bool cancelOnError) : super(onData, onError, onDone, cancelOnEr
ror); |
| 327 Future _onCancel() { | 327 Future _onCancel() { |
| 328 return _controller._recordCancel(this); | 328 return _controller._recordCancel(this); |
| 329 } | 329 } |
| 330 void _onPause() { | 330 void _onPause() { |
| 331 _controller._recordPause(this); | 331 _controller._recordPause(this); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 343 _target.addError(error, stackTrace); | 343 _target.addError(error, stackTrace); |
| 344 } | 344 } |
| 345 Future close() => _target.close(); | 345 Future close() => _target.close(); |
| 346 Future addStream(Stream<T> source, { | 346 Future addStream(Stream<T> source, { |
| 347 bool cancelOnError : true} | 347 bool cancelOnError : true} |
| 348 ) => _target.addStream(source, cancelOnError: cancelOnError); | 348 ) => _target.addStream(source, cancelOnError: cancelOnError); |
| 349 Future get done => _target.done; | 349 Future get done => _target.done; |
| 350 } | 350 } |
| 351 class _AddStreamState<T> {final _Future addStreamFuture; | 351 class _AddStreamState<T> {final _Future addStreamFuture; |
| 352 final StreamSubscription addSubscription; | 352 final StreamSubscription addSubscription; |
| 353 _AddStreamState(_EventSink<T> controller, Stream source, bool cancelOnError) :
addStreamFuture = new _Future(), addSubscription = source.listen(controller._add
, onError: ((__x85) => DEVC$RT.cast(__x85, dynamic, Function, "CastGeneral", """
line 746, column 50 of dart:async/stream_controller.dart: """, __x85 is Function
, true))(cancelOnError ? makeErrorHandler(controller) : controller._addError), o
nDone: controller._close, cancelOnError: cancelOnError); | 353 _AddStreamState(_EventSink<T> controller, Stream source, bool cancelOnError) :
addStreamFuture = new _Future(), addSubscription = source.listen(controller._add
, onError: ((__x85) => DEVC$RT.cast(__x85, dynamic, Function, "DynamicCast", """
line 746, column 50 of dart:async/stream_controller.dart: """, __x85 is Function
, true))(cancelOnError ? makeErrorHandler(controller) : controller._addError), o
nDone: controller._close, cancelOnError: cancelOnError); |
| 354 static makeErrorHandler(_EventSink controller) => (e, StackTrace s) { | 354 static makeErrorHandler(_EventSink controller) => (e, StackTrace s) { |
| 355 controller._addError(e, s); | 355 controller._addError(e, s); |
| 356 controller._close(); | 356 controller._close(); |
| 357 } | 357 } |
| 358 ; | 358 ; |
| 359 void pause() { | 359 void pause() { |
| 360 addSubscription.pause(); | 360 addSubscription.pause(); |
| 361 } | 361 } |
| 362 void resume() { | 362 void resume() { |
| 363 addSubscription.resume(); | 363 addSubscription.resume(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 375 } | 375 } |
| 376 void complete() { | 376 void complete() { |
| 377 addStreamFuture._asyncComplete(null); | 377 addStreamFuture._asyncComplete(null); |
| 378 } | 378 } |
| 379 } | 379 } |
| 380 class _StreamControllerAddStreamState<T> extends _AddStreamState<T> {var varDat
a; | 380 class _StreamControllerAddStreamState<T> extends _AddStreamState<T> {var varDat
a; |
| 381 _StreamControllerAddStreamState(_StreamController controller, this.varData, Str
eam source, bool cancelOnError) : super(DEVC$RT.cast(controller, DEVC$RT.type((_
StreamController<dynamic> _) { | 381 _StreamControllerAddStreamState(_StreamController controller, this.varData, Str
eam source, bool cancelOnError) : super(DEVC$RT.cast(controller, DEVC$RT.type((_
StreamController<dynamic> _) { |
| 382 } | 382 } |
| 383 ), DEVC$RT.type((_EventSink<T> _) { | 383 ), DEVC$RT.type((_EventSink<T> _) { |
| 384 } | 384 } |
| 385 ), "CastDynamic", """line 798, column 15 of dart:async/stream_controller.dart: "
"", controller is _EventSink<T>, false), source, cancelOnError) { | 385 ), "CompositeCast", """line 798, column 15 of dart:async/stream_controller.dart:
""", controller is _EventSink<T>, false), source, cancelOnError) { |
| 386 if (controller.isPaused) { | 386 if (controller.isPaused) { |
| 387 addSubscription.pause(); | 387 addSubscription.pause(); |
| 388 } | 388 } |
| 389 } | 389 } |
| 390 } | 390 } |
| OLD | NEW |