| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/globals.h" | 5 #include "platform/globals.h" |
| 6 #if defined(TARGET_OS_WINDOWS) | 6 #if defined(TARGET_OS_WINDOWS) |
| 7 | 7 |
| 8 #include "bin/eventhandler.h" | 8 #include "bin/eventhandler.h" |
| 9 | 9 |
| 10 #include <winsock2.h> // NOLINT | 10 #include <winsock2.h> // NOLINT |
| (...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 938 | 938 |
| 939 | 939 |
| 940 void EventHandlerImplementation::HandleInterrupt(InterruptMessage* msg) { | 940 void EventHandlerImplementation::HandleInterrupt(InterruptMessage* msg) { |
| 941 if (msg->id == kTimeoutId) { | 941 if (msg->id == kTimeoutId) { |
| 942 // Change of timeout request. Just set the new timeout and port as the | 942 // Change of timeout request. Just set the new timeout and port as the |
| 943 // completion thread will use the new timeout value for its next wait. | 943 // completion thread will use the new timeout value for its next wait. |
| 944 timeout_queue_.UpdateTimeout(msg->dart_port, msg->data); | 944 timeout_queue_.UpdateTimeout(msg->dart_port, msg->data); |
| 945 } else if (msg->id == kShutdownId) { | 945 } else if (msg->id == kShutdownId) { |
| 946 shutdown_ = true; | 946 shutdown_ = true; |
| 947 } else { | 947 } else { |
| 948 // No tokens to return on Windows. |
| 949 if ((msg->data & (1 << kReturnTokenCommand)) != 0) return; |
| 948 Handle* handle = reinterpret_cast<Handle*>(msg->id); | 950 Handle* handle = reinterpret_cast<Handle*>(msg->id); |
| 949 ASSERT(handle != NULL); | 951 ASSERT(handle != NULL); |
| 950 if (handle->is_listen_socket()) { | 952 if (handle->is_listen_socket()) { |
| 951 ListenSocket* listen_socket = | 953 ListenSocket* listen_socket = |
| 952 reinterpret_cast<ListenSocket*>(handle); | 954 reinterpret_cast<ListenSocket*>(handle); |
| 953 listen_socket->EnsureInitialized(this); | 955 listen_socket->EnsureInitialized(this); |
| 954 listen_socket->SetPortAndMask(msg->dart_port, msg->data); | 956 listen_socket->SetPortAndMask(msg->dart_port, msg->data); |
| 955 | 957 |
| 956 Handle::ScopedLock lock(listen_socket); | 958 Handle::ScopedLock lock(listen_socket); |
| 957 | 959 |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1287 | 1289 |
| 1288 | 1290 |
| 1289 void EventHandlerImplementation::Shutdown() { | 1291 void EventHandlerImplementation::Shutdown() { |
| 1290 SendData(kShutdownId, 0, 0); | 1292 SendData(kShutdownId, 0, 0); |
| 1291 } | 1293 } |
| 1292 | 1294 |
| 1293 } // namespace bin | 1295 } // namespace bin |
| 1294 } // namespace dart | 1296 } // namespace dart |
| 1295 | 1297 |
| 1296 #endif // defined(TARGET_OS_WINDOWS) | 1298 #endif // defined(TARGET_OS_WINDOWS) |
| OLD | NEW |