aboutsummaryrefslogtreecommitdiff
path: root/src/client/windows/crash_generation/client_info.cc
diff options
context:
space:
mode:
authorted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-11-11 19:05:51 +0000
committerted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-11-11 19:05:51 +0000
commit06cede988b4d15b4d6b7e759fda676bfe3455682 (patch)
treefbe6cc1e33d29d251cf912aac1f35a5e7d823274 /src/client/windows/crash_generation/client_info.cc
parent Correct leak. (diff)
downloadbreakpad-06cede988b4d15b4d6b7e759fda676bfe3455682.tar.xz
Allow CrashGenerationClient to request that a dump of the parent process be written.
A=Jim Mathies <jmathies@mozilla.com> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=679238 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@883 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/windows/crash_generation/client_info.cc')
-rw-r--r--src/client/windows/crash_generation/client_info.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/client/windows/crash_generation/client_info.cc b/src/client/windows/crash_generation/client_info.cc
index 94f9c3cd..12f4bb30 100644
--- a/src/client/windows/crash_generation/client_info.cc
+++ b/src/client/windows/crash_generation/client_info.cc
@@ -50,6 +50,8 @@ ClientInfo::ClientInfo(CrashGenerationServer* crash_server,
thread_id_(thread_id),
process_handle_(NULL),
dump_requested_handle_(NULL),
+ parent_dump_requested_handle_(NULL),
+ parent_dump_request_wait_handle_(NULL),
dump_generated_handle_(NULL),
dump_request_wait_handle_(NULL),
process_exit_wait_handle_(NULL) {
@@ -70,6 +72,14 @@ bool ClientInfo::Initialize() {
return false;
}
+ parent_dump_requested_handle_ = CreateEvent(NULL, // Security attributes.
+ TRUE, // Manual reset.
+ FALSE, // Initial state.
+ NULL); // Name.
+ if (!parent_dump_requested_handle_) {
+ return false;
+ }
+
dump_generated_handle_ = CreateEvent(NULL, // Security attributes.
TRUE, // Manual reset.
FALSE, // Initial state.
@@ -88,6 +98,10 @@ ClientInfo::~ClientInfo() {
UnregisterWaitEx(process_exit_wait_handle_, INVALID_HANDLE_VALUE);
}
+ if (parent_dump_request_wait_handle_) {
+ UnregisterWaitEx(parent_dump_request_wait_handle_, INVALID_HANDLE_VALUE);
+ }
+
if (process_handle_) {
CloseHandle(process_handle_);
}
@@ -96,6 +110,10 @@ ClientInfo::~ClientInfo() {
CloseHandle(dump_requested_handle_);
}
+ if (parent_dump_requested_handle_) {
+ CloseHandle(parent_dump_requested_handle_);
+ }
+
if (dump_generated_handle_) {
CloseHandle(dump_generated_handle_);
}
@@ -107,6 +125,11 @@ void ClientInfo::UnregisterWaits() {
dump_request_wait_handle_ = NULL;
}
+ if (parent_dump_request_wait_handle_) {
+ UnregisterWait(parent_dump_request_wait_handle_);
+ parent_dump_request_wait_handle_ = NULL;
+ }
+
if (process_exit_wait_handle_) {
UnregisterWait(process_exit_wait_handle_);
process_exit_wait_handle_ = NULL;