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

Unified Diff: runtime/bin/socket_patch.dart

Issue 25094002: Adapt streams for additional stackTrace argument. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove types in closures. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/watcher/lib/src/directory_watcher.dart ('k') | sdk/lib/_internal/dartdoc/lib/dartdoc.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_patch.dart
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 4fffbf7681da5b896221836d310aa03aa98cb514..9f487d4700e86b5854f5fb4ffdd3aa200ab5440c 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -701,7 +701,7 @@ class _RawServerSocket extends Stream<RawSocket>
}
StreamSubscription<RawSocket> listen(void onData(RawSocket event),
- {void onError(Object error),
+ {Function onError,
void onDone(),
bool cancelOnError}) {
return _controller.stream.listen(
@@ -801,7 +801,7 @@ class _RawSocket extends Stream<RawSocketEvent>
}
StreamSubscription<RawSocketEvent> listen(void onData(RawSocketEvent event),
- {void onError(Object error),
+ {Function onError,
void onDone(),
bool cancelOnError}) {
return _controller.stream.listen(
@@ -913,7 +913,7 @@ class _ServerSocket extends Stream<Socket>
_ServerSocket(this._socket);
StreamSubscription<Socket> listen(void onData(Socket event),
- {void onError(error),
+ {Function onError,
void onDone(),
bool cancelOnError}) {
return _socket.map((rawSocket) => new _Socket(rawSocket)).listen(
@@ -961,9 +961,9 @@ class _SocketStreamConsumer extends StreamConsumer<List<int>> {
offset = 0;
write();
},
- onError: (error) {
+ onError: (error, [stackTrace]) {
socket._consumerDone();
- done(error);
+ done(error, stackTrace);
},
onDone: () {
done();
@@ -1004,10 +1004,10 @@ class _SocketStreamConsumer extends StreamConsumer<List<int>> {
}
}
- void done([error]) {
+ void done([error, stackTrace]) {
if (streamCompleter != null) {
if (error != null) {
- streamCompleter.completeError(error);
+ streamCompleter.completeError(error, stackTrace);
} else {
streamCompleter.complete(socket);
}
@@ -1062,7 +1062,7 @@ class _Socket extends Stream<List<int>> implements Socket {
_NativeSocket get _nativeSocket => _raw._socket;
StreamSubscription<List<int>> listen(void onData(List<int> event),
- {void onError(error),
+ {Function onError,
void onDone(),
bool cancelOnError}) {
return _controller.stream.listen(
@@ -1189,13 +1189,13 @@ class _Socket extends Stream<List<int>> implements Socket {
_consumer.done();
}
- void _onError(error) {
+ void _onError(error, stackTrace) {
if (!_controllerClosed) {
_controllerClosed = true;
- _controller.addError(error);
+ _controller.addError(error, stackTrace);
_controller.close();
}
- _consumer.done(error);
+ _consumer.done(error, stackTrace);
}
int _write(List<int> data, int offset, int length) =>
« no previous file with comments | « pkg/watcher/lib/src/directory_watcher.dart ('k') | sdk/lib/_internal/dartdoc/lib/dartdoc.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698