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

Unified Diff: runtime/bin/eventhandler_win.cc

Issue 14864009: Keep track of when a socket has been destroyed (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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
Index: runtime/bin/eventhandler_win.cc
diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc
index 6819fce44ee4fb2a76f0eda7724d23b0de2ea25a..597eb8f41a8c6bafe834072285fab420f49d8f42 100644
--- a/runtime/bin/eventhandler_win.cc
+++ b/runtime/bin/eventhandler_win.cc
@@ -632,7 +632,9 @@ void ClientSocket::DisconnectComplete(IOBuffer* buffer) {
IOBuffer::DisposeBuffer(data_ready_);
}
// When disconnect is complete get rid of the object.
+ Dart_Port port = port();
delete this;
+ DartUtils::PostInt32(port, 1 << kDestroyedEvent);
}
@@ -750,7 +752,9 @@ void EventHandlerImplementation::HandleInterrupt(InterruptMessage* msg) {
}
}
if (delete_handle) {
+ Dart_Port port = handle->port();
delete handle;
+ DartUtils::PostInt32(port, 1 << kDestroyedEvent);
}
}
}
@@ -768,7 +772,9 @@ void EventHandlerImplementation::HandleAccept(ListenSocket* listen_socket,
}
if (listen_socket->IsClosed()) {
+ Dart_Port port = listen_socket->port();
delete listen_socket;
+ DartUtils::PostInt32(port, 1 << kDestroyedEvent);
}
}
@@ -813,7 +819,9 @@ void EventHandlerImplementation::HandleRead(Handle* handle,
}
if (handle->IsClosed()) {
+ Dart_Port port = handle->port();
delete handle;
+ DartUtils::PostInt32(port, 1 << kDestroyedEvent);
}
}
@@ -837,7 +845,9 @@ void EventHandlerImplementation::HandleWrite(Handle* handle,
}
if (handle->IsClosed()) {
+ Dart_Port port = handle->port();
delete handle;
+ DartUtils::PostInt32(port, 1 << kDestroyedEvent);
}
}

Powered by Google App Engine
This is Rietveld 408576698