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

Unified Diff: sdk/lib/io/http_impl.dart

Issue 14251006: Remove AsyncError with Expando. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 8 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 | « sdk/lib/io/file_impl.dart ('k') | sdk/lib/io/http_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_impl.dart
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index f30d76cc97e09f48defadb91ba29c82c403e5885..1cdcc81eacefb263663258e4d022b58b9c0e25ec 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -35,7 +35,7 @@ class _HttpIncoming extends Stream<List<int>> {
}
StreamSubscription<List<int>> listen(void onData(List<int> event),
- {void onError(AsyncError error),
+ {void onError(error),
void onDone(),
bool cancelOnError}) {
return _stream.listen(onData,
@@ -106,7 +106,7 @@ class _HttpRequest extends _HttpInboundMessage implements HttpRequest {
}
StreamSubscription<List<int>> listen(void onData(List<int> event),
- {void onError(AsyncError error),
+ {void onError(error),
void onDone(),
bool cancelOnError}) {
return _incoming.listen(onData,
@@ -231,7 +231,7 @@ class _HttpClientResponse
}
StreamSubscription<List<int>> listen(void onData(List<int> event),
- {void onError(AsyncError error),
+ {void onError(error),
void onDone(),
bool cancelOnError}) {
var stream = _incoming;
@@ -442,7 +442,7 @@ abstract class _HttpOutboundMessage<T> implements IOSink {
_dataSink.add(data);
}
- void addError(AsyncError error) {
+ void addError(error) {
_dataSink.addError(error);
}
@@ -879,7 +879,7 @@ class _HttpClientRequest extends _HttpOutboundMessage<HttpClientResponse>
});
}
- void _onError(AsyncError error) {
+ void _onError(error) {
_responseCompleter.completeError(error);
}
@@ -978,11 +978,11 @@ class _ContentLengthValidator
void handleData(List<int> data, EventSink<List<int>> sink) {
_bytesWritten += data.length;
if (_bytesWritten > expectedContentLength) {
- sink.addError(new AsyncError(new HttpException(
+ sink.addError(new HttpException(
"Content size exceeds specified contentLength. "
"$_bytesWritten bytes written while expected "
"$expectedContentLength. "
- "[${new String.fromCharCodes(data)}]")));
+ "[${new String.fromCharCodes(data)}]"));
sink.close();
} else {
sink.add(data);
@@ -991,10 +991,10 @@ class _ContentLengthValidator
void handleDone(EventSink<List<int>> sink) {
if (_bytesWritten < expectedContentLength) {
- sink.addError(new AsyncError(new HttpException(
+ sink.addError(new HttpException(
"Content size below specified contentLength. "
" $_bytesWritten bytes written while expected "
- "$expectedContentLength.")));
+ "$expectedContentLength."));
}
sink.close();
}
@@ -1386,7 +1386,7 @@ class _HttpClient implements HttpClient {
return new _ConnnectionInfo(connection, proxy);
}, onError: (error) {
// Continue with next proxy.
- return connect(error.error);
+ return connect(error);
});
}
return connect(new HttpException("No proxies given"));
@@ -1594,7 +1594,7 @@ class _HttpServer extends Stream<HttpRequest> implements HttpServer {
: _closeServer = false;
StreamSubscription<HttpRequest> listen(void onData(HttpRequest event),
- {void onError(AsyncError error),
+ {void onError(error),
void onDone(),
bool cancelOnError}) {
_serverSocket.listen(
@@ -1640,7 +1640,7 @@ class _HttpServer extends Stream<HttpRequest> implements HttpServer {
_controller.add(request);
}
- void _handleError(AsyncError error) {
+ void _handleError(error) {
if (!closed) _controller.addError(error);
}
@@ -1797,7 +1797,7 @@ class _DetachedSocket extends Stream<List<int>> implements Socket {
_DetachedSocket(this._socket, this._incoming);
StreamSubscription<List<int>> listen(void onData(List<int> event),
- {void onError(AsyncError error),
+ {void onError(error),
void onDone(),
bool cancelOnError}) {
return _incoming.listen(onData,
@@ -1824,7 +1824,7 @@ class _DetachedSocket extends Stream<List<int>> implements Socket {
void add(List<int> bytes) => _socket.add(bytes);
- void addError(AsyncError error) => _socket.addError(error);
+ void addError(error) => _socket.addError(error);
Future<Socket> addStream(Stream<List<int>> stream) {
return _socket.addStream(stream);
« no previous file with comments | « sdk/lib/io/file_impl.dart ('k') | sdk/lib/io/http_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698