From faae1a028e1bd3e6f6f078f2ed523a41787a17d5 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Sun, 27 Sep 2015 12:07:17 -0500 Subject: [PATCH] browser-plugin: try to avoid a crash Quite tempted to delete this unmaintained and unreliable plugin, but I can stand it not working so long as it at least stops crashing, so let's try this first. Hopefully mitigates bug #737932. --- browser-plugin/browser-plugin.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/browser-plugin/browser-plugin.c b/browser-plugin/browser-plugin.c index 59832ff60..e8b5cf6a1 100644 --- a/browser-plugin/browser-plugin.c +++ b/browser-plugin/browser-plugin.c @@ -282,6 +282,14 @@ on_shell_signal (GDBusProxy *proxy, { PluginObject *obj = user_data; + /* FIXME: We have half a dozen bug reports in which this function crashes in + * WebKit due to a null NPObject. This should never happen, but since it is + * happening, let's turn the crash into a critical. + * + * https://bugzilla.gnome.org/show_bug.cgi?id=737932 + */ + g_return_if_fail (obj->instance); + if (strcmp (signal_name, "ExtensionStatusChanged") == 0) { gchar *uuid; @@ -312,6 +320,12 @@ on_shell_appeared (GDBusConnection *connection, { PluginObject *obj = (PluginObject*) user_data; + /* FIXME: Not sure if this is ever hit or not, but let's play it safe. + * + * https://bugzilla.gnome.org/show_bug.cgi?id=737932 + */ + g_return_if_fail (obj->instance); + if (obj->restart_listener) { NPVariant result = { NPVariantType_Void };