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



commit 7be7e95a5974eb40342b5d5ad9ef1d1cdddd82c1
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 8c50f71..8cb1ce2 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -1475,9 +1475,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 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 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 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 73a3205..21f5217 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 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 fbfbdbd..49c19fa 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 d7b0af1..8d45f4b 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 26aff18..b14ecbe 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -897,8 +897,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 646de27..6212ed1 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 716abf4..9c5e5a9 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]