summaryrefslogtreecommitdiffstats
path: root/chrome/common/logging_chrome.cc
diff options
context:
space:
mode:
authorcmasone@google.com <cmasone@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 00:38:12 +0000
committercmasone@google.com <cmasone@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 00:38:12 +0000
commit81e0a85082ccf4b14f48ed5229baa2cbd8642ad4 (patch)
tree8ba996d8a88dab6c1c9b8a32af78d202e439a254 /chrome/common/logging_chrome.cc
parent5c21a2eeaa92326a6a771e27c70b11b1ea52441a (diff)
downloadchromium_src-81e0a85082ccf4b14f48ed5229baa2cbd8642ad4.zip
chromium_src-81e0a85082ccf4b14f48ed5229baa2cbd8642ad4.tar.gz
chromium_src-81e0a85082ccf4b14f48ed5229baa2cbd8642ad4.tar.bz2
Stop eternal loop in DisplayDebugMessageInDialog
if CommandLine was never initialized, CommandLine::ForCurrentProcess() will DCHECK. That causes DisplayDebugMessageInDialog() to run...which calls CommandLine::ForCurrentProcess(), which can DCHECK. Also, Chrome OS doesn't have xmessage, so we don't want to try to pop up a message using that mechanism. BUG=None TEST=Run a binary that doesn't initialize CommandLine (a chrome os unittest binary, for example) and make it CHECK(false). Instead of looping until the stack explodes, it should print messages for the check failures and exit. Review URL: http://codereview.chromium.org/3151016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56281 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/logging_chrome.cc')
-rw-r--r--chrome/common/logging_chrome.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index f546e35..5b0987b 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -197,6 +197,10 @@ void InitChromeLogging(const CommandLine& command_line,
logging::LOCK_LOG_FILE,
delete_old_log_file);
+ // Default to showing error dialogs.
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoErrorDialogs))
+ logging::SetShowErrorDialogs(true);
+
// we want process and thread IDs because we have a lot of things running
logging::SetLogItems(true, true, false, true);