[gtef] FileSaver: workaround deadlocks in type initialization
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtef] FileSaver: workaround deadlocks in type initialization
- Date: Sun, 19 Mar 2017 11:57:31 +0000 (UTC)
commit cd328df1628832e7cd483a639d1f381722dba8ce
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Mar 19 12:54:17 2017 +0100
FileSaver: workaround deadlocks in type initialization
To mirror what is done in GtkSourceView.
https://bugzilla.gnome.org/show_bug.cgi?id=780216
gtef/gtef-file-saver.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gtef/gtef-file-saver.c b/gtef/gtef-file-saver.c
index 580fa97..df6717d 100644
--- a/gtef/gtef-file-saver.c
+++ b/gtef/gtef-file-saver.c
@@ -470,6 +470,14 @@ gtef_file_saver_class_init (GtefFileSaverClass *klass)
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
+
+ /* Due to potential deadlocks when registering types, we need to ensure
+ * the dependent private class GtefBufferInputStream has been registered
+ * up front.
+ *
+ * See https://bugzilla.gnome.org/show_bug.cgi?id=780216
+ */
+ g_type_ensure (GTEF_TYPE_BUFFER_INPUT_STREAM);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]