[epiphany/gnome-3-32] download: prepare for WebKitDownload to outlive the EphyDownload
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-32] download: prepare for WebKitDownload to outlive the EphyDownload
- Date: Mon, 27 May 2019 12:16:21 +0000 (UTC)
commit 69da294a3aba4ea5156bf5505ee0289a3f4bf626
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Fri May 24 20:51:02 2019 +0000
download: prepare for WebKitDownload to outlive the EphyDownload
I'm seeing occasional criticals when a WebKitDownload outlives the
EphyDownload, so better protect here.
(cherry picked from commit f793d533d4d9dc6eda6c5d20648721cd61859523)
embed/ephy-download.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index 1dffe2271..09dba4ef1 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -762,21 +762,21 @@ ephy_download_new (WebKitDownload *download)
ephy_download = g_object_new (EPHY_TYPE_DOWNLOAD, NULL);
- g_signal_connect (download, "notify::response",
- G_CALLBACK (download_response_changed_cb),
- ephy_download);
- g_signal_connect (download, "decide-destination",
- G_CALLBACK (download_decide_destination_cb),
- ephy_download);
- g_signal_connect (download, "created-destination",
- G_CALLBACK (download_created_destination_cb),
- ephy_download);
- g_signal_connect (download, "finished",
- G_CALLBACK (download_finished_cb),
- ephy_download);
- g_signal_connect (download, "failed",
- G_CALLBACK (download_failed_cb),
- ephy_download);
+ g_signal_connect_object (download, "notify::response",
+ G_CALLBACK (download_response_changed_cb),
+ ephy_download, 0);
+ g_signal_connect_object (download, "decide-destination",
+ G_CALLBACK (download_decide_destination_cb),
+ ephy_download, 0);
+ g_signal_connect_object (download, "created-destination",
+ G_CALLBACK (download_created_destination_cb),
+ ephy_download, 0);
+ g_signal_connect_object (download, "finished",
+ G_CALLBACK (download_finished_cb),
+ ephy_download, 0);
+ g_signal_connect_object (download, "failed",
+ G_CALLBACK (download_failed_cb),
+ ephy_download, 0);
ephy_download->download = g_object_ref (download);
g_object_set_data (G_OBJECT (download), "ephy-download-set", GINT_TO_POINTER (TRUE));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]