diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-21 23:19:43 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-21 23:19:43 +0000 |
commit | b882adb77481606b12e71603a7f14a6dddcf2092 (patch) | |
tree | 41afed0a2a8a05a610707c4c0b53be719b7eae85 /chrome | |
parent | bc5d05d5ad26d7737cc98acbe7b28d70894ab7cd (diff) | |
download | chromium_src-b882adb77481606b12e71603a7f14a6dddcf2092.zip chromium_src-b882adb77481606b12e71603a7f14a6dddcf2092.tar.gz chromium_src-b882adb77481606b12e71603a7f14a6dddcf2092.tar.bz2 |
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.
(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@24043 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/chrome_dll_main.cc | 1 | ||||
-rw-r--r-- | chrome/plugin/plugin_thread.cc | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index d2af7a9..d98e47d 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -541,6 +541,7 @@ int ChromeMain(int argc, const char** argv) { #endif } else if (process_type.empty()) { #if defined(OS_LINUX) + g_thread_init(NULL); // Glib type system initialization. Needed at least for gconf, // used in net/proxy/proxy_config_service_linux.cc. Most likely // this is superfluous as gtk_init() ought to do this. It's 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<std::string>& args = CommandLine::ForCurrentProcess()->argv(); int argc = args.size(); |