diff options
author | Giovanni Campagna <gcampagna@src.gnome.org> | 2012-06-26 19:31:57 +0200 |
---|---|---|
committer | Giovanni Campagna <gcampagna@src.gnome.org> | 2012-07-05 16:11:35 +0200 |
commit | 54d60c278a39ce681b35d172b675a4b2d4449b65 (patch) | |
tree | faeb7243b5d021e3371e86cd0d2dd609cafba036 /gi/object.c | |
parent | e042120809626f1731ae3ea06032e0fb19ae6579 (diff) | |
download | gjs-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.c | 6 |
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; |