diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2012-08-29 23:23:26 +0800 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2012-09-01 02:34:02 +0800 |
commit | 24a912ed20ef0166222112a7327662e71be9a9c5 (patch) | |
tree | b565b410fbee4fc2455618f580abb1596919d8eb | |
parent | a23f1d8e71f93ae1b28697039c71578a4d239a30 (diff) | |
download | gsoc2013-epiphany-24a912ed20ef0166222112a7327662e71be9a9c5.tar gsoc2013-epiphany-24a912ed20ef0166222112a7327662e71be9a9c5.tar.gz gsoc2013-epiphany-24a912ed20ef0166222112a7327662e71be9a9c5.tar.bz2 gsoc2013-epiphany-24a912ed20ef0166222112a7327662e71be9a9c5.tar.lz gsoc2013-epiphany-24a912ed20ef0166222112a7327662e71be9a9c5.tar.xz gsoc2013-epiphany-24a912ed20ef0166222112a7327662e71be9a9c5.tar.zst gsoc2013-epiphany-24a912ed20ef0166222112a7327662e71be9a9c5.zip |
ephy-web-view: store the source tag for the snapshot idle
To avoid warnings if the view dissapears before the source function is
called.
-rw-r--r-- | embed/ephy-web-view.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index 4641e351b..234126e60 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -106,6 +106,8 @@ struct _EphyWebViewPrivate { EphyHistoryService *history_service; GCancellable *history_service_cancellable; + guint snapshot_idle_id; + EphyHistoryPageVisitType visit_type; gulong do_not_track_handler; @@ -536,6 +538,11 @@ ephy_web_view_dispose (GObject *object) g_clear_object (&priv->history_service_cancellable); } + if (priv->snapshot_idle_id) { + g_source_remove (priv->snapshot_idle_id); + priv->snapshot_idle_id = 0; + } + g_clear_object(&priv->certificate); G_OBJECT_CLASS (ephy_web_view_parent_class)->dispose (object); @@ -2396,6 +2403,8 @@ load_status_cb (WebKitWebView *web_view, priv->visit_type = EPHY_PAGE_VISIT_NONE; if (!ephy_web_view_is_history_frozen (view)) { + if (priv->snapshot_idle_id) + g_source_remove (priv->snapshot_idle_id); priv->snapshot_idle_id = g_idle_add_full (G_PRIORITY_LOW, (GSourceFunc) web_view_check_snapshot, web_view, NULL); } |