[evolution/gnome-3-26] Crash under e_dom_resize_document_content_to_preview_width()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-26] Crash under e_dom_resize_document_content_to_preview_width()
- Date: Mon, 23 Oct 2017 17:09:20 +0000 (UTC)
commit 6fd3d59c28ffc50f3f4b4921828b783c6e7e0b67
Author: Milan Crha <mcrha redhat com>
Date: Mon Oct 23 19:04:03 2017 +0200
Crash under e_dom_resize_document_content_to_preview_width()
Instead of using passed-in WebKitDOMDocument valid from time of
the event subscribing, get the current document from the object
which sent the signal.
This had been reported downstream at:
https://bugzilla.redhat.com/show_bug.cgi?id=1504503
src/web-extensions/e-dom-utils.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/web-extensions/e-dom-utils.c b/src/web-extensions/e-dom-utils.c
index adcb956..863278f 100644
--- a/src/web-extensions/e-dom-utils.c
+++ b/src/web-extensions/e-dom-utils.c
@@ -999,11 +999,16 @@ e_dom_resize_document_content_to_preview_width (WebKitDOMDocument *document)
}
static void
-dom_window_resize_cb (WebKitDOMElement *element,
+dom_window_resize_cb (WebKitDOMDOMWindow *dom_window,
WebKitDOMEvent *event,
- WebKitDOMDocument *document)
+ gpointer user_data)
{
- e_dom_resize_document_content_to_preview_width (document);
+ WebKitDOMDocument *document;
+
+ document = webkit_dom_dom_window_get_document (dom_window);
+
+ if (document)
+ e_dom_resize_document_content_to_preview_width (document);
}
void
@@ -1036,8 +1041,7 @@ e_dom_utils_e_mail_display_bind_dom (WebKitDOMDocument *document,
WEBKIT_DOM_EVENT_TARGET (dom_window),
"resize",
G_CALLBACK (dom_window_resize_cb),
- FALSE,
- document);
+ FALSE, NULL);
e_dom_utils_add_css_rule_into_style_sheet (
document,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]