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

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

Issue 50453005: Propagate stack traces. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | « sdk/lib/async/stream.dart ('k') | tests/co19/co19-co19.status » ('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 // ------------------------------------------------------------------- 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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 } 649 }
650 } 650 }
651 651
652 652
653 /** A class that exposes only the [StreamSink] interface of an object. */ 653 /** A class that exposes only the [StreamSink] interface of an object. */
654 class _StreamSinkWrapper<T> implements StreamSink<T> { 654 class _StreamSinkWrapper<T> implements StreamSink<T> {
655 final StreamController _target; 655 final StreamController _target;
656 _StreamSinkWrapper(this._target); 656 _StreamSinkWrapper(this._target);
657 void add(T data) { _target.add(data); } 657 void add(T data) { _target.add(data); }
658 void addError(Object error, [StackTrace stackTrace]) { 658 void addError(Object error, [StackTrace stackTrace]) {
659 _target.addError(error); 659 _target.addError(error, stackTrace);
660 } 660 }
661 Future close() => _target.close(); 661 Future close() => _target.close();
662 Future addStream(Stream<T> source) => _target.addStream(source); 662 Future addStream(Stream<T> source) => _target.addStream(source);
663 Future get done => _target.done; 663 Future get done => _target.done;
664 } 664 }
665 665
666 /** 666 /**
667 * Object containing the state used to handle [StreamController.addStream]. 667 * Object containing the state used to handle [StreamController.addStream].
668 */ 668 */
669 class _AddStreamState<T> { 669 class _AddStreamState<T> {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 _StreamControllerAddStreamState(_StreamController controller, 715 _StreamControllerAddStreamState(_StreamController controller,
716 this.varData, 716 this.varData,
717 Stream source, 717 Stream source,
718 bool cancelOnError) 718 bool cancelOnError)
719 : super(controller, source, cancelOnError) { 719 : super(controller, source, cancelOnError) {
720 if (controller.isPaused) { 720 if (controller.isPaused) {
721 addSubscription.pause(); 721 addSubscription.pause();
722 } 722 }
723 } 723 }
724 } 724 }
OLDNEW
« no previous file with comments | « sdk/lib/async/stream.dart ('k') | tests/co19/co19-co19.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698