| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart.async; | 5 part of dart.async; |
| 6 | 6 |
| 7 // ------------------------------------------------------------------- | 7 // ------------------------------------------------------------------- |
| 8 // Controller for creating and adding events to a stream. | 8 // Controller for creating and adding events to a stream. |
| 9 // ------------------------------------------------------------------- | 9 // ------------------------------------------------------------------- |
| 10 | 10 |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 void this._onCancel()); | 553 void this._onCancel()); |
| 554 } | 554 } |
| 555 | 555 |
| 556 abstract class _NoCallbacks { | 556 abstract class _NoCallbacks { |
| 557 _NotificationHandler get _onListen => null; | 557 _NotificationHandler get _onListen => null; |
| 558 _NotificationHandler get _onPause => null; | 558 _NotificationHandler get _onPause => null; |
| 559 _NotificationHandler get _onResume => null; | 559 _NotificationHandler get _onResume => null; |
| 560 _NotificationHandler get _onCancel => null; | 560 _NotificationHandler get _onCancel => null; |
| 561 } | 561 } |
| 562 | 562 |
| 563 typedef _NoCallbackAsyncStreamController/*<T>*/ = _StreamController/*<T>*/ | 563 class _NoCallbackAsyncStreamController/*<T>*/ = _StreamController/*<T>*/ |
| 564 with _AsyncStreamControllerDispatch/*<T>*/, _NoCallbacks; | 564 with _AsyncStreamControllerDispatch/*<T>*/, _NoCallbacks; |
| 565 | 565 |
| 566 typedef _NoCallbackSyncStreamController/*<T>*/ = _StreamController/*<T>*/ | 566 class _NoCallbackSyncStreamController/*<T>*/ = _StreamController/*<T>*/ |
| 567 with _SyncStreamControllerDispatch/*<T>*/, _NoCallbacks; | 567 with _SyncStreamControllerDispatch/*<T>*/, _NoCallbacks; |
| 568 | 568 |
| 569 typedef void _NotificationHandler(); | 569 typedef void _NotificationHandler(); |
| 570 | 570 |
| 571 void _runGuarded(_NotificationHandler notificationHandler) { | 571 void _runGuarded(_NotificationHandler notificationHandler) { |
| 572 if (notificationHandler == null) return; | 572 if (notificationHandler == null) return; |
| 573 try { | 573 try { |
| 574 notificationHandler(); | 574 notificationHandler(); |
| 575 } catch (e, s) { | 575 } catch (e, s) { |
| 576 Zone.current.handleUncaughtError(_asyncError(e, s), s); | 576 Zone.current.handleUncaughtError(_asyncError(e, s), s); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 var varData; | 674 var varData; |
| 675 | 675 |
| 676 _StreamControllerAddStreamState(_StreamController controller, | 676 _StreamControllerAddStreamState(_StreamController controller, |
| 677 this.varData, | 677 this.varData, |
| 678 Stream source) : super(controller, source) { | 678 Stream source) : super(controller, source) { |
| 679 if (controller.isPaused) { | 679 if (controller.isPaused) { |
| 680 addSubscription.pause(); | 680 addSubscription.pause(); |
| 681 } | 681 } |
| 682 } | 682 } |
| 683 } | 683 } |
| OLD | NEW |