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

Unified Diff: dart/runtime/bin/eventhandler_win.cc

Issue 914103002: Send destroy events for each closed listening socket instead of waiting for all listening sockets t… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/bin/eventhandler_win.cc
diff --git a/dart/runtime/bin/eventhandler_win.cc b/dart/runtime/bin/eventhandler_win.cc
index e5d2263e942be120a21d280175653e18d8883702..73c738d9b397bd2c443bba1aad0f867c07308f84 100644
--- a/dart/runtime/bin/eventhandler_win.cc
+++ b/dart/runtime/bin/eventhandler_win.cc
@@ -1018,7 +1018,8 @@ void EventHandlerImplementation::HandleInterrupt(InterruptMessage* msg) {
listen_socket->SetPortAndMask(msg->dart_port, events);
TryDispatchingPendingAccepts(listen_socket);
} else if (IS_COMMAND(msg->data, kCloseCommand)) {
- listen_socket->SetPortAndMask(msg->dart_port, 0);
+ listen_socket->RemovePort(msg->dart_port);
+
// We only close the socket file descriptor from the operating
// system if there are no other dart socket objects which
// are listening on the same (address, port) combination.
@@ -1030,6 +1031,8 @@ void EventHandlerImplementation::HandleInterrupt(InterruptMessage* msg) {
listen_socket->Close();
DeleteIfClosed(handle);
}
+
+ DartUtils::PostInt32(msg->dart_port, 1 << kDestroyedEvent);
Søren Gjesse 2015/02/11 11:31:21 DeleteIfClosed above sends a destroy event when th
kustermann 2015/02/11 11:32:56 No it should not. Since we remove the port with `l
} else {
UNREACHABLE();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698