mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-24 15:45:53 +01:00
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
This commit is contained in:
parent
3a516e4177
commit
2d7664e8d4
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user