[epiphany] web-extension-proxy: Fix misuse of GCancellable
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] web-extension-proxy: Fix misuse of GCancellable
- Date: Wed, 2 Nov 2016 00:17:23 +0000 (UTC)
commit 2096010af830ca27fdea19b1cbf45e89a32fadb8
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 c35332e..13481e8 100644
--- a/embed/ephy-web-extension-proxy.c
+++ b/embed/ephy-web-extension-proxy.c
@@ -55,7 +55,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);
@@ -123,6 +127,7 @@ web_extension_proxy_created_cb (GDBusProxy *proxy,
web_extension->cancellable,
NULL /* GAsyncReadyCallback */,
NULL);
+ g_object_unref (web_extension);
return;
}
@@ -137,6 +142,7 @@ web_extension_proxy_created_cb (GDBusProxy *proxy,
(GDBusSignalCallback)web_extension_page_created,
web_extension,
NULL);
+ g_object_unref (web_extension);
}
static void
@@ -176,7 +182,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]