[epiphany/mcatanzaro/fatal-web-extension-errors: 12/12] embed: Make failure to start web extension connection fatal
- From: Jan-Michael Brummer <jbrummer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/fatal-web-extension-errors: 12/12] embed: Make failure to start web extension connection fatal
- Date: Tue, 20 Aug 2019 16:25:07 +0000 (UTC)
commit 0782ce4efe04a83bccdeb8eb364889ae51dbc721
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Tue Aug 20 09:23:40 2019 -0500
embed: Make failure to start web extension connection fatal
If we can't start the web extension D-Bus server, tons of Epiphany
features will be broken. This is unacceptable. It shouldn't be a
harmless warning, it should be fatal.
Similarly, if a web process cannot connect to the web extension server,
it should immediately crash so that we can debug the problem rather than
suffer silent failures.
This might help with debugging #871, and would at least rule out this as
a possible cause of failure. But it's prompted by #887, where we see
this actually happening to a user in practice.
Note that further errors from the web extension are intentionally not
made fatal, because a lot could conceivably go wrong, and fatal is very
harsh. But the initial step of establishing a connection, at least,
should never be allowed to fail.
embed/ephy-embed-shell.c | 6 ++----
embed/web-process-extension/ephy-web-process-extension.c | 12 ++++--------
2 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 5705a63c1..521c3c9ab 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -1056,10 +1056,8 @@ ephy_embed_shell_setup_web_process_extensions_server (EphyEmbedShell *shell)
NULL,
&error);
- if (error) {
- g_warning ("Failed to start embed shell D-Bus server on %s: %s", address, error->message);
- return;
- }
+ if (error)
+ g_error ("Failed to start embed shell D-Bus server on %s: %s", address, error->message);
g_signal_connect_object (priv->dbus_server, "new-connection",
G_CALLBACK (new_connection_cb), shell, 0);
diff --git a/embed/web-process-extension/ephy-web-process-extension.c
b/embed/web-process-extension/ephy-web-process-extension.c
index 46c5e1c28..60c47354f 100644
--- a/embed/web-process-extension/ephy-web-process-extension.c
+++ b/embed/web-process-extension/ephy-web-process-extension.c
@@ -543,10 +543,8 @@ dbus_connection_created_cb (GObject *source_object,
introspection_data = g_dbus_node_info_new_for_xml (introspection_xml, NULL);
connection = g_dbus_connection_new_for_address_finish (result, &error);
- if (error) {
- g_warning ("Failed to connect to UI process: %s", error->message);
- return;
- }
+ if (error)
+ g_error ("Failed to connect to UI process: %s", error->message);
registration_id =
g_dbus_connection_register_object (connection,
@@ -556,10 +554,8 @@ dbus_connection_created_cb (GObject *source_object,
extension,
NULL,
&error);
- if (!registration_id) {
- g_warning ("Failed to register web process extension object: %s\n", error->message);
- return;
- }
+ if (!registration_id)
+ g_error ("Failed to register web process extension object: %s\n", error->message);
extension->dbus_connection = g_steal_pointer (&connection);
ephy_web_process_extension_emit_page_created_signals_pending (extension);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]