aboutsummaryrefslogtreecommitdiff
path: root/src/client/windows
diff options
context:
space:
mode:
authordoshimun <doshimun@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-06-09 23:38:24 +0000
committerdoshimun <doshimun@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-06-09 23:38:24 +0000
commit2d7664e8d477816e0641e822752f63982c1be74f (patch)
tree041bbfcafc1ab3c7666184f776f0f92cd171f0d2 /src/client/windows
parentClient process uptime is a very useful metric for crashes. Instead of each cl... (diff)
downloadbreakpad-2d7664e8d477816e0641e822752f63982c1be74f.tar.xz
In the destructor of ClientInfo, currently the wait on the clent_crashed_event is
unregistered after the handle is closed. MSDN clearly says that the behavior is undefined in this case. See http://msdn.microsoft.com/en-us/library/ms685061(VS.85).aspx This change contains the fix for that bug. See attched diff. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@281 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/windows')
-rw-r--r--src/client/windows/crash_generation/client_info.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/client/windows/crash_generation/client_info.cc b/src/client/windows/crash_generation/client_info.cc
index acb966c1..4752c4ae 100644
--- a/src/client/windows/crash_generation/client_info.cc
+++ b/src/client/windows/crash_generation/client_info.cc
@@ -78,6 +78,16 @@ bool ClientInfo::Initialize() {
}
ClientInfo::~ClientInfo() {
+ if (dump_request_wait_handle_) {
+ // Wait for callbacks that might already be running to finish.
+ UnregisterWaitEx(dump_request_wait_handle_, INVALID_HANDLE_VALUE);
+ }
+
+ if (process_exit_wait_handle_) {
+ // Wait for the callback that might already be running to finish.
+ UnregisterWaitEx(process_exit_wait_handle_, INVALID_HANDLE_VALUE);
+ }
+
if (process_handle_) {
CloseHandle(process_handle_);
}
@@ -89,16 +99,6 @@ ClientInfo::~ClientInfo() {
if (dump_generated_handle_) {
CloseHandle(dump_generated_handle_);
}
-
- if (dump_request_wait_handle_) {
- // Wait for callbacks that might already be running to finish.
- UnregisterWaitEx(dump_request_wait_handle_, INVALID_HANDLE_VALUE);
- }
-
- if (process_exit_wait_handle_) {
- // Wait for the callback that might already be running to finish.
- UnregisterWaitEx(process_exit_wait_handle_, INVALID_HANDLE_VALUE);
- }
}
bool ClientInfo::UnregisterWaits() {