aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2013-05-30 21:31:15 +0800
committerCarlos Garcia Campos <carlosgc@gnome.org>2013-05-30 21:53:09 +0800
commite46183eea9849f59e2d34c2b8a8aecf169155641 (patch)
treeb3aedcb2dd3f08f605397fc8f4c08ca2e6fd6a4a
parentcc881aacfd48a3a283398bc2824a4a7e21aa7593 (diff)
downloadgsoc2013-epiphany-e46183eea9849f59e2d34c2b8a8aecf169155641.tar
gsoc2013-epiphany-e46183eea9849f59e2d34c2b8a8aecf169155641.tar.gz
gsoc2013-epiphany-e46183eea9849f59e2d34c2b8a8aecf169155641.tar.bz2
gsoc2013-epiphany-e46183eea9849f59e2d34c2b8a8aecf169155641.tar.lz
gsoc2013-epiphany-e46183eea9849f59e2d34c2b8a8aecf169155641.tar.xz
gsoc2013-epiphany-e46183eea9849f59e2d34c2b8a8aecf169155641.tar.zst
gsoc2013-epiphany-e46183eea9849f59e2d34c2b8a8aecf169155641.zip
ephy-web-view: Do not use an idle to show crashed error page
This was a workaround for a WebKit bug that has already been fixed in WebKitGTK+ 2.1.1
-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