| Index: sdk/lib/html/dart2js/html_dart2js.dart
|
| diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
|
| index 0f07ca96b9208a8af3a36809553888bb23cf3d9d..21fa7bb788cc0a580aa3ac7c4eaaf0f915c29d33 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -31049,9 +31049,7 @@ class _EventStreamSubscription<T extends Event> extends StreamSubscription<T> {
|
| }
|
|
|
| void cancel() {
|
| - if (_canceled) {
|
| - throw new StateError("Subscription has been canceled.");
|
| - }
|
| + if (_canceled) return;
|
|
|
| _unlisten();
|
| // Clear out the target to indicate this is complete.
|
| @@ -31079,9 +31077,7 @@ class _EventStreamSubscription<T extends Event> extends StreamSubscription<T> {
|
| void onDone(void handleDone()) {}
|
|
|
| void pause([Future resumeSignal]) {
|
| - if (_canceled) {
|
| - throw new StateError("Subscription has been canceled.");
|
| - }
|
| + if (_canceled) return;
|
| ++_pauseCount;
|
| _unlisten();
|
|
|
| @@ -31093,12 +31089,7 @@ class _EventStreamSubscription<T extends Event> extends StreamSubscription<T> {
|
| bool get _paused => _pauseCount > 0;
|
|
|
| void resume() {
|
| - if (_canceled) {
|
| - throw new StateError("Subscription has been canceled.");
|
| - }
|
| - if (!_paused) {
|
| - throw new StateError("Subscription is not paused.");
|
| - }
|
| + if (_canceled || !_paused) return;
|
| --_pauseCount;
|
| _tryResume();
|
| }
|
|
|