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

Unified Diff: runtime/bin/socket.cc

Issue 8659032: Fix memory leak in MacOS process handling. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. 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
« no previous file with comments | « runtime/bin/process_macos.cc ('k') | runtime/bin/socket.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 4997e989007e7851b1dea0b76d51fada74b2524c..e26a5e7c602ba98aea3bef6c5b2fb7e8c26c79ac 100644
--- a/runtime/bin/socket.cc
+++ b/runtime/bin/socket.cc
@@ -61,8 +61,6 @@ void FUNCTION_NAME(Socket_ReadList)(Dart_NativeArguments args) {
if (Dart_IsError(result)) {
bytes_read = -1;
}
- } else if (bytes_read < 0) {
- bytes_read = 0;
}
delete[] buffer;
Dart_SetReturnValue(args, Dart_NewInteger(bytes_read));
@@ -96,9 +94,6 @@ void FUNCTION_NAME(Socket_WriteList)(Dart_NativeArguments args) {
intptr_t total_bytes_written =
Socket::Write(socket, reinterpret_cast<void*>(buffer), length);
delete[] buffer;
- if (total_bytes_written < 0) {
- total_bytes_written = 0;
- }
Dart_SetReturnValue(args, Dart_NewInteger(total_bytes_written));
Dart_ExitScope();
}
« no previous file with comments | « runtime/bin/process_macos.cc ('k') | runtime/bin/socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698