diff options
author | jam <jam@chromium.org> | 2015-11-03 17:14:03 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-04 01:16:00 +0000 |
commit | dfa5d4bc123d857e1d2917f1d3a2eb2a7af6320e (patch) | |
tree | 6f78bac50f554168255a746f87e88f85c5a61943 /mandoline | |
parent | e8a076a598a4705e875c4fa6d6672ca57c82b6d5 (diff) | |
download | chromium_src-dfa5d4bc123d857e1d2917f1d3a2eb2a7af6320e.zip chromium_src-dfa5d4bc123d857e1d2917f1d3a2eb2a7af6320e.tar.gz chromium_src-dfa5d4bc123d857e1d2917f1d3a2eb2a7af6320e.tar.bz2 |
Print stack trace when Mandoline crashes.
BUG=478251
Review URL: https://codereview.chromium.org/1422693004
Cr-Commit-Position: refs/heads/master@{#357699}
Diffstat (limited to 'mandoline')
-rw-r--r-- | mandoline/app/desktop/main.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mandoline/app/desktop/main.cc b/mandoline/app/desktop/main.cc index a1e26aa..d0a7a99 100644 --- a/mandoline/app/desktop/main.cc +++ b/mandoline/app/desktop/main.cc @@ -4,6 +4,8 @@ #include "base/at_exit.h" #include "base/command_line.h" +#include "base/debug/stack_trace.h" +#include "base/process/launch.h" #include "mandoline/app/desktop/launcher_process.h" #include "mojo/runner/child_process.h" #include "mojo/runner/init.h" @@ -18,6 +20,13 @@ int main(int argc, char** argv) { mojo::runner::InitializeLogging(); mojo::runner::WaitForDebuggerIfNecessary(); +#if !defined(OFFICIAL_BUILD) + base::debug::EnableInProcessStackDumping(); +#if defined(OS_WIN) + base::RouteStdioToConsole(false); +#endif +#endif + if (command_line.HasSwitch(switches::kChildProcess)) return mojo::runner::ChildProcessMain(); |