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

Unified Diff: runtime/bin/socket_impl.dart

Issue 8575004: Test for immutable Lists in ListSet API methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
Index: runtime/bin/socket_impl.dart
diff --git a/runtime/bin/socket_impl.dart b/runtime/bin/socket_impl.dart
index ef909cac57cbe264b790a355c29c267da0d13352..9cc1a1a5bbfadccc209624b4fa2452693f1beffd 100644
--- a/runtime/bin/socket_impl.dart
+++ b/runtime/bin/socket_impl.dart
@@ -296,7 +296,11 @@ class _Socket extends _SocketBase implements Socket {
if ((offset + bytes) > buffer.length) {
throw new IndexOutOfRangeException(offset + bytes);
}
- return _readList(buffer, offset, bytes);
+ int result = _readList(buffer, offset, bytes);
+ if (result < 0) {
+ throw new SocketIOException("Error: readList failed");
turnidge 2011/11/16 18:50:18 Yeah, here would be a good place to have that erro
+ }
+ return result;
}
throw new
SocketIOException("Error: readList failed - invalid socket handle");
« runtime/bin/socket.cc ('K') | « runtime/bin/socket.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698