Browse files

WebHelper: Initialize GLib's threading system for WebKit to use it

WebKit uses threads but don't seem to initialize the thread system,
causing troubles with GLib versions that doesn't enable threads by
default (< 2.24). So, initialize the thread system ourselves.

Closes #3189033

git-svn-id: https://geany-plugins.svn.sourceforge.net/svnroot/geany-plugins/trunk/geany-plugins@1971 e8383189-8249-0410-b506-acc975200cbd
  • Loading branch information...
1 parent 0d63e8c commit 0c76f82c40626cb0e0500ef7557d559515d52243 @b4n b4n committed Mar 10, 2011
Showing with 7 additions and 1 deletion.
  1. +2 −1 build/webhelper.m4
  2. +5 −0 webhelper/src/gwh-plugin.c
View
3 build/webhelper.m4
@@ -23,7 +23,8 @@ AC_DEFUN([GP_CHECK_WEBHELPER],
glib-2.0 >= ${GLIB_VERSION}
gio-2.0 >= ${GIO_VERSION}
gdk-pixbuf-2.0 >= ${GDK_PIXBUF_VERSION}
- webkit-1.0 >= ${WEBKIT_VERSION}])
+ webkit-1.0 >= ${WEBKIT_VERSION}
+ gthread-2.0])
GP_STATUS_PLUGIN_ADD([WebHelper], [$enable_webhelper])
View
5 webhelper/src/gwh-plugin.c
@@ -416,6 +416,11 @@ plugin_init (GeanyData *data)
* (g_quark_from_static_string() for example) so it's not safe to remove it */
plugin_module_make_resident (geany_plugin);
+ /* webkit uses threads but don't initialize the thread system */
+ if (! g_thread_supported ()) {
+ g_thread_init (NULL);
+ }
+
load_config ();
gwh_keybindings_init ();

0 comments on commit 0c76f82

Please sign in to comment.