summaryrefslogtreecommitdiffstats
path: root/content/utility
diff options
context:
space:
mode:
authorqiankun.miao@intel.com <qiankun.miao@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-28 02:41:57 +0000
committerqiankun.miao@intel.com <qiankun.miao@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-28 02:41:57 +0000
commit6ee0191d300457545b2bbddf2b8c0c6b7aa296d3 (patch)
tree03479f5a47c2c8a1c96e7575af0836118daf73a0 /content/utility
parent353853301c360c31da37d0c860a7ef1087bf8681 (diff)
downloadchromium_src-6ee0191d300457545b2bbddf2b8c0c6b7aa296d3.zip
chromium_src-6ee0191d300457545b2bbddf2b8c0c6b7aa296d3.tar.gz
chromium_src-6ee0191d300457545b2bbddf2b8c0c6b7aa296d3.tar.bz2
Fix compilation error due to deprecated glib API
g_thread_init and g_thread_get_initialized are two deprecated APIs since glib version 2.32. The Glib threading system is automatically initialized at the start of a program. There will be compilation error with these two functions. Remove calls to these two functions. BUG=119669 TEST=NONE Review URL: http://codereview.chromium.org/9835044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129350 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/utility')
-rw-r--r--content/utility/utility_thread_impl.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/content/utility/utility_thread_impl.cc b/content/utility/utility_thread_impl.cc
index 6b841aa..4887b57 100644
--- a/content/utility/utility_thread_impl.cc
+++ b/content/utility/utility_thread_impl.cc
@@ -136,12 +136,16 @@ void UtilityThreadImpl::OnLoadPlugins(
// On Linux, some plugins expect the browser to have loaded glib/gtk. Do that
// before attempting to call into the plugin.
+ // g_thread_init API is deprecated since glib 2.31.0, please see release note:
+ // http://mail.gnome.org/archives/gnome-announce-list/2011-October/msg00041.html
#if defined(TOOLKIT_USES_GTK)
+#if !(GLIB_CHECK_VERSION(2, 31, 0))
if (!g_thread_get_initialized()) {
g_thread_init(NULL);
- gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess());
}
#endif
+ gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess());
+#endif
for (size_t i = 0; i < plugin_paths.size(); ++i) {
ScopedVector<webkit::npapi::PluginGroup> plugin_groups;