diff options
author | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-07 11:45:15 +0000 |
---|---|---|
committer | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-07 11:45:15 +0000 |
commit | a9f3a77581af8c87b39503e37c50aea244cd64ef (patch) | |
tree | 623e618127041549a4d5c84a089cae03212135cc /base | |
parent | 1c4ded569228215fa18af158caafbcc68c9608bc (diff) | |
download | chromium_src-a9f3a77581af8c87b39503e37c50aea244cd64ef.zip chromium_src-a9f3a77581af8c87b39503e37c50aea244cd64ef.tar.gz chromium_src-a9f3a77581af8c87b39503e37c50aea244cd64ef.tar.bz2 |
Avoid recursive DisplayDebugMessageInDialog call when an assert is hit on the IO thread
BUG=None
TEST=Hacked code to call NOTREACHED() from IO thread.
Review URL: http://codereview.chromium.org/5614003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68468 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/logging.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/base/logging.cc b/base/logging.cc index e3cedc7..40497bf 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); |