summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@igalia.com>2019-05-24 15:51:02 -0500
committerMichael Catanzaro <mcatanzaro@igalia.com>2019-05-24 15:52:29 -0500
commitf793d533d4d9dc6eda6c5d20648721cd61859523 (patch)
treeffe5cd338d03355cdb114d7846b9609cc5c6f3ef
parent0993266ff26bd775b4aa823b300eaca1b85fcdbd (diff)
downloadepiphany-f793d533d4d9dc6eda6c5d20648721cd61859523.tar.gz
download: prepare for WebKitDownload to outlive the EphyDownload
I'm seeing occasional criticals when a WebKitDownload outlives the EphyDownload, so better protect here.
-rw-r--r--embed/ephy-download.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index 92ec830de..9ee900aab 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -883,21 +883,21 @@ ephy_download_new_internal (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));