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

Unified Diff: runtime/bin/socket.cc

Issue 11614028: Revert "Fixes to eventhandler and HTTP" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | « runtime/bin/eventhandler_win.cc ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket.cc
diff --git a/runtime/bin/socket.cc b/runtime/bin/socket.cc
index ae73152368703e3b872d9266964b5ebc6fa9539c..e0e82420b8f7461396e27d514adb8234aaf33888 100644
--- a/runtime/bin/socket.cc
+++ b/runtime/bin/socket.cc
@@ -187,7 +187,7 @@ void FUNCTION_NAME(Socket_WriteList)(Dart_NativeArguments args) {
Dart_PropagateError(result);
}
bytes_written = Socket::Write(socket, buffer, length);
- if (bytes_written > 0) total_bytes_written = bytes_written;
+ total_bytes_written = bytes_written;
} else {
// Send data in chunks of maximum 16KB.
const intptr_t max_chunk_length =
@@ -206,11 +206,11 @@ void FUNCTION_NAME(Socket_WriteList)(Dart_NativeArguments args) {
}
bytes_written =
Socket::Write(socket, reinterpret_cast<void*>(buffer), chunk_length);
- if (bytes_written > 0) total_bytes_written += bytes_written;
+ total_bytes_written += bytes_written;
} while (bytes_written > 0 && total_bytes_written < length);
delete[] buffer;
}
- if (total_bytes_written >= 0) {
+ if (bytes_written >= 0) {
Dart_SetReturnValue(args, Dart_NewInteger(total_bytes_written));
} else {
Dart_SetReturnValue(args, DartUtils::NewDartOSError());
« no previous file with comments | « runtime/bin/eventhandler_win.cc ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698