Subject: [gjs/wip/ptomato/mozjs38: 6/17] js: Discontinue
JSClass stubs



commit 44aab7d0ecdaaab4ac54bd55ea9e41aa7d7f1be6
Author: Philip Chimento <philip.chimento@xxxxxxxxx>
Date: Wed Jan 11 23:11:20 2017 -0800

js: Discontinue JSClass stubs

JSClass now simply takes NULL to indicate that an operation should
default to a stub function.

gi/boxed.cpp | 12 ++++++------
gi/function.cpp | 14 +++++++-------
gi/fundamental.cpp | 12 ++++++------
gi/gerror.cpp | 14 +++++++-------
gi/interface.cpp | 12 ++++++------
gi/ns.cpp | 12 ++++++------
gi/object.cpp | 8 ++++----
gi/param.cpp | 12 ++++++------
gi/repo.cpp | 12 ++++++------
gi/union.cpp | 12 ++++++------
gjs/byteArray.cpp | 10 +++++-----
gjs/coverage.cpp | 14 +++++++-------
gjs/importer.cpp | 10 +++++-----
gjs/jsapi-util.cpp | 14 +++++++-------
gjs/jsapi-util.h | 12 ++++++------
15 files changed, 90 insertions(+), 90 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index a36c4f5..3dffdbf 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -894,13 +894,13 @@ struct JSClass gjs_boxed_class = {
JSCLASS_NEW_RESOLVE |
JSCLASS_IMPLEMENTS_BARRIERS |
JSCLASS_HAS_RESERVED_SLOTS(1),
- JS_PropertyStub,
- JS_DeletePropertyStub,
- JS_PropertyStub,
- JS_StrictPropertyStub,
- JS_EnumerateStub,
+ NULL, /* addProperty */
+ NULL, /* deleteProperty */
+ NULL, /* getProperty */
+ NULL, /* setProperty */
+ NULL, /* enumerate */
(JSResolveOp) boxed_new_resolve, /* needs cast since it's the new resolve
signature */
- JS_ConvertStub,
+ NULL, /* convert */
boxed_finalize,
NULL, /* call */
NULL, /* hasInstance */
diff --git a/gi/function.cpp b/gi/function.cpp
index 4bce497..8105370 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -1462,13 +1462,13 @@ struct JSClass gjs_function_class = {
"GIRepositoryFunction", /* means "new GIRepositoryFunction()" works */
JSCLASS_HAS_PRIVATE |
JSCLASS_BACKGROUND_FINALIZE,
- JS_PropertyStub,
- JS_DeletePropertyStub,
- JS_PropertyStub,
- JS_StrictPropertyStub,
- JS_EnumerateStub,
- JS_ResolveStub,
- JS_ConvertStub,
+ NULL, /* addProperty */
+ NULL, /* deleteProperty */
+ NULL, /* getProperty */
+ NULL, /* setProperty */
+ NULL, /* enumerate */
+ NULL, /* resolve */
+ NULL, /* convert */
function_finalize,
function_call
};
diff --git a/gi/fundamental.cpp b/gi/fundamental.cpp
index 4a04bae..ac21388 100644
--- a/gi/fundamental.cpp
+++ b/gi/fundamental.cpp
@@ -540,13 +540,13 @@ struct JSClass gjs_fundamental_instance_class = {
JSCLASS_HAS_PRIVATE |
JSCLASS_IMPLEMENTS_BARRIERS |
JSCLASS_NEW_RESOLVE,
- JS_PropertyStub,
- JS_DeletePropertyStub,
- JS_PropertyStub,
- JS_StrictPropertyStub,
- JS_EnumerateStub,
+ NULL, /* addProperty */
+ NULL, /* deleteProperty */
+ NULL, /* getProperty */
+ NULL, /* setProperty */
+ NULL, /* enumerate */
(JSResolveOp) fundamental_instance_new_resolve, /* needs cast since it's
the new resolve signature */
- JS_ConvertStub,
+ NULL, /* convert */
fundamental_finalize,
NULL, /* call */
NULL, /* hasInstance */
diff --git a/gi/gerror.cpp b/gi/gerror.cpp
index 5ba56d1..1ac7d9e 100644
--- a/gi/gerror.cpp
+++ b/gi/gerror.cpp
@@ -278,13 +278,13 @@ struct JSClass gjs_error_class = {
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE |
JSCLASS_BACKGROUND_FINALIZE,
- JS_PropertyStub,
- JS_DeletePropertyStub,
- JS_PropertyStub,
- JS_StrictPropertyStub,
- JS_EnumerateStub,
- JS_ResolveStub,
- JS_ConvertStub,
+ NULL, /* addProperty */
+ NULL, /* deleteProperty */
+ NULL, /* getProperty */
+ NULL, /* setProperty */
+ NULL, /* enumerate */
+ NULL, /* resolve */
+ NULL, /* convert */
error_finalize
};

diff --git a/gi/interface.cpp b/gi/interface.cpp
index 0347812..dd431a9 100644
--- a/gi/interface.cpp
+++ b/gi/interface.cpp
@@ -160,13 +160,13 @@ struct JSClass gjs_interface_class = {
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE |
JSCLASS_BACKGROUND_FINALIZE,
- JS_PropertyStub,
- JS_DeletePropertyStub,
- JS_PropertyStub,
- JS_StrictPropertyStub,
- JS_EnumerateStub,
+ NULL, /* addProperty */
+ NULL, /* deleteProperty */
+ NULL, /* getProperty */
+ NULL, /* setProperty */
+ NULL, /* enumerate */
(JSResolveOp) interface_new_resolve,
- JS_ConvertStub,
+ NULL, /* convert */
interface_finalize
};

diff --git a/gi/ns.cpp b/gi/ns.cpp
index d53d8d1..23ff07f 100644
--- a/gi/ns.cpp
+++ b/gi/ns.cpp
@@ -159,13 +159,13 @@ struct JSClass gjs_ns_class = {
"GIRepositoryNamespace",
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE,
- JS_PropertyStub,
- JS_DeletePropertyStub,
- JS_PropertyStub,
- JS_StrictPropertyStub,
- JS_EnumerateStub,
+ NULL, /* addProperty */
+ NULL, /* deleteProperty */
+ NULL, /* getProperty */
+ NULL, /* setProperty */
+ NULL, /* enumerate */
(JSResolveOp) ns_new_resolve, /* needs cast since it's the new resolve
signature */
- JS_ConvertStub,
+ NULL, /* convert */
ns_finalize
};

diff --git a/gi/object.cpp b/gi/object.cpp
index a3921b2..5ffe743 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1885,13 +1885,13 @@ struct JSClass gjs_object_instance_class = {
JSCLASS_HAS_PRIVATE |
JSCLASS_IMPLEMENTS_BARRIERS |
JSCLASS_NEW_RESOLVE,
- JS_PropertyStub,
- JS_DeletePropertyStub,
+ NULL, /* addProperty */
+ NULL, /* deleteProperty */
object_instance_get_prop,
object_instance_set_prop,
- JS_EnumerateStub,
+ NULL, /* enumerate */
(JSResolveOp) object_instance_new_resolve, /* needs cast since it's the
new resolve signature */
- JS_ConvertStub,
+ NULL, /* convert */
object_instance_finalize,
NULL,
NULL,
diff --git a/gi/param.cpp b/gi/param.cpp
index 1b18150..9238ca5 100644
--- a/gi/param.cpp
+++ b/gi/param.cpp
@@ -147,13 +147,13 @@ struct JSClass gjs_param_class = {
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE |
JSCLASS_BACKGROUND_FINALIZE,
- JS_PropertyStub,
- JS_DeletePropertyStub,
- JS_PropertyStub,
- JS_StrictPropertyStub,
- JS_EnumerateStub,
+ NULL, /* addProperty */
+ NULL, /* deleteProperty */
+ NULL, /* getProperty */
+ NULL, /* setProperty */
+ NULL, /* enumerate */
(JSResolveOp) param_new_resolve,
- JS_ConvertStub,
+ NULL, /* convert */
param_finalize
};

diff --git a/gi/repo.cpp b/gi/repo.cpp
index 8c2e3e3..493ee04 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -211,13 +211,13 @@ struct JSClass gjs_repo_class = {
"GIRepository", /* means "new GIRepository()" works */
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE,
- JS_PropertyStub,
- JS_DeletePropertyStub,
- JS_PropertyStub,
- JS_StrictPropertyStub,
- JS_EnumerateStub,
+ NULL, /* addProperty */
+ NULL, /* deleteProperty */
+ NULL, /* getProperty */
+ NULL, /* setProperty */
+ NULL, /* enumerate */
(JSResolveOp) repo_new_resolve, /* needs cast since it's the new resolve
signature */
- JS_ConvertStub,
+ NULL, /* convert */
repo_finalize
};

diff --git a/gi/union.cpp b/gi/union.cpp
index 38a1405..72b2251 100644
--- a/gi/union.cpp
+++ b/gi/union.cpp
@@ -289,13 +289,13 @@ struct JSClass gjs_union_class = {
"GObject_Union",
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE,
- JS_PropertyStub,
- JS_DeletePropertyStub,
- JS_PropertyStub,
- JS_StrictPropertyStub,
- JS_EnumerateStub,
+ NULL, /* addProperty */
+ NULL, /* deleteProperty */
+ NULL, /* getProperty */
+ NULL, /* setProperty */
+ NULL, /* enumerate */
(JSResolveOp) union_new_resolve, /* needs cast since it's the new resolve
signature */
- JS_ConvertStub,
+ NULL, /* convert */
union_finalize
};

diff --git a/gjs/byteArray.cpp b/gjs/byteArray.cpp
index 34b3ade..b3e5444 100644
--- a/gjs/byteArray.cpp
+++ b/gjs/byteArray.cpp
@@ -57,13 +57,13 @@ struct JSClass gjs_byte_array_class = {
"ByteArray",
JSCLASS_HAS_PRIVATE |
JSCLASS_BACKGROUND_FINALIZE,
- JS_PropertyStub,
- JS_DeletePropertyStub,
+ NULL, /* addProperty */
+ NULL, /* deleteProperty */
(JSPropertyOp)byte_array_get_prop,
(JSStrictPropertyOp)byte_array_set_prop,
- JS_EnumerateStub,
- JS_ResolveStub,
- JS_ConvertStub,
+ NULL, /* enumerate */
+ NULL, /* resolve */
+ NULL, /* convert */
byte_array_finalize
};

diff --git a/gjs/coverage.cpp b/gjs/coverage.cpp
index b37e97f..7727b71 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -1261,13 +1261,13 @@ 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, /* addProperty */
+ NULL, /* deleteProperty */
+ NULL, /* getProperty */
+ NULL, /* setProperty */
+ NULL, /* enumerate */
+ NULL, /* resolve */
+ NULL, /* convert */
NULL, /* finalize */
NULL, /* call */
NULL, /* hasInstance */
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index d8f9edb..f8ca6b0 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -932,13 +932,13 @@ struct JSClass gjs_importer_class = {
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE |
JSCLASS_NEW_ENUMERATE,
- JS_PropertyStub,
- JS_DeletePropertyStub,
- JS_PropertyStub,
- JS_StrictPropertyStub,
+ NULL, /* addProperty */
+ NULL, /* deleteProperty */
+ NULL, /* getProperty */
+ NULL, /* setProperty */
(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,
+ NULL, /* convert */
importer_finalize
};

diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index 6c92b91..114a72b 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -47,13 +47,13 @@ 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, /* addProperty */
+ NULL, /* deleteProperty */
+ NULL, /* getProperty */
+ NULL, /* setProperty */
+ NULL, /* enumerate */
+ NULL, /* resolve */
+ NULL, /* convert */
NULL, /* finalize */
NULL, /* call */
NULL, /* hasInstance */
diff --git a/gjs/jsapi-util.h b/gjs/jsapi-util.h
index 8789c3b..760b174 100644
--- a/gjs/jsapi-util.h
+++ b/gjs/jsapi-util.h
@@ -186,13 +186,13 @@ static struct JSClass gjs_##cname##_class = { \
type_name, \
JSCLASS_HAS_PRIVATE | \
JSCLASS_NEW_RESOLVE | jsclass_flags, \
- JS_PropertyStub, \
- JS_DeletePropertyStub, \
- JS_PropertyStub, \
- JS_StrictPropertyStub, \
- JS_EnumerateStub,\
+ NULL, /* addProperty */
\
+ NULL, /* deleteProperty */
\
+ NULL, /* getProperty */
\
+ NULL, /* setProperty */
\
+ NULL, /* enumerate */
\
(JSResolveOp) gjs_##cname##_new_resolve, \
- JS_ConvertStub, \
+ NULL, /* convert */
\
gjs_##cname##_finalize
\
}; \
JS::Value
\
_______________________________________________
commits-list mailing list (read only)
https://mail.gnome.org/mailman/listinfo/commits-list

Want to limit the commits to a few modules? Go to above URL, log in to edit
your options and select the modules ('topics') you want.



Programming list archiving by: Enterprise Git Hosting