Chromium Code Reviews| Index: runtime/bin/eventhandler_win.cc |
| diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc |
| index 934c7ca96cdf1cff572e2455e7e8bdcbf0e93f8d..747de5b847ce01491cc7c5f30153fdf77f9853fa 100644 |
| --- a/runtime/bin/eventhandler_win.cc |
| +++ b/runtime/bin/eventhandler_win.cc |
| @@ -159,8 +159,8 @@ void Handle::Unlock() { |
| } |
| -bool Handle::CreateCompletionPort(HANDLE completion_port) { |
| - completion_port_ = CreateIoCompletionPort(handle_, |
| +bool Handle::DoCreateCompletionPort(HANDLE handle, HANDLE completion_port) { |
| + completion_port_ = CreateIoCompletionPort(handle, |
| completion_port, |
| reinterpret_cast<ULONG_PTR>(this), |
| 0); |
| @@ -171,6 +171,11 @@ bool Handle::CreateCompletionPort(HANDLE completion_port) { |
| } |
| +bool Handle::CreateCompletionPort(HANDLE completion_port) { |
| + return DoCreateCompletionPort(handle_, completion_port_); |
| +} |
| + |
| + |
| void Handle::Close() { |
| ScopedLock lock(this); |
| if (!IsClosing()) { |
| @@ -432,6 +437,12 @@ void DirectoryWatchHandle::Stop() { |
| } |
| +bool SocketHandle::CreateCompletionPort(HANDLE completion_port) { |
| + return DoCreateCompletionPort( |
|
kasperl
2014/06/04 14:09:19
I'd pull the handle out into a local variable, but
Anders Johnsen
2014/06/04 14:16:32
Done.
|
| + reinterpret_cast<HANDLE>(socket()), completion_port); |
| +} |
| + |
| + |
| void SocketHandle::HandleIssueError() { |
| int error = WSAGetLastError(); |
| if (error == WSAECONNRESET) { |