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

Unified Diff: logging.cc

Issue 2050803003: Update to Chromium //base at Chromium commit e3a753f17bac62738b0dbf0b36510f767b081e4b. (Closed) Base URL: https://github.com/domokit/base.git@master
Patch Set: Created 4 years, 6 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 | « json/string_escape_unittest.cc ('k') | mac/foundation_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logging.cc
diff --git a/logging.cc b/logging.cc
index 97ee1346ca8f1ad711fbe32d36a99b11c2b3a922..c6992b981aef8ace54b27b656eeebbaaff46c9bf 100644
--- a/logging.cc
+++ b/logging.cc
@@ -545,8 +545,8 @@ LogMessage::LogMessage(const char* file, int line, LogSeverity severity,
LogMessage::~LogMessage() {
#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \
!defined(FNL_MUSL)
- if (severity_ == LOG_FATAL) {
- // Include a stack trace on a fatal.
+ if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) {
+ // Include a stack trace on a fatal, unless a debugger is attached.
base::debug::StackTrace trace;
stream_ << std::endl; // Newline to separate from log message.
trace.OutputToStream(&stream_);
@@ -640,7 +640,11 @@ LogMessage::~LogMessage() {
// information, and displaying message boxes when the application is
// hosed can cause additional problems.
#ifndef NDEBUG
- DisplayDebugMessageInDialog(stream_.str());
+ if (!base::debug::BeingDebugged()) {
+ // Displaying a dialog is unnecessary when debugging and can complicate
+ // debugging.
+ DisplayDebugMessageInDialog(stream_.str());
+ }
#endif
// Crash the process to generate a dump.
base::debug::BreakDebugger();
« no previous file with comments | « json/string_escape_unittest.cc ('k') | mac/foundation_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698