[gjs] gi: Use raw JS_GetPrivate from tracing callbacks



commit fba2a3413b203385431e2ef3cf1e81ce20dc0f7a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Jan 2 17:55:14 2013 -0500

    gi: Use raw JS_GetPrivate from tracing callbacks
    
    We don't need a type-check, as we already know it's the right
    class. priv_from_js is going to gain BeginRequest/EndRequest,
    which we can't use from tracing hooks, so omit those for now.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691038

 gi/keep-alive.c |    2 +-
 gi/object.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gi/keep-alive.c b/gi/keep-alive.c
index 704c47d..581c9ad 100644
--- a/gi/keep-alive.c
+++ b/gi/keep-alive.c
@@ -133,7 +133,7 @@ keep_alive_trace(JSTracer *tracer,
 {
     KeepAlive *priv;
 
-    priv = priv_from_js(tracer->context, obj);
+    priv = JS_GetPrivate(tracer->context, obj);
 
     if (priv == NULL) /* prototype */
         return;
diff --git a/gi/object.c b/gi/object.c
index 0ec3987..3e909c7 100644
--- a/gi/object.c
+++ b/gi/object.c
@@ -1026,7 +1026,7 @@ object_instance_trace(JSTracer *tracer,
     ObjectInstance *priv;
     GList *iter;
 
-    priv = priv_from_js(tracer->context, obj);
+    priv = JS_GetPrivate(tracer->context, obj);
 
     for (iter = priv->signals; iter; iter = iter->next) {
         ConnectData *cd = iter->data;



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