aboutsummaryrefslogtreecommitdiff
path: root/src/client/windows/handler/exception_handler.cc
diff options
context:
space:
mode:
authorted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-07-16 15:16:01 +0000
committerted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-07-16 15:16:01 +0000
commit534189b735cdf75d017af859fec92f2e671541e0 (patch)
tree43c30c6f44da10c1bd69c05f2a3939f7356c5370 /src/client/windows/handler/exception_handler.cc
parentAdd the capability to include an arbitrary data stream within minidumps (diff)
downloadbreakpad-534189b735cdf75d017af859fec92f2e671541e0.tar.xz
Allow the crash generation server to be initialized with a handle instead of a pipe name
A=bsmedberg R=ted at http://breakpad.appspot.com/406002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@985 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/windows/handler/exception_handler.cc')
-rw-r--r--src/client/windows/handler/exception_handler.cc38
1 files changed, 35 insertions, 3 deletions
diff --git a/src/client/windows/handler/exception_handler.cc b/src/client/windows/handler/exception_handler.cc
index 08c5fb5f..6e5b724a 100644
--- a/src/client/windows/handler/exception_handler.cc
+++ b/src/client/windows/handler/exception_handler.cc
@@ -71,9 +71,29 @@ ExceptionHandler::ExceptionHandler(const wstring& dump_path,
handler_types,
dump_type,
pipe_name,
+ NULL,
custom_info);
}
+ExceptionHandler::ExceptionHandler(const wstring& dump_path,
+ FilterCallback filter,
+ MinidumpCallback callback,
+ void* callback_context,
+ int handler_types,
+ MINIDUMP_TYPE dump_type,
+ HANDLE pipe_handle,
+ const CustomClientInfo* custom_info) {
+ Initialize(dump_path,
+ filter,
+ callback,
+ callback_context,
+ handler_types,
+ dump_type,
+ NULL,
+ pipe_handle,
+ custom_info);
+}
+
ExceptionHandler::ExceptionHandler(const wstring &dump_path,
FilterCallback filter,
MinidumpCallback callback,
@@ -86,6 +106,7 @@ ExceptionHandler::ExceptionHandler(const wstring &dump_path,
handler_types,
MiniDumpNormal,
NULL,
+ NULL,
NULL);
}
@@ -96,6 +117,7 @@ void ExceptionHandler::Initialize(const wstring& dump_path,
int handler_types,
MINIDUMP_TYPE dump_type,
const wchar_t* pipe_name,
+ HANDLE pipe_handle,
const CustomClientInfo* custom_info) {
LONG instance_count = InterlockedIncrement(&instance_count_);
filter_ = filter;
@@ -125,12 +147,22 @@ void ExceptionHandler::Initialize(const wstring& dump_path,
handler_return_value_ = false;
handle_debug_exceptions_ = false;
- // Attempt to use out-of-process if user has specified pipe name.
- if (pipe_name != NULL) {
- scoped_ptr<CrashGenerationClient> client(
+ // Attempt to use out-of-process if user has specified a pipe.
+ if (pipe_name != NULL || pipe_handle != NULL) {
+ assert(!(pipe_name && pipe_handle));
+
+ scoped_ptr<CrashGenerationClient> client;
+ if (pipe_name) {
+ client.reset(
new CrashGenerationClient(pipe_name,
dump_type_,
custom_info));
+ } else {
+ client.reset(
+ new CrashGenerationClient(pipe_handle,
+ dump_type_,
+ custom_info));
+ }
// If successful in registering with the monitoring process,
// there is no need to setup in-process crash generation.