[epiphany] ephy-web-view: Do not use an idle to show crashed error page



commit e46183eea9849f59e2d34c2b8a8aecf169155641
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Thu May 30 15:31:15 2013 +0200

    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

 embed/ephy-web-view.c |   30 +++++-------------------------
 1 files changed, 5 insertions(+), 25 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 1501e66..a384a0d 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]