[gjs] context: Ensure that the GjsContext object is disposed from the owner thread



commit 54c920851a310eb659590a0637afc31d53e4ac5e
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Sun May 9 19:41:39 2021 +0200

    context: Ensure that the GjsContext object is disposed from the owner thread

 gjs/context.cpp | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gjs/context.cpp b/gjs/context.cpp
index 9f0cd78e..db8e294b 100644
--- a/gjs/context.cpp
+++ b/gjs/context.cpp
@@ -355,6 +355,9 @@ gjs_context_dispose(GObject *object)
 
     GjsContextPrivate* gjs = GjsContextPrivate::from_object(object);
 
+    g_assert(gjs->is_owner_thread() &&
+             "Gjs Context disposed from another thread");
+
     /* Profiler must be stopped and freed before context is shut down */
     gjs->free_profiler();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]