Chromium Code Reviews| Index: content/public/test/browser_test_base.cc | 
| diff --git a/content/public/test/browser_test_base.cc b/content/public/test/browser_test_base.cc | 
| index c6d2e4b6a03c91f8fc0a4adc8ae160b69d20c030..73563f4f26a9696fc8859e71d8a459fd8c0cb097 100644 | 
| --- a/content/public/test/browser_test_base.cc | 
| +++ b/content/public/test/browser_test_base.cc | 
| @@ -71,9 +71,10 @@ namespace { | 
| static int g_browser_process_pid; | 
| static void DumpStackTraceSignalHandler(int signal) { | 
| if (g_browser_process_pid == base::GetCurrentProcId()) { | 
| - logging::RawLog(logging::LOG_ERROR, | 
| - "BrowserTestBase signal handler received SIGTERM. " | 
| - "Backtrace:\n"); | 
| + std::string message("BrowserTestBase received signal: "); | 
| + message += strsignal(signal); | 
| + message += ". Backtrace:\n"; | 
| + logging::RawLog(logging::LOG_ERROR, message.c_str()); | 
| base::debug::StackTrace().Print(); | 
| } | 
| _exit(128 + signal); | 
| @@ -317,6 +318,7 @@ void BrowserTestBase::ProxyRunTestOnMainThreadLoop() { | 
| if (handle_sigterm_) { | 
| g_browser_process_pid = base::GetCurrentProcId(); | 
| signal(SIGTERM, DumpStackTraceSignalHandler); | 
| + signal(SIGSEGV, DumpStackTraceSignalHandler); | 
| 
 
Paweł Hajdan Jr.
2016/08/17 06:34:09
Could you just move this and g_browser_process_pid
 
michaelpg
2016/08/18 23:44:37
Done.
 
 | 
| } | 
| #endif // defined(OS_POSIX) |