[epiphany] ephy-web-view: store the source tag for the snapshot idle
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-web-view: store the source tag for the snapshot idle
- Date: Fri, 31 Aug 2012 18:43:13 +0000 (UTC)
commit 24a912ed20ef0166222112a7327662e71be9a9c5
Author: Claudio Saavedra <csaavedra igalia com>
Date: Wed Aug 29 18:23:26 2012 +0300
ephy-web-view: store the source tag for the snapshot idle
To avoid warnings if the view dissapears before the source function is
called.
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 4641e35..234126e 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]