[gjs/wip/ptomato/mozjs31: 23/25] js: Adhere to new JSClass struct layout



commit d4cb6bff42ae21e6f92476c16d208d5a63ae344f
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 f7868d9..66bfa2f 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -1478,9 +1478,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 6963c1b..197709a 100644
--- a/gi/fundamental.cpp
+++ b/gi/fundamental.cpp
@@ -558,7 +558,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 6a43d88..ac1b2ea 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 e04dd3c..4060935 100644
--- a/gi/keep-alive.cpp
+++ b/gi/keep-alive.cpp
@@ -159,7 +159,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 14b6321..a4a6020 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 a366efd..05871ce 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 4c8246e..2767e82 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -228,8 +228,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 fc0ef3e..bdedaa7 100644
--- a/gi/union.cpp
+++ b/gi/union.cpp
@@ -306,8 +306,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 3d342fd..ebb6ba3 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 0b98b5a..7d1342f 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -1258,8 +1258,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 2052be4..b58124d 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -896,8 +896,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 d64d00e..e8338ef 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 0285bd2..6fc7fa1 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]