[balsa/72-fix-web-context-init-deadlock] fix deadlock initialising the common HTML web view context
- From: Albrecht Dreß <albrecht src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/72-fix-web-context-init-deadlock] fix deadlock initialising the common HTML web view context
- Date: Mon, 4 Apr 2022 17:55:07 +0000 (UTC)
commit 32ef70244e9a57d910c5fc6580d457cc4e2a2863
Author: Albrecht Dreß <albrecht dress netcologne de>
Date: Mon Apr 4 19:55:01 2022 +0200
fix deadlock initialising the common HTML web view context
See the discussion
https://gitlab.gnome.org/GNOME/balsa/-/issues/72#note_1422420 ff.:
- libbalsa/html.[c]: export helper to initialise the common
WebKitWebContext
- libbalsa/libbalsa.c: call it in libbalsa_init()
Signed-off-by: Albrecht Dreß <albrecht dress netcologne de>
libbalsa/html.c | 11 +++++++++++
libbalsa/html.h | 1 +
libbalsa/libbalsa.c | 4 ++++
3 files changed, 16 insertions(+)
---
diff --git a/libbalsa/html.c b/libbalsa/html.c
index bb34ef817..d2375e799 100644
--- a/libbalsa/html.c
+++ b/libbalsa/html.c
@@ -190,6 +190,17 @@ typedef struct {
#define LIBBALSA_HTML_INFO "libbalsa-webkit2-info"
+
+static WebKitWebContext *lbh_get_web_view_context(void);
+
+
+void
+libbalsa_html_init(void)
+{
+ (void) lbh_get_web_view_context();
+}
+
+
/*
* Unlike older HTML widgets, webkit2 wants UTF-8 text
*/
diff --git a/libbalsa/html.h b/libbalsa/html.h
index a46af578e..87d726126 100644
--- a/libbalsa/html.h
+++ b/libbalsa/html.h
@@ -42,6 +42,7 @@ typedef enum {
typedef void (*LibBalsaHtmlCallback) (const gchar * uri);
+void libbalsa_html_init(void);
GtkWidget *libbalsa_html_new(LibBalsaMessageBody * body,
LibBalsaHtmlCallback hover_cb,
LibBalsaHtmlCallback clicked_cb,
diff --git a/libbalsa/libbalsa.c b/libbalsa/libbalsa.c
index fe48f1a41..6da54f574 100644
--- a/libbalsa/libbalsa.c
+++ b/libbalsa/libbalsa.c
@@ -46,6 +46,7 @@
#include "misc.h"
#include "missing.h"
#include "x509-cert-widget.h"
+#include "html.h"
#include <glib/gi18n.h>
static GThread *main_thread_id;
@@ -86,6 +87,9 @@ libbalsa_init(void)
#if HAVE_OSMO
LIBBALSA_TYPE_ADDRESS_BOOK_OSMO;
#endif
+#ifdef HAVE_HTML_WIDGET
+ libbalsa_html_init();
+#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]