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

Side by Side Diff: dart/sdk/lib/async/stream_impl.dart

Issue 11773043: More cuddling dart2js checked mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/sdk/lib/core/iterable.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // States shared by single/multi stream implementations. 7 // States shared by single/multi stream implementations.
8 8
9 /// Initial and default state where the stream can receive and send events. 9 /// Initial and default state where the stream can receive and send events.
10 const int _STREAM_OPEN = 0; 10 const int _STREAM_OPEN = 0;
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 * The subscription is in one of three states: 637 * The subscription is in one of three states:
638 * * Subscribed. 638 * * Subscribed.
639 * * Paused-and-subscribed. 639 * * Paused-and-subscribed.
640 * * Unsubscribed. 640 * * Unsubscribed.
641 * Unsubscribing also unpauses. 641 * Unsubscribing also unpauses.
642 */ 642 */
643 class _StreamSubscriptionImpl<T> extends _StreamListener<T> 643 class _StreamSubscriptionImpl<T> extends _StreamListener<T>
644 implements StreamSubscription<T> { 644 implements StreamSubscription<T> {
645 final bool _unsubscribeOnError; 645 final bool _unsubscribeOnError;
646 // TODO(ahe): Restore type when feature is implemented in dart2js 646 // TODO(ahe): Restore type when feature is implemented in dart2js
647 // checked mode. 647 // checked mode. http://dartbug.com/7733
648 var /* _DataHandler<T> */ _onData; 648 var /* _DataHandler<T> */ _onData;
649 _ErrorHandler _onError; 649 _ErrorHandler _onError;
650 _DoneHandler _onDone; 650 _DoneHandler _onDone;
651 _StreamSubscriptionImpl(_StreamImpl source, 651 _StreamSubscriptionImpl(_StreamImpl source,
652 this._onData, 652 this._onData,
653 this._onError, 653 this._onError,
654 this._onDone, 654 this._onDone,
655 this._unsubscribeOnError) : super(source); 655 this._unsubscribeOnError) : super(source);
656 656
657 void onData(void handleData(T event)) { 657 void onData(void handleData(T event)) {
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 if (_isComplete) { 1010 if (_isComplete) {
1011 throw new StateError("Subscription has been canceled."); 1011 throw new StateError("Subscription has been canceled.");
1012 } 1012 }
1013 if (_timer != null) { 1013 if (_timer != null) {
1014 _timer.cancel(); 1014 _timer.cancel();
1015 _timer = null; 1015 _timer = null;
1016 } 1016 }
1017 _pauseCount = 0; 1017 _pauseCount = 0;
1018 } 1018 }
1019 } 1019 }
OLDNEW
« no previous file with comments | « no previous file | dart/sdk/lib/core/iterable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698