diff options
author | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 17:34:16 +0000 |
---|---|---|
committer | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 17:34:16 +0000 |
commit | 046225c7905ef3a3390d88b399255c989d5d99d0 (patch) | |
tree | 62aa53e6fcea30f970d0c3fa5931aa34d251fe7a /chrome/browser/browser_main_gtk.cc | |
parent | e51a270e54304a04436a5528a4f3ef7e392b8d78 (diff) | |
download | chromium_src-046225c7905ef3a3390d88b399255c989d5d99d0.zip chromium_src-046225c7905ef3a3390d88b399255c989d5d99d0.tar.gz chromium_src-046225c7905ef3a3390d88b399255c989d5d99d0.tar.bz2 |
Post a task to log the error messages.
X error handlers cannot safely make X calls inside the error handler. To provide more meaningful error messages, it is necessary to query the X server. This patch changes the X error handlers to post a task to decode and log the error message. This has a disadvantage of clearing the call stack,
but given that most X calls are processed asynchronously, the call stack typically isn't meaningful.
BUG=64819
TEST=by hand on Linux
Review URL: http://codereview.chromium.org/6623014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76926 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main_gtk.cc')
-rw-r--r-- | chrome/browser/browser_main_gtk.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/browser_main_gtk.cc b/chrome/browser/browser_main_gtk.cc index fd73fcb..bd7a040 100644 --- a/chrome/browser/browser_main_gtk.cc +++ b/chrome/browser/browser_main_gtk.cc @@ -12,7 +12,6 @@ #include "base/command_line.h" #include "base/debug/debugger.h" #include "chrome/browser/browser_list.h" -#include "chrome/browser/browser_main_gtk.h" #include "chrome/browser/browser_main_win.h" #include "chrome/browser/metrics/metrics_service.h" #include "chrome/common/chrome_switches.h" @@ -42,7 +41,9 @@ bool g_in_x11_io_error_handler = false; int BrowserX11ErrorHandler(Display* d, XErrorEvent* error) { if (!g_in_x11_io_error_handler) - LOG(ERROR) << ui::GetErrorEventDescription(d, error); + MessageLoop::current()->PostTask( + FROM_HERE, + NewRunnableFunction(ui::LogErrorEventDescription, d, *error)); return 0; } |