diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-06 00:33:50 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-06 00:33:50 +0000 |
commit | 4d590127a9d0aff4aa077b2eb1f8988619ac05c2 (patch) | |
tree | cb7aa3cf1560531587698a0d50b82450dafbe7bd | |
parent | d0759395d231633ac65dc89c580373d7176e0661 (diff) | |
download | chromium_src-4d590127a9d0aff4aa077b2eb1f8988619ac05c2.zip chromium_src-4d590127a9d0aff4aa077b2eb1f8988619ac05c2.tar.gz chromium_src-4d590127a9d0aff4aa077b2eb1f8988619ac05c2.tar.bz2 |
Make assertions not display message boxes to the end user. This is causing
an infinite recursion of assertion messages during a painting error.
BUG=4139
Review URL: http://codereview.chromium.org/9608
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4844 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/logging.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/base/logging.cc b/base/logging.cc index 3a6f928..7d7fb55 100644 --- a/base/logging.cc +++ b/base/logging.cc @@ -490,9 +490,14 @@ LogMessage::~LogMessage() { // 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 + // 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 DisplayDebugMessage(stream_.str()); +#endif // Crash the process to generate a dump. DebugUtil::BreakDebugger(); // TODO(mmentovai): when we have breakpad support, generate a breakpad @@ -515,4 +520,3 @@ void CloseLogFile() { std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) { return out << base::SysWideToUTF8(std::wstring(wstr)); } - |