summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-23 21:48:53 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-23 21:48:53 +0000
commit07fb7246ace233e9193f347891f65daf280e5d09 (patch)
tree77c82c9fdff02c3586d4795a5b88aa16675726e3 /chrome/app
parent1591bbce0bc9966372e17e6dcd866ed6ebf308db (diff)
downloadchromium_src-07fb7246ace233e9193f347891f65daf280e5d09.zip
chromium_src-07fb7246ace233e9193f347891f65daf280e5d09.tar.gz
chromium_src-07fb7246ace233e9193f347891f65daf280e5d09.tar.bz2
linux: initialize glib-dbus threading during startup
Rather than scattering init calls through the code, just inititialize it once. (In particular, the gnome-keyring support also needs this function called, and I didn't want to copy it one more time.) TEST=no threading-related crash during gnome-keyring startup Review URL: http://codereview.chromium.org/2873015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50652 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/chrome_dll_main.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index d6eda18..7ff3f14 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -24,6 +24,7 @@
#endif
#if defined(USE_X11)
+#include <dbus/dbus-glib.h>
#include <gdk/gdk.h>
#include <glib.h>
#include <gtk/gtk.h>
@@ -851,6 +852,10 @@ int ChromeMain(int argc, char** argv) {
// definitely harmless, so retained as a reminder of this
// requirement for gconf.
g_type_init();
+ // We use glib-dbus for geolocation and it's possible other libraries
+ // (e.g. gnome-keyring) will use it, so initialize its threading here
+ // as well.
+ dbus_g_thread_init();
// gtk_init() can change |argc| and |argv|.
gtk_init(&argc, &argv);
SetUpGLibLogHandler();