aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2012-03-13 17:02:48 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2012-03-13 21:08:57 +0800
commit7ece86ff394e037447767408643e108da8f4658f (patch)
treedb33c2e3457b0e2618a99c0ab4e4b48889200c8b /embed
parent637e046e0666576c71d1efa116d8148450b35db6 (diff)
downloadgsoc2013-epiphany-7ece86ff394e037447767408643e108da8f4658f.tar.gz
gsoc2013-epiphany-7ece86ff394e037447767408643e108da8f4658f.tar.zst
gsoc2013-epiphany-7ece86ff394e037447767408643e108da8f4658f.zip
ephy-embed: cancel the pending history queries during finalize
https://bugzilla.gnome.org/show_bug.cgi?id=671901
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 1c7505798..205f2573b 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -72,6 +72,7 @@ struct _EphyEmbedPrivate
GtkPaned *paned;
WebKitWebView *web_view;
EphyHistoryService *history_service;
+ GCancellable *history_service_cancellable;
GtkWidget *inspector_window;
GtkWidget *inspector_web_view;
GtkWidget *inspector_scrolled_window;
@@ -267,7 +268,7 @@ restore_zoom_level (EphyEmbed *embed,
/* restore zoom level */
if (ephy_embed_utils_address_has_web_scheme (address)) {
ephy_history_service_get_host_for_url (embed->priv->history_service,
- address, NULL,
+ address, embed->priv->history_service_cancellable,
(EphyHistoryJobCallback)get_host_for_url_cb, embed);
}
}
@@ -434,6 +435,11 @@ ephy_embed_dispose (GObject *object)
priv->progress_update_handler_id = 0;
}
+ if (priv->history_service_cancellable) {
+ g_cancellable_cancel (priv->history_service_cancellable);
+ g_clear_object (&priv->history_service_cancellable);
+ }
+
G_OBJECT_CLASS (ephy_embed_parent_class)->dispose (object);
}
@@ -827,6 +833,7 @@ ephy_embed_constructed (GObject *object)
ephy_embed_prefs_add_embed (embed);
priv->history_service = EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ()));
+ priv->history_service_cancellable = g_cancellable_new ();
g_signal_connect (priv->history_service,
"cleared", G_CALLBACK (ephy_embed_history_cleared_cb),