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

Unified Diff: runtime/platform/thread_win.h

Issue 12646007: Fix file descriptor leak in event handler implementation. When shutting down an isolate, we did not… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | « runtime/bin/eventhandler_win.cc ('k') | runtime/platform/thread_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/thread_win.h
diff --git a/runtime/platform/thread_win.h b/runtime/platform/thread_win.h
index b481cec0f63dc5b11967e197763d9ac186559ac9..b67b25431950514c82671de9bc6c860fd412afcc 100644
--- a/runtime/platform/thread_win.h
+++ b/runtime/platform/thread_win.h
@@ -49,8 +49,15 @@ class MutexData {
class MonitorWaitData {
+ public:
+ static void ThreadExit();
+
private:
explicit MonitorWaitData(HANDLE event) : event_(event), next_(NULL) {}
+ ~MonitorWaitData() {
+ CloseHandle(event_);
+ ASSERT(next_ == NULL);
+ }
// ThreadLocalKey used to fetch and store the MonitorWaitData object
// for a given thread.
« no previous file with comments | « runtime/bin/eventhandler_win.cc ('k') | runtime/platform/thread_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698