From d07f31723cd037a8c6bef60b234fdb4ad746f34a Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Tue, 25 Aug 2009 01:09:05 +0000 Subject: linux: call g_thread_init() at relevant startup points According to glib docs, we need to do this if it's at all possible for us to hit glib on multiple threads. This may be happening when we grab plugin metadata from the file thread. Rather than explicitly depending on gthread all over the place, just put it in with the GTK dep (since anywhere we're using GTK we ought to init gthread). (Note that this is *not* initializing the GDK locking system.) BUG=18957 Review URL: http://codereview.chromium.org/174264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24203 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/plugin/plugin_thread.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'chrome/plugin') diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc index ae90e1a..307cbaa 100644 --- a/chrome/plugin/plugin_thread.cc +++ b/chrome/plugin/plugin_thread.cc @@ -35,6 +35,7 @@ PluginThread::PluginThread() { // XEmbed plugins assume they are hosted in a Gtk application, so we need // to initialize Gtk in the plugin process. + g_thread_init(NULL); const std::vector& args = CommandLine::ForCurrentProcess()->argv(); int argc = args.size(); -- cgit v1.1