[gvfs] gdaemonfileenumerator: Fix crashes in synchronous enumerator code
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] gdaemonfileenumerator: Fix crashes in synchronous enumerator code
- Date: Mon, 24 Jul 2017 12:13:52 +0000 (UTC)
commit c155704092c1848a42539ab91cad9052c38e62af
Author: Ondrej Holy <oholy redhat com>
Date: Mon Jul 24 12:00:09 2017 +0200
gdaemonfileenumerator: Fix crashes in synchronous enumerator code
Commit 2eae108 ported the code to GTask and slightly changed processing.
The changes trigger the following criticals and cause crashes of some
applications (e.g. Firefox, Thunderbird).
GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Return TRUE from signal handlers in order to prevent further processing
of the invocations, which cause the mentioned issues.
https://bugzilla.gnome.org/show_bug.cgi?id=784953
client/gdaemonfileenumerator.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/client/gdaemonfileenumerator.c b/client/gdaemonfileenumerator.c
index aa30ee2..f3ba336 100644
--- a/client/gdaemonfileenumerator.c
+++ b/client/gdaemonfileenumerator.c
@@ -194,7 +194,7 @@ next_files_sync_check (GDaemonFileEnumerator *enumerator)
g_mutex_unlock (&enumerator->next_files_mutex);
}
-static void
+static gboolean
handle_done (GVfsDBusEnumerator *object,
GDBusMethodInvocation *invocation,
gpointer user_data)
@@ -209,9 +209,11 @@ handle_done (GVfsDBusEnumerator *object,
g_signal_emit (enumerator, signals[CHANGED], 0);
gvfs_dbus_enumerator_complete_done (object, invocation);
+
+ return TRUE;
}
-static void
+static gboolean
handle_got_info (GVfsDBusEnumerator *object,
GDBusMethodInvocation *invocation,
GVariant *arg_infos,
@@ -248,6 +250,8 @@ handle_got_info (GVfsDBusEnumerator *object,
g_signal_emit (enumerator, signals[CHANGED], 0);
gvfs_dbus_enumerator_complete_got_info (object, invocation);
+
+ return TRUE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]