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

Unified Diff: runtime/bin/socket.cc

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.cc
diff --git a/runtime/bin/socket.cc b/runtime/bin/socket.cc
index 01793a17040460cfc8fcf3fe962f5d6f2d4eb142..4997e989007e7851b1dea0b76d51fada74b2524c 100644
--- a/runtime/bin/socket.cc
+++ b/runtime/bin/socket.cc
@@ -58,7 +58,9 @@ void FUNCTION_NAME(Socket_ReadList)(Dart_NativeArguments args) {
if (bytes_read > 0) {
Dart_Handle result =
Dart_ListSetAsBytes(buffer_obj, offset, buffer, bytes_read);
- ASSERT(!Dart_IsError(result));
+ if (Dart_IsError(result)) {
turnidge 2011/11/16 18:50:18 Diito previous comment.
+ bytes_read = -1;
+ }
} else if (bytes_read < 0) {
bytes_read = 0;
}

Powered by Google App Engine
This is Rietveld 408576698