[evolution/wip/webkit2] EWebKitEditor - Print warning into the console when the WebProcess crashes



commit 732bc116f8eae70438bb2334d3dbc36d6cb08bd4
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Jul 22 11:48:55 2016 +0200

    EWebKitEditor - Print warning into the console when the WebProcess crashes
    
    Also in that case clear the DBus signal's id for WebExtension's signals as at
    this point we cannot remove them properly and this will avoid critical warnings
    printed into the console during dispose() of EWebKitEditor.

 modules/webkit-editor/e-webkit-editor.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/modules/webkit-editor/e-webkit-editor.c b/modules/webkit-editor/e-webkit-editor.c
index 1fc10c1..5a763d6 100644
--- a/modules/webkit-editor/e-webkit-editor.c
+++ b/modules/webkit-editor/e-webkit-editor.c
@@ -5811,6 +5811,18 @@ webkit_editor_drag_end_cb (EWebKitEditor *wk_editor,
        webkit_editor_call_simple_extension_function (wk_editor, "DOMDragAndDropEnd");
 }
 
+static void
+webkit_editor_web_process_crashed_cb (EWebKitEditor *wk_editor)
+{
+       g_warning (
+               "WebKitWebProcess (page id %ld) for EWebKitEditor crashed",
+               webkit_web_view_get_page_id (WEBKIT_WEB_VIEW (wk_editor)));
+
+       wk_editor->priv->web_extension_selection_changed_cb_id = 0;
+       wk_editor->priv->web_extension_content_changed_cb_id = 0;
+       wk_editor->priv->web_extension_undo_redo_state_changed_cb_id = 0;
+}
+
 static gboolean
 webkit_editor_button_press_event (GtkWidget *widget,
                                   GdkEventButton *event)
@@ -5990,6 +6002,10 @@ e_webkit_editor_init (EWebKitEditor *wk_editor)
                wk_editor, "drag-end",
                G_CALLBACK (webkit_editor_drag_end_cb), NULL);
 
+       g_signal_connect (
+               wk_editor, "web-process-crashed",
+               G_CALLBACK (webkit_editor_web_process_crashed_cb), NULL);
+
        wk_editor->priv->owner_change_primary_clipboard_cb_id = g_signal_connect (
                gtk_clipboard_get (GDK_SELECTION_PRIMARY), "owner-change",
                G_CALLBACK (webkit_editor_primary_clipboard_owner_change_cb), wk_editor);


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