diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc index 1a179e2e9814..1683ac7a376e 100644 --- a/runtime/bin/eventhandler_win.cc +++ b/runtime/bin/eventhandler_win.cc @@ -148,15 +148,7 @@ void Handle::Close() { // If the handle uses synchronous I/O (e.g. stdin), cancel any pending // operation before closing the handle, so the read thread is not blocked. BOOL result = CancelIoEx(handle_, nullptr); -// The Dart code 'stdin.listen(() {}).cancel()' causes this assert to be -// triggered on Windows 7, but not on Windows 10. -#if defined(DEBUG) - if (IsWindows10OrGreater()) { - ASSERT(result || (GetLastError() == ERROR_NOT_FOUND)); - } -#else - USE(result); -#endif + ASSERT(result || (GetLastError() == ERROR_NOT_FOUND)); } if (!IsClosing()) { // Close the socket and set the closing state. This close method can be