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

Unified Diff: runtime/bin/eventhandler_win.cc

Issue 316813006: Fix previous fix, by still making 'handle' the socket. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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/eventhandler_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_win.cc
diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc
index 579caf62f84084217d019a616487b8af340c8412..475a79e16e750ce3605b8b7e4761638e148b34ad 100644
--- a/runtime/bin/eventhandler_win.cc
+++ b/runtime/bin/eventhandler_win.cc
@@ -159,8 +159,8 @@ void Handle::Unlock() {
}
-bool Handle::DoCreateCompletionPort(HANDLE handle, HANDLE completion_port) {
- completion_port_ = CreateIoCompletionPort(handle,
+bool Handle::CreateCompletionPort(HANDLE completion_port) {
+ completion_port_ = CreateIoCompletionPort(handle(),
completion_port,
reinterpret_cast<ULONG_PTR>(this),
0);
@@ -171,11 +171,6 @@ bool Handle::DoCreateCompletionPort(HANDLE handle, HANDLE completion_port) {
}
-bool Handle::CreateCompletionPort(HANDLE completion_port) {
- return DoCreateCompletionPort(handle_, completion_port_);
-}
-
-
void Handle::Close() {
ScopedLock lock(this);
if (!IsClosing()) {
@@ -437,12 +432,6 @@ void DirectoryWatchHandle::Stop() {
}
-bool SocketHandle::CreateCompletionPort(HANDLE completion_port) {
- HANDLE handle = reinterpret_cast<HANDLE>(socket());
- return DoCreateCompletionPort(handle, completion_port);
-}
-
-
void SocketHandle::HandleIssueError() {
int error = WSAGetLastError();
if (error == WSAECONNRESET) {
@@ -819,6 +808,7 @@ void ClientSocket::DoClose() {
// Always do a shutdown before initiating a disconnect.
shutdown(socket(), SD_BOTH);
IssueDisconnect();
+ handle_ = INVALID_HANDLE_VALUE;
}
« no previous file with comments | « runtime/bin/eventhandler_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698