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

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

Issue 598993002: Add missing null-tests to async error functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add co19 issue number to status file. Created 6 years, 2 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 | « sdk/lib/async/future_impl.dart ('k') | sdk/lib/async/stream_controller.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Core Stream types 8 // Core Stream types
9 // ------------------------------------------------------------------- 9 // -------------------------------------------------------------------
10 10
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 1375
1376 1376
1377 /** 1377 /**
1378 * An interface that abstracts creation or handling of [Stream] events. 1378 * An interface that abstracts creation or handling of [Stream] events.
1379 */ 1379 */
1380 abstract class EventSink<T> implements Sink<T> { 1380 abstract class EventSink<T> implements Sink<T> {
1381 /** Send a data event to a stream. */ 1381 /** Send a data event to a stream. */
1382 void add(T event); 1382 void add(T event);
1383 /** Send an async error to a stream. */ 1383 /** Send an async error to a stream. */
1384 void addError(errorEvent, [StackTrace stackTrace]); 1384 void addError(errorEvent, [StackTrace stackTrace]);
1385 /** Send a done event to a stream.*/ 1385 /** Send a done event to a stream. */
1386 void close(); 1386 void close();
1387 } 1387 }
1388 1388
1389 1389
1390 /** [Stream] wrapper that only exposes the [Stream] interface. */ 1390 /** [Stream] wrapper that only exposes the [Stream] interface. */
1391 class StreamView<T> extends Stream<T> { 1391 class StreamView<T> extends Stream<T> {
1392 Stream<T> _stream; 1392 Stream<T> _stream;
1393 1393
1394 StreamView(this._stream); 1394 StreamView(this._stream);
1395 1395
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1636 class _ControllerEventSinkWrapper<T> implements EventSink<T> { 1636 class _ControllerEventSinkWrapper<T> implements EventSink<T> {
1637 EventSink _sink; 1637 EventSink _sink;
1638 _ControllerEventSinkWrapper(this._sink); 1638 _ControllerEventSinkWrapper(this._sink);
1639 1639
1640 void add(T data) { _sink.add(data); } 1640 void add(T data) { _sink.add(data); }
1641 void addError(error, [StackTrace stackTrace]) { 1641 void addError(error, [StackTrace stackTrace]) {
1642 _sink.addError(error, stackTrace); 1642 _sink.addError(error, stackTrace);
1643 } 1643 }
1644 void close() { _sink.close(); } 1644 void close() { _sink.close(); }
1645 } 1645 }
OLDNEW
« no previous file with comments | « sdk/lib/async/future_impl.dart ('k') | sdk/lib/async/stream_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698