diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-28 18:25:34 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-28 18:25:34 +0000 |
commit | 82d89abc03ea6fd6b9258f0e57be0290b33d7eb1 (patch) | |
tree | 26eabd7631cf7a3777250dac504275f730cd8934 /base/logging.cc | |
parent | 77490f6ef6eca3a57f1ef8e64b239300a205cf88 (diff) | |
download | chromium_src-82d89abc03ea6fd6b9258f0e57be0290b33d7eb1.zip chromium_src-82d89abc03ea6fd6b9258f0e57be0290b33d7eb1.tar.gz chromium_src-82d89abc03ea6fd6b9258f0e57be0290b33d7eb1.tar.bz2 |
Honor the log_assert_handler when running under the debugger.
BUG=347287
Review URL: https://codereview.chromium.org/177293007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254171 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/logging.cc')
-rw-r--r-- | base/logging.cc | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/base/logging.cc b/base/logging.cc index c4366d8..46b3823 100644 --- a/base/logging.cc +++ b/base/logging.cc @@ -653,25 +653,20 @@ LogMessage::~LogMessage() { str_newline.copy(str_stack, arraysize(str_stack)); base::debug::Alias(str_stack); - // display a message or break into the debugger on a fatal error - if (base::debug::BeingDebugged()) { - base::debug::BreakDebugger(); + if (log_assert_handler) { + // Make a copy of the string for the handler out of paranoia. + log_assert_handler(std::string(stream_.str())); } else { - if (log_assert_handler) { - // make a copy of the string for the handler out of paranoia - log_assert_handler(std::string(stream_.str())); - } else { - // Don't use the string with the newline, get a fresh version to send to - // the debug message process. We also don't display assertions to the - // user in release mode. The enduser can't do anything with this - // information, and displaying message boxes when the application is - // hosed can cause additional problems. + // Don't use the string with the newline, get a fresh version to send to + // the debug message process. We also don't display assertions to the + // user in release mode. The enduser can't do anything with this + // information, and displaying message boxes when the application is + // hosed can cause additional problems. #ifndef NDEBUG - DisplayDebugMessageInDialog(stream_.str()); + DisplayDebugMessageInDialog(stream_.str()); #endif - // Crash the process to generate a dump. - base::debug::BreakDebugger(); - } + // Crash the process to generate a dump. + base::debug::BreakDebugger(); } } else if (severity_ == LOG_ERROR_REPORT) { // We are here only if the user runs with --enable-dcheck in release mode. |