summaryrefslogtreecommitdiff
path: root/gi/object.c
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2012-06-26 19:31:57 +0200
committerGiovanni Campagna <gcampagna@src.gnome.org>2012-07-05 16:11:35 +0200
commit54d60c278a39ce681b35d172b675a4b2d4449b65 (patch)
treefaeb7243b5d021e3371e86cd0d2dd609cafba036 /gi/object.c
parente042120809626f1731ae3ea06032e0fb19ae6579 (diff)
downloadgjs-54d60c278a39ce681b35d172b675a4b2d4449b65.tar.gz
Do not call priv_from_js from the GObject tracer
priv_from_js calls JS_BeginRequest when it refers to a dynamic JSClass (such as that used by GObjects), and that causes a deadlock when called from the GC thread https://bugzilla.gnome.org/show_bug.cgi?id=678908
Diffstat (limited to 'gi/object.c')
-rw-r--r--gi/object.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gi/object.c b/gi/object.c
index fead7cdc..9942ee28 100644
--- a/gi/object.c
+++ b/gi/object.c
@@ -1044,7 +1044,11 @@ object_instance_trace(JSTracer *tracer,
ObjectInstance *priv;
GList *iter;
- priv = priv_from_js(tracer->context, obj);
+ /* DO NOT use priv_from_js here: that uses JS_BeginRequest,
+ but this is called from the GC thread, and deadlocks
+ We know we're of the right JSClass anyway.
+ */
+ priv = JS_GetPrivate(tracer->context, obj);
for (iter = priv->signals; iter; iter = iter->next) {
ConnectData *cd = iter->data;