Chromium Code Reviews| 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; |
| } |