[gjs/wip/mozjs-188: 5/10] update for JSClass prototype changes



commit 523bc5962102d6244dd41fa7a14b111cf131d11e
Author: Tim Lunn <tim feathertop org>
Date:   Wed Jan 9 12:00:15 2013 +1100

    update for JSClass prototype changes
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690982

 gi/boxed.c       |    3 +--
 gi/function.c    |    3 +--
 gi/keep-alive.c  |    6 +-----
 gi/object.c      |    9 +++------
 gjs/byteArray.c  |    7 +++----
 gjs/jsapi-util.c |    2 +-
 gjs/jsapi-util.h |    3 +--
 7 files changed, 11 insertions(+), 22 deletions(-)
---
diff --git a/gi/boxed.c b/gi/boxed.c
index 464834e..bba8e93 100644
--- a/gi/boxed.c
+++ b/gi/boxed.c
@@ -941,8 +941,7 @@ static struct JSClass gjs_boxed_class = {
     boxed_finalize,
     NULL,
     NULL,
-    NULL,
-    NULL, NULL, NULL, NULL, NULL
+    NULL, NULL, NULL
 };
 
 static JSPropertySpec gjs_boxed_proto_props[] = {
diff --git a/gi/function.c b/gi/function.c
index 1d9f2ad..fcb5e56 100644
--- a/gi/function.c
+++ b/gi/function.c
@@ -1366,9 +1366,8 @@ static struct JSClass gjs_function_class = {
     JS_ConvertStub,
     function_finalize,
     NULL,
-    NULL,
     function_call,
-    NULL, NULL, NULL, NULL, NULL
+    NULL, NULL, NULL
 };
 
 static JSPropertySpec gjs_function_proto_props[] = {
diff --git a/gi/keep-alive.c b/gi/keep-alive.c
index ce56e35..a8eea22 100644
--- a/gi/keep-alive.c
+++ b/gi/keep-alive.c
@@ -150,7 +150,6 @@ keep_alive_trace(JSTracer *tracer,
  */
 static struct JSClass gjs_keep_alive_class = {
     "__private_GjsKeepAlive", /* means "new __private_GjsKeepAlive()" works */
-    JSCLASS_MARK_IS_TRACE | /* TraceOp not MarkOp */
     JSCLASS_HAS_PRIVATE,
     JS_PropertyStub,
     JS_PropertyStub,
@@ -164,10 +163,7 @@ static struct JSClass gjs_keep_alive_class = {
     NULL,
     NULL,
     NULL,
-    NULL,
-    NULL,
-    JS_CLASS_TRACE(keep_alive_trace),
-    NULL
+    keep_alive_trace,
 };
 
 static JSPropertySpec gjs_keep_alive_proto_props[] = {
diff --git a/gi/object.c b/gi/object.c
index 13dfbf9..dd848a7 100644
--- a/gi/object.c
+++ b/gi/object.c
@@ -1436,8 +1436,7 @@ to_string_func(JSContext *context,
 static struct JSClass gjs_object_instance_class = {
     "GObject_Object",
     JSCLASS_HAS_PRIVATE |
-    JSCLASS_NEW_RESOLVE |
-    JSCLASS_MARK_IS_TRACE,
+    JSCLASS_NEW_RESOLVE,
     JS_PropertyStub,
     JS_PropertyStub,
     object_instance_get_prop,
@@ -1450,10 +1449,8 @@ static struct JSClass gjs_object_instance_class = {
     NULL,
     NULL,
     NULL,
-    NULL,
-    NULL,
-    JS_CLASS_TRACE(object_instance_trace),
-    NULL,
+    object_instance_trace,
+    
 };
 
 static JSBool
diff --git a/gjs/byteArray.c b/gjs/byteArray.c
index 644e1c6..1e70701 100644
--- a/gjs/byteArray.c
+++ b/gjs/byteArray.c
@@ -65,16 +65,15 @@ static struct JSClass gjs_byte_array_class = {
     JSCLASS_NEW_RESOLVE,
     JS_PropertyStub,
     JS_PropertyStub,
-    byte_array_get_prop,
-    byte_array_set_prop,
+    (JSPropertyOp)byte_array_get_prop,
+    (JSStrictPropertyOp)byte_array_set_prop,
     NULL,
     (JSResolveOp) byte_array_new_resolve, /* cast due to new sig */
     JS_ConvertStub,
     byte_array_finalize,
     NULL,
     NULL,
-    NULL,
-    NULL, NULL, NULL, NULL, NULL
+    NULL, NULL, NULL
 };
 
 JSBool
diff --git a/gjs/jsapi-util.c b/gjs/jsapi-util.c
index 5451969..2aa6f06 100644
--- a/gjs/jsapi-util.c
+++ b/gjs/jsapi-util.c
@@ -85,7 +85,7 @@ gjs_runtime_get_context(JSRuntime *runtime)
 static JSClass global_class = {
     "GjsGlobal", JSCLASS_GLOBAL_FLAGS,
     JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_StrictPropertyStub,
-    JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub,
+    JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub,
     JSCLASS_NO_OPTIONAL_MEMBERS
 };
 
diff --git a/gjs/jsapi-util.h b/gjs/jsapi-util.h
index 19406a8..ce72963 100644
--- a/gjs/jsapi-util.h
+++ b/gjs/jsapi-util.h
@@ -145,8 +145,7 @@ static struct JSClass gjs_##cname##_class = { \
     gjs_##cname##_finalize, \
     NULL, \
     NULL, \
-    NULL, \
-    NULL, NULL, NULL, NULL, NULL \
+    NULL, NULL, NULL \
 }; \
 jsval gjs_##cname##_create_proto(JSContext *context, JSObject *module, const char *proto_name, JSObject *parent) \
 { \



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