diff options
author | Michael Catanzaro <mcatanzaro@igalia.com> | 2019-04-18 15:05:21 -0500 |
---|---|---|
committer | Jan-Michael Brummer <jan.brummer@tabos.org> | 2019-04-18 20:54:10 +0000 |
commit | cefc3e33cca914cdc3130e589bc855491baaf004 (patch) | |
tree | 8c85bff59eba0f9211d029761a55c78cc3f8ad6b /lib/safe-browsing/ephy-gsb-service.c | |
parent | 253295c67328cb4ec195b9ba2b5aecd98272cb45 (diff) | |
download | epiphany-cefc3e33cca914cdc3130e589bc855491baaf004.tar.gz |
gsb-service: ref self for lifetime of update thread
Fixes #736
Diffstat (limited to 'lib/safe-browsing/ephy-gsb-service.c')
-rw-r--r-- | lib/safe-browsing/ephy-gsb-service.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/safe-browsing/ephy-gsb-service.c b/lib/safe-browsing/ephy-gsb-service.c index fd9d84d54..d31fbc154 100644 --- a/lib/safe-browsing/ephy-gsb-service.c +++ b/lib/safe-browsing/ephy-gsb-service.c @@ -292,6 +292,8 @@ out: g_list_free_full (threat_lists, (GDestroyNotify)ephy_gsb_threat_list_free); ephy_gsb_storage_set_metadata (self->storage, "next_list_updates_time", self->next_list_updates_time); + + g_object_unref (self); } static void @@ -313,7 +315,7 @@ ephy_gsb_service_update (EphyGSBService *self) g_assert (ephy_gsb_storage_is_operable (self->storage)); g_atomic_int_set (&self->is_updating, TRUE); - task = g_task_new (self, NULL, + task = g_task_new (g_object_ref (self), NULL, (GAsyncReadyCallback)ephy_gsb_service_update_finished_cb, NULL); g_task_run_in_thread (task, (GTaskThreadFunc)ephy_gsb_service_update_thread); |