diff options
author | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-07-20 12:24:25 +0000 |
---|---|---|
committer | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-07-20 12:24:25 +0000 |
commit | b6b4451142d871d6b9d9162e465dff5d4511cef9 (patch) | |
tree | b4f59f3874bd567a188969bb81718deee99eca93 /src/client/mac/crash_generation/crash_generation_server.cc | |
parent | Allow adding extra memory regions to minidump on linux/windows (diff) | |
download | breakpad-b6b4451142d871d6b9d9162e465dff5d4511cef9.tar.xz |
Add a filter callback to CrashGenerationServer on mac
A=Rafael Ávila de Espíndola <respindola@mozilla.com> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=732173
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@990 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/crash_generation/crash_generation_server.cc')
-rw-r--r-- | src/client/mac/crash_generation/crash_generation_server.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/mac/crash_generation/crash_generation_server.cc b/src/client/mac/crash_generation/crash_generation_server.cc index 44548ef0..b3eb403f 100644 --- a/src/client/mac/crash_generation/crash_generation_server.cc +++ b/src/client/mac/crash_generation/crash_generation_server.cc @@ -37,6 +37,8 @@ namespace google_breakpad { CrashGenerationServer::CrashGenerationServer( const char *mach_port_name, + FilterCallback filter, + void *filter_context, OnClientDumpRequestCallback dump_callback, void *dump_context, OnClientExitingCallback exit_callback, @@ -44,6 +46,8 @@ CrashGenerationServer::CrashGenerationServer( bool generate_dumps, const std::string &dump_path) : dump_callback_(dump_callback), + filter_(filter), + filter_context_(filter_context), dump_context_(dump_context), exit_callback_(exit_callback), exit_context_(exit_context), @@ -110,7 +114,7 @@ bool CrashGenerationServer::WaitForOneMessage() { bool result; std::string dump_path; - if (generate_dumps_) { + if (generate_dumps_ && (!filter_ || filter_(filter_context_))) { ScopedTaskSuspend suspend(remote_task); MinidumpGenerator generator(remote_task, handler_thread); |