aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c30
1 files changed, 5 insertions, 25 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 1501e6662..a384a0d50 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -102,7 +102,6 @@ struct _EphyWebViewPrivate {
GCancellable *history_service_cancellable;
guint snapshot_idle_id;
- guint show_process_crash_page_id;
EphyHistoryPageVisitType visit_type;
@@ -679,11 +678,6 @@ ephy_web_view_dispose (GObject *object)
priv->snapshot_idle_id = 0;
}
- if (priv->show_process_crash_page_id) {
- g_source_remove (priv->show_process_crash_page_id);
- priv->show_process_crash_page_id = 0;
- }
-
g_clear_object(&priv->certificate);
G_OBJECT_CLASS (ephy_web_view_parent_class)->dispose (object);
@@ -854,29 +848,15 @@ mouse_target_changed_cb (EphyWebView *web_view,
ephy_web_view_set_link_message (web_view, message);
}
-static gboolean
-load_process_crashed_page_cb (EphyWebView *web_view)
-{
- const char *uri = ephy_web_view_get_address (web_view);
- ephy_web_view_load_error_page (web_view, uri, EPHY_WEB_VIEW_ERROR_PROCESS_CRASH, NULL);
-
- web_view->priv->show_process_crash_page_id = 0;
-
- return FALSE;
-}
static void
-process_crashed_cb (WebKitWebView *web_view, gpointer user_data)
+process_crashed_cb (EphyWebView *web_view, gpointer user_data)
{
- EphyWebViewPrivate *priv = EPHY_WEB_VIEW (web_view)->priv;
-
- g_return_if_fail (priv->show_process_crash_page_id == 0);
+ if (ephy_embed_has_load_pending (EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (web_view)))
+ return;
- if (!ephy_embed_has_load_pending (EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (web_view)))
- priv->show_process_crash_page_id = g_idle_add_full (G_PRIORITY_LOW,
- (GSourceFunc)load_process_crashed_page_cb,
- web_view,
- NULL);
+ ephy_web_view_load_error_page (web_view, ephy_web_view_get_address (web_view),
+ EPHY_WEB_VIEW_ERROR_PROCESS_CRASH, NULL);
}
static void