diff options
author | jam <jam@chromium.org> | 2015-08-13 11:30:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-13 18:31:03 +0000 |
commit | 8ba532e170befc312e66d032587fa2ad04bac975 (patch) | |
tree | 5804cef67958f109ab4d0bc4781a8656126b4ea2 /content/app | |
parent | c040432a33591da9dcaf2cabf391893353f0107a (diff) | |
download | chromium_src-8ba532e170befc312e66d032587fa2ad04bac975.zip chromium_src-8ba532e170befc312e66d032587fa2ad04bac975.tar.gz chromium_src-8ba532e170befc312e66d032587fa2ad04bac975.tar.bz2 |
Print stack traces in child processes when browser tests failed.
The functionality to do this opens up security holes. Currently this was working only for debug Linux builds. However our trybots are release builds, and we need to be able to see stack traces from child processes on all platforms (i.e. to be able to debug the large flakiness that occurred since last week). This is disabled for official builds.
BUG=517488,358267
Review URL: https://codereview.chromium.org/1291553003
Cr-Commit-Position: refs/heads/master@{#343240}
Diffstat (limited to 'content/app')
-rw-r--r-- | content/app/content_main_runner.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc index df069e8..55c6ac7 100644 --- a/content/app/content_main_runner.cc +++ b/content/app/content_main_runner.cc @@ -10,6 +10,7 @@ #include "base/at_exit.h" #include "base/command_line.h" #include "base/debug/debugger.h" +#include "base/debug/stack_trace.h" #include "base/files/file_path.h" #include "base/i18n/icu_util.h" #include "base/lazy_instance.h" @@ -195,6 +196,15 @@ void CommonSubprocessInit(const std::string& process_type) { // surface UI -- but it's likely they get this wrong too so why not. setlocale(LC_NUMERIC, "C"); #endif + +#if !defined(OFFICIAL_BUILD) + // Print stack traces to stderr when crashes occur. This opens up security + // holes so it should never be enabled for official builds. + base::debug::EnableInProcessStackDumping(); +#if defined(OS_WIN) + LoadLibraryA("dbghelp.dll"); +#endif +#endif } class ContentClientInitializer { |