Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1285)

Unified Diff: content/app/content_main_runner.cc

Issue 1783693004: Add a command-line switch to disable in-process stack traces (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/app/content_main_runner.cc
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 2151a26fb62c4d296f43fa58ea64bb82265f20f8..5f5f8e5cd2e4f24fc70aadafbd9586162a6a263e 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -205,7 +205,10 @@ void CommonSubprocessInit(const std::string& process_type) {
#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 (!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableInProcessStackTraces)) {
+ base::debug::EnableInProcessStackDumping();
+ }
#if defined(OS_WIN)
base::RouteStdioToConsole(false);
LoadLibraryA("dbghelp.dll");
« no previous file with comments | « no previous file | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698