[epiphany] view-source-handler: Fix misuse of GCancellable
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] view-source-handler: Fix misuse of GCancellable
- Date: Wed, 2 Nov 2016 00:17:18 +0000 (UTC)
commit 69347119711f33ba3d96a13f994b6d420e7d6963
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Tue Nov 1 18:56:52 2016 -0500
view-source-handler: Fix misuse of GCancellable
embed/ephy-view-source-handler.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/embed/ephy-view-source-handler.c b/embed/ephy-view-source-handler.c
index 6296c83..8aefb91 100644
--- a/embed/ephy-view-source-handler.c
+++ b/embed/ephy-view-source-handler.c
@@ -282,12 +282,19 @@ ephy_view_source_request_start (EphyViewSourceRequest *request)
}
static void
+cancel_outstanding_request (EphyViewSourceRequest *request)
+{
+ g_cancellable_cancel (request->cancellable);
+}
+
+static void
ephy_view_source_handler_dispose (GObject *object)
{
EphyViewSourceHandler *handler = EPHY_VIEW_SOURCE_HANDLER (object);
if (handler->outstanding_requests) {
- g_list_free_full (handler->outstanding_requests, (GDestroyNotify)ephy_view_source_request_free);
+ g_list_foreach (handler->outstanding_requests, (GFunc)cancel_outstanding_request, NULL);
+ g_list_free (handler->outstanding_requests);
handler->outstanding_requests = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]