diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-04-09 09:49:33 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-04-09 10:41:17 +0800 |
commit | ed1b2fb86fea5a1d2c03b06b5305556f2ed6d731 (patch) | |
tree | 36b70d8292c5a11d4ad06ecf449b5c946503cab9 /e-util | |
parent | 0c89188f6fa4e72f0716a3ac8b6fe8c0baef4e0e (diff) | |
download | gsoc2013-evolution-ed1b2fb86fea5a1d2c03b06b5305556f2ed6d731.tar gsoc2013-evolution-ed1b2fb86fea5a1d2c03b06b5305556f2ed6d731.tar.gz gsoc2013-evolution-ed1b2fb86fea5a1d2c03b06b5305556f2ed6d731.tar.bz2 gsoc2013-evolution-ed1b2fb86fea5a1d2c03b06b5305556f2ed6d731.tar.lz gsoc2013-evolution-ed1b2fb86fea5a1d2c03b06b5305556f2ed6d731.tar.xz gsoc2013-evolution-ed1b2fb86fea5a1d2c03b06b5305556f2ed6d731.tar.zst gsoc2013-evolution-ed1b2fb86fea5a1d2c03b06b5305556f2ed6d731.zip |
EWebView: Disable WebKit plugins during instance initialization.
Calling webkit_get_web_plugin_database() somehow ends up calling
g_bus_get_sync(), which in turn makes gtkdoc-scangobj hang forever.
Call it instead as a GOnce callback during instance initialization,
which avoids the hang since gtkdoc-scangobj only peeks at classes.
(cherry picked from commit eb6ecc6fb5d1b6859fab949ba20865d2ca784306)
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-web-view.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/e-util/e-web-view.c b/e-util/e-web-view.c index 32c37e026d..4f52b9585f 100644 --- a/e-util/e-web-view.c +++ b/e-util/e-web-view.c @@ -101,6 +101,7 @@ enum { }; static guint signals[LAST_SIGNAL]; +static GOnce disable_webkit_3rd_party_plugins_once = G_ONCE_INIT; static const gchar *ui = "<ui>" @@ -1451,8 +1452,8 @@ web_view_drag_motion (GtkWidget *widget, return FALSE; } -static void -web_view_disable_webkit_3rd_party_plugins (void) +static gpointer +web_view_disable_webkit_3rd_party_plugins (gpointer unused) { WebKitWebPluginDatabase *database; GSList *installed_plugins, *iterator; @@ -1460,17 +1461,19 @@ web_view_disable_webkit_3rd_party_plugins (void) database = webkit_get_web_plugin_database (); if (!database) - return; + return NULL; installed_plugins = webkit_web_plugin_database_get_plugins (database); if (!installed_plugins) - return; + return NULL; for (iterator = installed_plugins; iterator; iterator = iterator->next) webkit_web_plugin_set_enabled (iterator->data, FALSE); webkit_web_plugin_database_plugins_list_free (installed_plugins); + + return NULL; } static void @@ -1678,8 +1681,6 @@ e_web_view_class_init (EWebViewClass *class) e_marshal_BOOLEAN__STRING, G_TYPE_BOOLEAN, 1, G_TYPE_STRING); - web_view_disable_webkit_3rd_party_plugins (); - webkit_set_cache_model (WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER); webkit_set_default_web_database_quota (0); webkit_application_cache_set_maximum_size (0); @@ -1714,6 +1715,10 @@ e_web_view_init (EWebView *web_view) const gchar *id; GError *error = NULL; + g_once ( + &disable_webkit_3rd_party_plugins_once, + web_view_disable_webkit_3rd_party_plugins, NULL); + web_view->priv = E_WEB_VIEW_GET_PRIVATE (web_view); g_signal_connect ( |