Chromium Code Reviews| Index: content/utility/utility_thread_impl.cc |
| diff --git a/content/utility/utility_thread_impl.cc b/content/utility/utility_thread_impl.cc |
| index e909224df8652a440cc1bf2e16fd7db3d492c392..253f9c5b8407ce01ce607fa77a915370e5640e3a 100644 |
| --- a/content/utility/utility_thread_impl.cc |
| +++ b/content/utility/utility_thread_impl.cc |
| @@ -6,6 +6,10 @@ |
| #include <stddef.h> |
| +#if defined(TOOLKIT_USES_GTK) |
| +#include <gtk/gtk.h> |
| +#endif |
| + |
| #include "base/file_path.h" |
| #include "base/memory/scoped_vector.h" |
| #include "content/common/child_process.h" |
| @@ -127,6 +131,12 @@ void UtilityThreadImpl::OnLoadPlugins( |
| webkit::npapi::PluginList* plugin_list = |
| webkit::npapi::PluginList::Singleton(); |
| + // On Linux, some plugins expect the browser to have loaded glib/gtk. Do that |
| + // before attempting to call into the plugin. |
| +#if defined(TOOLKIT_USES_GTK) |
| + g_thread_init(NULL); |
|
piman
2011/12/02 18:13:39
It seems that we should do that once and for all i
Robert Sesek
2011/12/02 18:37:44
Why? The only IPC message that requires this is Lo
piman
2011/12/02 18:45:21
Today. If you want to leave things here, then plea
Robert Sesek
2011/12/02 19:19:42
Moving to ctor > adding an assert. Done.
|
| +#endif |
| + |
| for (size_t i = 0; i < plugin_paths.size(); ++i) { |
| ScopedVector<webkit::npapi::PluginGroup> plugin_groups; |
| plugin_list->LoadPlugin(plugin_paths[i], &plugin_groups); |