[gjs/wip/ptomato/mozjs31: 8/21] js: Adhere to new JSClass struct layout



commit c76250cd73aa952d90952d664008b127c19a0433
Author: Philip Chimento <philip endlessm com>
Date:   Thu Nov 3 18:36:13 2016 -0700

    js: Adhere to new JSClass struct layout
    
    This changes all JSClass declarations to be correct with the definition
    of JSClass in mozjs31.

 gi/boxed.cpp       |    1 -
 gi/function.cpp    |    4 +---
 gi/fundamental.cpp |    1 -
 gi/gerror.cpp      |    3 +--
 gi/interface.cpp   |    3 +--
 gi/keep-alive.cpp  |    1 -
 gi/ns.cpp          |    3 +--
 gi/object.cpp      |    1 -
 gi/param.cpp       |    3 +--
 gi/repo.cpp        |    3 +--
 gi/union.cpp       |    3 +--
 gjs/byteArray.cpp  |    3 +--
 gjs/coverage.cpp   |    3 +--
 gjs/importer.cpp   |    3 +--
 gjs/jsapi-util.cpp |    3 +--
 gjs/jsapi-util.h   |    3 +--
 16 files changed, 12 insertions(+), 29 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index 6760808..97dcbc2 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -919,7 +919,6 @@ struct JSClass gjs_boxed_class = {
     (JSResolveOp) boxed_new_resolve, /* needs cast since it's the new resolve signature */
     JS_ConvertStub,
     boxed_finalize,
-    NULL,  /* checkAccess */
     NULL,  /* call */
     NULL,  /* hasInstance */
     NULL,  /* construct */
diff --git a/gi/function.cpp b/gi/function.cpp
index 43e41bb..eb1e4a1 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -1471,9 +1471,7 @@ struct JSClass gjs_function_class = {
     JS_ResolveStub,
     JS_ConvertStub,
     function_finalize,
-    NULL,
-    function_call,
-    NULL, NULL, NULL
+    function_call
 };
 
 JSPropertySpec gjs_function_proto_props[] = {
diff --git a/gi/fundamental.cpp b/gi/fundamental.cpp
index f627eb4..98a248a 100644
--- a/gi/fundamental.cpp
+++ b/gi/fundamental.cpp
@@ -557,7 +557,6 @@ struct JSClass gjs_fundamental_instance_class = {
     (JSResolveOp) fundamental_instance_new_resolve, /* needs cast since it's the new resolve signature */
     JS_ConvertStub,
     fundamental_finalize,
-    NULL,  /* checkAccess */
     NULL,  /* call */
     NULL,  /* hasInstance */
     NULL,  /* construct */
diff --git a/gi/gerror.cpp b/gi/gerror.cpp
index 97f1ae7..4949175 100644
--- a/gi/gerror.cpp
+++ b/gi/gerror.cpp
@@ -285,8 +285,7 @@ struct JSClass gjs_error_class = {
     JS_EnumerateStub,
     JS_ResolveStub,
     JS_ConvertStub,
-    error_finalize,
-    JSCLASS_NO_OPTIONAL_MEMBERS
+    error_finalize
 };
 
 /* We need to shadow all fields of GError, to prevent calling the getter from GBoxed
diff --git a/gi/interface.cpp b/gi/interface.cpp
index a753792..631eef0 100644
--- a/gi/interface.cpp
+++ b/gi/interface.cpp
@@ -168,8 +168,7 @@ struct JSClass gjs_interface_class = {
     JS_EnumerateStub,
     (JSResolveOp) interface_new_resolve,
     JS_ConvertStub,
-    interface_finalize,
-    JSCLASS_NO_OPTIONAL_MEMBERS
+    interface_finalize
 };
 
 JSPropertySpec gjs_interface_proto_props[] = {
diff --git a/gi/keep-alive.cpp b/gi/keep-alive.cpp
index 4021622..c7ba605 100644
--- a/gi/keep-alive.cpp
+++ b/gi/keep-alive.cpp
@@ -160,7 +160,6 @@ struct JSClass gjs_keep_alive_class = {
     NULL,
     NULL,
     NULL,
-    NULL,
     keep_alive_trace,
 };
 
diff --git a/gi/ns.cpp b/gi/ns.cpp
index 172bc7c..2cff633 100644
--- a/gi/ns.cpp
+++ b/gi/ns.cpp
@@ -175,8 +175,7 @@ struct JSClass gjs_ns_class = {
     JS_EnumerateStub,
     (JSResolveOp) ns_new_resolve, /* needs cast since it's the new resolve signature */
     JS_ConvertStub,
-    ns_finalize,
-    JSCLASS_NO_OPTIONAL_MEMBERS
+    ns_finalize
 };
 
 JSPropertySpec gjs_ns_proto_props[] = {
diff --git a/gi/object.cpp b/gi/object.cpp
index 1bb9451..dfc8445 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1772,7 +1772,6 @@ struct JSClass gjs_object_instance_class = {
     NULL,
     NULL,
     NULL,
-    NULL,
     object_instance_trace,
     
 };
diff --git a/gi/param.cpp b/gi/param.cpp
index f1836e5..baa7960 100644
--- a/gi/param.cpp
+++ b/gi/param.cpp
@@ -163,8 +163,7 @@ struct JSClass gjs_param_class = {
     JS_EnumerateStub,
     (JSResolveOp) param_new_resolve,
     JS_ConvertStub,
-    param_finalize,
-    JSCLASS_NO_OPTIONAL_MEMBERS
+    param_finalize
 };
 
 JSPropertySpec gjs_param_proto_props[] = {
diff --git a/gi/repo.cpp b/gi/repo.cpp
index f193581..4ffce4e 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -226,8 +226,7 @@ struct JSClass gjs_repo_class = {
     JS_EnumerateStub,
     (JSResolveOp) repo_new_resolve, /* needs cast since it's the new resolve signature */
     JS_ConvertStub,
-    repo_finalize,
-    JSCLASS_NO_OPTIONAL_MEMBERS
+    repo_finalize
 };
 
 JSPropertySpec gjs_repo_proto_props[] = {
diff --git a/gi/union.cpp b/gi/union.cpp
index c0d289c..57725ed 100644
--- a/gi/union.cpp
+++ b/gi/union.cpp
@@ -305,8 +305,7 @@ struct JSClass gjs_union_class = {
     JS_EnumerateStub,
     (JSResolveOp) union_new_resolve, /* needs cast since it's the new resolve signature */
     JS_ConvertStub,
-    union_finalize,
-    JSCLASS_NO_OPTIONAL_MEMBERS
+    union_finalize
 };
 
 JSPropertySpec gjs_union_proto_props[] = {
diff --git a/gjs/byteArray.cpp b/gjs/byteArray.cpp
index a574382..d6341d7 100644
--- a/gjs/byteArray.cpp
+++ b/gjs/byteArray.cpp
@@ -64,8 +64,7 @@ struct JSClass gjs_byte_array_class = {
     JS_EnumerateStub,
     JS_ResolveStub,
     JS_ConvertStub,
-    byte_array_finalize,
-    JSCLASS_NO_OPTIONAL_MEMBERS
+    byte_array_finalize
 };
 
 bool
diff --git a/gjs/coverage.cpp b/gjs/coverage.cpp
index 15075b7..36bdebe 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -1253,8 +1253,7 @@ gjs_coverage_init(GjsCoverage *self)
 static JSClass coverage_global_class = {
     "GjsCoverageGlobal", JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(GJS_GLOBAL_SLOT_LAST),
     JS_PropertyStub, JS_DeletePropertyStub, JS_PropertyStub, JS_StrictPropertyStub,
-    JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, NULL,
-    JSCLASS_NO_OPTIONAL_MEMBERS
+    JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, NULL
 };
 
 static bool
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index f0ff510..8374cf5 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -903,8 +903,7 @@ struct JSClass gjs_importer_class = {
     (JSEnumerateOp) importer_new_enumerate, /* needs cast since it's the new enumerate signature */
     (JSResolveOp) importer_new_resolve, /* needs cast since it's the new resolve signature */
     JS_ConvertStub,
-    importer_finalize,
-    JSCLASS_NO_OPTIONAL_MEMBERS
+    importer_finalize
 };
 
 JSPropertySpec gjs_importer_proto_props[] = {
diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index 0e4ca99..cd6c37a 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -47,8 +47,7 @@ gjs_util_error_quark (void)
 static JSClass global_class = {
     "GjsGlobal", JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(GJS_GLOBAL_SLOT_LAST),
     JS_PropertyStub, JS_DeletePropertyStub, JS_PropertyStub, JS_StrictPropertyStub,
-    JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, NULL,
-    JSCLASS_NO_OPTIONAL_MEMBERS
+    JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, NULL
 };
 
 /**
diff --git a/gjs/jsapi-util.h b/gjs/jsapi-util.h
index 120e1fb..7d5a0a9 100644
--- a/gjs/jsapi-util.h
+++ b/gjs/jsapi-util.h
@@ -195,8 +195,7 @@ static struct JSClass gjs_##cname##_class = { \
     JS_EnumerateStub,\
     (JSResolveOp) gjs_##cname##_new_resolve, \
     JS_ConvertStub, \
-    gjs_##cname##_finalize, \
-    JSCLASS_NO_OPTIONAL_MEMBERS \
+    gjs_##cname##_finalize                                                     \
 }; \
 JS::Value                                                                      \
 gjs_##cname##_create_proto(JSContext *context,                                 \


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