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

Unified Diff: runtime/bin/socket_linux.cc

Issue 169383003: Make event-handlers edge-triggered and move socket-state to Dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months 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/socket.cc ('k') | runtime/bin/socket_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_linux.cc
diff --git a/runtime/bin/socket_linux.cc b/runtime/bin/socket_linux.cc
index 9d89f35de0a4ba12ba44c294b9d6b4cea853ae2d..db7704b211e3a2d47e29d38c32678992bfbef3b3 100644
--- a/runtime/bin/socket_linux.cc
+++ b/runtime/bin/socket_linux.cc
@@ -20,6 +20,7 @@
#include "bin/log.h"
#include "bin/signal_blocker.h"
#include "bin/socket.h"
+#include "vm/thread.h"
namespace dart {
@@ -205,11 +206,13 @@ SocketAddress* Socket::GetRemotePeer(intptr_t fd, intptr_t* port) {
void Socket::GetError(intptr_t fd, OSError* os_error) {
int len = sizeof(errno);
+ int err = 0;
getsockopt(fd,
SOL_SOCKET,
SO_ERROR,
- &errno,
+ &err,
reinterpret_cast<socklen_t*>(&len));
+ errno = err;
os_error->SetCodeAndMessage(OSError::kSystem, errno);
}
« no previous file with comments | « runtime/bin/socket.cc ('k') | runtime/bin/socket_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698