summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-24 21:16:14 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-24 21:16:14 +0000
commitf6422553a95c2548f4eda8eb56cef5c6fa1cb55b (patch)
tree2197a382a0ff5b10cbba89f0d70725a31d3a713e /base
parentc42ff0c8d658e10a63fda5c94c733fc7afa83869 (diff)
downloadchromium_src-f6422553a95c2548f4eda8eb56cef5c6fa1cb55b.zip
chromium_src-f6422553a95c2548f4eda8eb56cef5c6fa1cb55b.tar.gz
chromium_src-f6422553a95c2548f4eda8eb56cef5c6fa1cb55b.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. 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@24148 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/test_suite.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/base/test_suite.h b/base/test_suite.h
index 352c0b8..236c3ed 100644
--- a/base/test_suite.h
+++ b/base/test_suite.h
@@ -41,6 +41,7 @@ class TestSuite {
CommandLine::Init(argc, argv);
testing::InitGoogleTest(&argc, argv);
#if defined(OS_LINUX)
+ g_thread_init(NULL);
gtk_init_check(&argc, &argv);
#endif
// Don't add additional code to this constructor. Instead add it to