diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 18:45:53 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 18:45:53 +0000 |
commit | 6a06c1f27ec9b1f18633083cbc45331f3f0c5a2d (patch) | |
tree | e96b66896275156296912f66f7f45d995aa5d577 /base/message_pump_x.cc | |
parent | 9ba7ecff6a57698997034078f958e8c1939d1305 (diff) | |
download | chromium_src-6a06c1f27ec9b1f18633083cbc45331f3f0c5a2d.zip chromium_src-6a06c1f27ec9b1f18633083cbc45331f3f0c5a2d.tar.gz chromium_src-6a06c1f27ec9b1f18633083cbc45331f3f0c5a2d.tar.bz2 |
aura: Make MessagePumpX check that X connection is open.
This doesn't fix the current problem that we're seeing on
bots, but it at least prints a more useful error message than
just seeing a segfault in Xlib.
BUG=100909
TEST=none
TBR=oshima
Review URL: http://codereview.chromium.org/8357011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106338 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_pump_x.cc')
-rw-r--r-- | base/message_pump_x.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/base/message_pump_x.cc b/base/message_pump_x.cc index 8c4dd2c..ddf0e35 100644 --- a/base/message_pump_x.cc +++ b/base/message_pump_x.cc @@ -147,7 +147,9 @@ bool MessagePumpX::HasXInput2() { void MessagePumpX::InitXSource() { DCHECK(!x_source_); GPollFD* x_poll = new GPollFD(); - x_poll->fd = ConnectionNumber(GetDefaultXDisplay()); + Display* display = GetDefaultXDisplay(); + CHECK(display) << "Unable to get connection to X server"; + x_poll->fd = ConnectionNumber(display); x_poll->events = G_IO_IN; x_source_ = g_source_new(&XSourceFuncs, sizeof(GSource)); |