[epiphany] Fix UI process crash if the web process crashes on start
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Fix UI process crash if the web process crashes on start
- Date: Wed, 4 Mar 2015 15:18:09 +0000 (UTC)
commit ff027c61b48d354beceebfe2b6a37c27fb2ad139
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Sat Feb 21 10:19:24 2015 -0600
Fix UI process crash if the web process crashes on start
Currently there is a WebKit bug that causes the web process to crash
when we use webkit_web_view_load_alternate_html() on a local page, say
because Epiphany was closed when a file:// URI was opened in an embed
other than the focused embed. That crash occurs after
web_extension_appeared_cb() but prior to
web_extension_proxy_created_cb(), triggering a call to
web_extension_vanished_cb(), which deletes the EphyWebExtensionProxy
object that is expected to still be alive when
web_extension_proxy_created_cb() is called, crashing the UI process.
We can fix this with a ref/unref pair.
https://bugzilla.gnome.org/show_bug.cgi?id=744896
embed/ephy-web-extension-proxy.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/embed/ephy-web-extension-proxy.c b/embed/ephy-web-extension-proxy.c
index 773e0f9..2e03996 100644
--- a/embed/ephy-web-extension-proxy.c
+++ b/embed/ephy-web-extension-proxy.c
@@ -90,6 +90,8 @@ web_extension_proxy_created_cb (GDBusProxy *proxy,
g_warning ("Error creating web extension proxy: %s\n", error->message);
g_error_free (error);
}
+
+ g_object_unref (web_extension);
}
static void
@@ -110,7 +112,9 @@ web_extension_appeared_cb (GDBusConnection *connection,
EPHY_WEB_EXTENSION_INTERFACE,
web_extension->priv->cancellable,
(GAsyncReadyCallback)web_extension_proxy_created_cb,
- web_extension);
+ /* Ref here because the web process could crash, triggering
+ * web_extension_vanished_cb() before this finishes. */
+ g_object_ref (web_extension));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]