diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-18 17:42:27 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-18 17:42:27 +0000 |
commit | 5a8d4ce29f346d9fe2435d17c375e2ddb6fe6123 (patch) | |
tree | 99c554aab7548aac08323e96b97b261c2fe6e714 /components/breakpad | |
parent | b8b2dbebdf0d28db0f162eadb2c3838ac7b8a088 (diff) | |
download | chromium_src-5a8d4ce29f346d9fe2435d17c375e2ddb6fe6123.zip chromium_src-5a8d4ce29f346d9fe2435d17c375e2ddb6fe6123.tar.gz chromium_src-5a8d4ce29f346d9fe2435d17c375e2ddb6fe6123.tar.bz2 |
Move DumpProcessWithoutCrash to base, so we can use it from net and content
BUG=none
R=mark@chromium.org
TBR=wez@chromium.org
Review URL: https://codereview.chromium.org/99523009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241589 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/breakpad')
-rw-r--r-- | components/breakpad/app/breakpad_client.cc | 5 | ||||
-rw-r--r-- | components/breakpad/app/breakpad_client.h | 6 | ||||
-rw-r--r-- | components/breakpad/app/breakpad_linux.cc | 3 | ||||
-rw-r--r-- | components/breakpad/app/breakpad_mac.mm | 4 | ||||
-rw-r--r-- | components/breakpad/app/breakpad_win.cc | 3 |
5 files changed, 7 insertions, 14 deletions
diff --git a/components/breakpad/app/breakpad_client.cc b/components/breakpad/app/breakpad_client.cc index e9bbe87..84931ea 100644 --- a/components/breakpad/app/breakpad_client.cc +++ b/components/breakpad/app/breakpad_client.cc @@ -90,11 +90,6 @@ bool BreakpadClient::GetCrashDumpLocation(base::FilePath* crash_dir) { return false; } -#if defined(OS_POSIX) -void BreakpadClient::SetDumpWithoutCrashingFunction(void (*function)()) { -} -#endif - size_t BreakpadClient::RegisterCrashKeys() { return 0; } diff --git a/components/breakpad/app/breakpad_client.h b/components/breakpad/app/breakpad_client.h index 09a5047..fb3b205 100644 --- a/components/breakpad/app/breakpad_client.h +++ b/components/breakpad/app/breakpad_client.h @@ -106,12 +106,6 @@ class BreakpadClient { // |crash_dir| was set. virtual bool GetCrashDumpLocation(base::FilePath* crash_dir); -#if defined(OS_POSIX) - // Sets a function that'll be invoked to dump the current process when - // without crashing. - virtual void SetDumpWithoutCrashingFunction(void (*function)()); -#endif - // Register all of the potential crash keys that can be sent to the crash // reporting server. Returns the size of the union of all keys. virtual size_t RegisterCrashKeys(); diff --git a/components/breakpad/app/breakpad_linux.cc b/components/breakpad/app/breakpad_linux.cc index cc220f1..098c370 100644 --- a/components/breakpad/app/breakpad_linux.cc +++ b/components/breakpad/app/breakpad_linux.cc @@ -25,6 +25,7 @@ #include "base/base_switches.h" #include "base/command_line.h" #include "base/debug/crash_logging.h" +#include "base/debug/dump_without_crashing.h" #include "base/files/file_path.h" #include "base/linux_util.h" #include "base/path_service.h" @@ -1486,7 +1487,7 @@ void InitCrashReporter(const std::string& process_type) { SetProcessStartTime(); g_pid = getpid(); - GetBreakpadClient()->SetDumpWithoutCrashingFunction(&DumpProcess); + base::debug::SetDumpWithoutCrashingFunction(&DumpProcess); #if defined(ADDRESS_SANITIZER) // Register the callback for AddressSanitizer error reporting. __asan_set_error_report_callback(AsanLinuxBreakpadCallback); diff --git a/components/breakpad/app/breakpad_mac.mm b/components/breakpad/app/breakpad_mac.mm index b6cac42..d46b0c4 100644 --- a/components/breakpad/app/breakpad_mac.mm +++ b/components/breakpad/app/breakpad_mac.mm @@ -12,6 +12,7 @@ #import "base/basictypes.h" #include "base/command_line.h" #include "base/debug/crash_logging.h" +#include "base/debug/dump_without_crashing.h" #include "base/file_util.h" #include "base/files/file_path.h" #import "base/logging.h" @@ -243,8 +244,7 @@ void InitCrashReporter(const std::string& process_type) { } logging::SetLogMessageHandler(&FatalMessageHandler); - GetBreakpadClient()->SetDumpWithoutCrashingFunction( - &DumpHelper::DumpWithoutCrashing); + base::debug::SetDumpWithoutCrashingFunction(&DumpHelper::DumpWithoutCrashing); // abort() sends SIGABRT, which breakpad does not intercept. // Register a signal handler to crash in a way breakpad will diff --git a/components/breakpad/app/breakpad_win.cc b/components/breakpad/app/breakpad_win.cc index af1f136..02daab6 100644 --- a/components/breakpad/app/breakpad_win.cc +++ b/components/breakpad/app/breakpad_win.cc @@ -17,6 +17,7 @@ #include "base/basictypes.h" #include "base/command_line.h" #include "base/debug/crash_logging.h" +#include "base/debug/dump_without_crashing.h" #include "base/environment.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" @@ -745,6 +746,8 @@ void InitCrashReporter(const std::string& process_type_switch) { google_breakpad::ExceptionHandler::HANDLER_NONE, dump_type, pipe_name.c_str(), custom_info); + base::debug::SetDumpWithoutCrashingFunction(&DumpProcessWithoutCrash); + if (g_breakpad->IsOutOfProcess()) { // Tells breakpad to handle breakpoint and single step exceptions. // This might break JIT debuggers, but at least it will always |