aboutsummaryrefslogtreecommitdiff
path: root/src/client/windows/crash_generation/client_info.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/windows/crash_generation/client_info.cc')
-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() {