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

Unified Diff: base/logging.cc

Issue 9608: Make assertions not display message boxes to the end user. This is causing... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging.cc
===================================================================
--- base/logging.cc (revision 4821)
+++ base/logging.cc (working copy)
@@ -490,9 +490,14 @@
// 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 @@
std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) {
return out << base::SysWideToUTF8(std::wstring(wstr));
}
-
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698