[epiphany/gnome-3-22] web-extension-proxy: Fix misuse of GCancellable
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-22] web-extension-proxy: Fix misuse of GCancellable
- Date: Wed, 2 Nov 2016 00:16:50 +0000 (UTC)
commit 8871c3016e648c3ea691662d1bcecac7b00b1980
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Tue Nov 1 18:57:08 2016 -0500
web-extension-proxy: Fix misuse of GCancellable
embed/ephy-web-extension-proxy.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/embed/ephy-web-extension-proxy.c b/embed/ephy-web-extension-proxy.c
index 3e16dbd..6620ba5 100644
--- a/embed/ephy-web-extension-proxy.c
+++ b/embed/ephy-web-extension-proxy.c
@@ -53,7 +53,11 @@ ephy_web_extension_proxy_dispose (GObject *object)
web_extension->page_created_signal_id = 0;
}
- g_clear_object (&web_extension->cancellable);
+ if (web_extension->cancellable) {
+ g_cancellable_cancel (web_extension->cancellable);
+ g_clear_object (&web_extension->cancellable);
+ }
+
g_clear_object (&web_extension->proxy);
g_clear_object (&web_extension->connection);
@@ -121,6 +125,7 @@ web_extension_proxy_created_cb (GDBusProxy *proxy,
web_extension->cancellable,
NULL /* GAsyncReadyCallback */,
NULL);
+ g_object_unref (web_extension);
return;
}
@@ -135,6 +140,7 @@ web_extension_proxy_created_cb (GDBusProxy *proxy,
(GDBusSignalCallback)web_extension_page_created,
web_extension,
NULL);
+ g_object_unref (web_extension);
}
static void
@@ -174,7 +180,7 @@ ephy_web_extension_proxy_new (GDBusConnection *connection)
EPHY_WEB_EXTENSION_INTERFACE,
web_extension->cancellable,
(GAsyncReadyCallback)web_extension_proxy_created_cb,
- web_extension);
+ g_object_ref (web_extension));
return web_extension;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]