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

Unified Diff: base/logging.cc

Issue 5614003: Avoid recursive DisplayDebugMessageInDialog call when an assert is hit on the IO thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixup comments Created 10 years 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
diff --git a/base/logging.cc b/base/logging.cc
index e3cedc7662688de889d84883d1e08896220b9d79..40497bf6275e11a4b78c57a82265638d7f89c104 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -56,6 +56,7 @@ typedef pthread_mutex_t* MutexHandle;
#endif
#include "base/process_util.h"
#include "base/string_piece.h"
+#include "base/thread_restrictions.h"
#include "base/utf_string_conversions.h"
#include "base/vlog.h"
@@ -502,6 +503,9 @@ void DisplayDebugMessageInDialog(const std::string& str) {
// way more retro. We could use zenity/kdialog but then we're starting
// to get into needing to check the desktop env and this dialog should
// only be coming up in Very Bad situations.
+ // It is tolerable to allow IO from this function when on any thread, given
+ // we're about to core dump anyway.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
std::vector<std::string> argv;
argv.push_back("xmessage");
argv.push_back(str);
« 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