diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-01 01:35:45 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-01 01:35:45 +0000 |
commit | 46ad7357844bdc3ed4a7fd40d73ad37b56d8c07d (patch) | |
tree | 7f59d4f23b6aab7501873aad177d251da981fcc3 /chrome/browser | |
parent | 60c240ac311e2029d985f445e5f4e25374b61525 (diff) | |
download | chromium_src-46ad7357844bdc3ed4a7fd40d73ad37b56d8c07d.zip chromium_src-46ad7357844bdc3ed4a7fd40d73ad37b56d8c07d.tar.gz chromium_src-46ad7357844bdc3ed4a7fd40d73ad37b56d8c07d.tar.bz2 |
Linux: Fix Valgrind error in VisitedLinkEventsTest.Coalescense.
I introduced the error in r22193; it shows up when there's no X
server to connect to. I get a "GLib-GObject-CRITICAL **:
g_object_get: assertion `G_IS_OBJECT (object)' failed" message with
this change, but I'm not sure if it's from my code or if it was
already there, and the tests still pass.
TEST=ran VisitedLinkEventsTest.Coalescense under Valgrind with DISPLAY=:6
Review URL: http://codereview.chromium.org/159753
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22240 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/gtk/browser_window_gtk.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc index e4f7155..ccfc556 100644 --- a/chrome/browser/gtk/browser_window_gtk.cc +++ b/chrome/browser/gtk/browser_window_gtk.cc @@ -1194,8 +1194,12 @@ GtkWindow* BrowserWindowGtk::GetBrowserWindowForXID(XID xid) { // static void BrowserWindowGtk::RegisterUserPrefs(PrefService* prefs) { bool custom_frame_default = false; - if (!prefs->HasPrefPath(prefs::kUseCustomChromeFrame)) + // Avoid checking the window manager if we're not connected to an X server (as + // is the case in Valgrind tests). + if (x11_util::XDisplayExists() && + !prefs->HasPrefPath(prefs::kUseCustomChromeFrame)) { custom_frame_default = GetCustomFramePrefDefault(); + } prefs->RegisterBooleanPref( prefs::kUseCustomChromeFrame, custom_frame_default); } |