[gjs/wip/ptomato/mozjs38: 11/22] js: Discontinue JSClass stubs
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/mozjs38: 11/22] js: Discontinue JSClass stubs
- Date: Mon, 30 Jan 2017 06:47:19 +0000 (UTC)
commit 9ebdc4736bedc97a82074396b15cc2b2653c1624
Author: Philip Chimento <philip chimento gmail com>
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/keep-alive.cpp | 14 +++++++-------
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 | 14 +++++++-------
test/gjs-test-rooting.cpp | 14 +++++++-------
17 files changed, 105 insertions(+), 105 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index 51150e1..280f396 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -919,13 +919,13 @@ struct JSClass gjs_boxed_class = {
JSCLASS_NEW_RESOLVE |
JSCLASS_HAS_RESERVED_SLOTS(1) |
JSCLASS_IMPLEMENTS_BARRIERS,
- 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 0cbbb3d..9b97700 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -1469,13 +1469,13 @@ struct JSClass gjs_function_class = {
JSCLASS_HAS_PRIVATE |
JSCLASS_BACKGROUND_FINALIZE |
JSCLASS_IMPLEMENTS_BARRIERS,
- 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 23099df..04b1ace 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 6b19e2f..2902f0e 100644
--- a/gi/gerror.cpp
+++ b/gi/gerror.cpp
@@ -273,13 +273,13 @@ struct JSClass gjs_error_class = {
JSCLASS_HAS_PRIVATE |
JSCLASS_BACKGROUND_FINALIZE |
JSCLASS_IMPLEMENTS_BARRIERS,
- 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 3206013..e72b474 100644
--- a/gi/interface.cpp
+++ b/gi/interface.cpp
@@ -161,13 +161,13 @@ struct JSClass gjs_interface_class = {
JSCLASS_NEW_RESOLVE |
JSCLASS_BACKGROUND_FINALIZE |
JSCLASS_IMPLEMENTS_BARRIERS,
- 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/keep-alive.cpp b/gi/keep-alive.cpp
index 258cf58..889930e 100644
--- a/gi/keep-alive.cpp
+++ b/gi/keep-alive.cpp
@@ -166,13 +166,13 @@ struct JSClass gjs_keep_alive_class = {
"__private_GjsKeepAlive", /* means "new __private_GjsKeepAlive()" works */
JSCLASS_HAS_PRIVATE |
JSCLASS_IMPLEMENTS_BARRIERS,
- 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 */
keep_alive_finalize,
NULL,
NULL,
diff --git a/gi/ns.cpp b/gi/ns.cpp
index 6af1138..f22f631 100644
--- a/gi/ns.cpp
+++ b/gi/ns.cpp
@@ -160,13 +160,13 @@ struct JSClass gjs_ns_class = {
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE |
JSCLASS_IMPLEMENTS_BARRIERS,
- 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 1682f72..dbe3510 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1906,13 +1906,13 @@ struct JSClass gjs_object_instance_class = {
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE |
JSCLASS_IMPLEMENTS_BARRIERS,
- 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 3e6db92..bd44b81 100644
--- a/gi/param.cpp
+++ b/gi/param.cpp
@@ -148,13 +148,13 @@ struct JSClass gjs_param_class = {
JSCLASS_NEW_RESOLVE |
JSCLASS_BACKGROUND_FINALIZE |
JSCLASS_IMPLEMENTS_BARRIERS,
- 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 133ac07..a29265e 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -212,13 +212,13 @@ struct JSClass gjs_repo_class = {
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE |
JSCLASS_IMPLEMENTS_BARRIERS,
- 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 2fc16c0..265d8c4 100644
--- a/gi/union.cpp
+++ b/gi/union.cpp
@@ -290,13 +290,13 @@ struct JSClass gjs_union_class = {
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE |
JSCLASS_IMPLEMENTS_BARRIERS,
- 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 f416ffc..2809abd 100644
--- a/gjs/byteArray.cpp
+++ b/gjs/byteArray.cpp
@@ -58,13 +58,13 @@ struct JSClass gjs_byte_array_class = {
JSCLASS_HAS_PRIVATE |
JSCLASS_BACKGROUND_FINALIZE |
JSCLASS_IMPLEMENTS_BARRIERS,
- 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 cee87ba..d8a6ae7 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -1262,13 +1262,13 @@ static JSClass coverage_global_class = {
"GjsCoverageGlobal",
JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(GJS_GLOBAL_SLOT_LAST) |
JSCLASS_IMPLEMENTS_BARRIERS,
- 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 f4630cd..e4b7f3a 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -950,13 +950,13 @@ struct JSClass gjs_importer_class = {
JSCLASS_NEW_RESOLVE |
JSCLASS_NEW_ENUMERATE |
JSCLASS_IMPLEMENTS_BARRIERS,
- 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 0bfc1f1..22e301c 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -48,13 +48,13 @@ static JSClass global_class = {
"GjsGlobal",
JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(GJS_GLOBAL_SLOT_LAST) |
JSCLASS_IMPLEMENTS_BARRIERS,
- 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 3afcf02..4445521 100644
--- a/gjs/jsapi-util.h
+++ b/gjs/jsapi-util.h
@@ -178,13 +178,13 @@ static void gjs_##cname##_finalize(JSFreeOp *fop, JSObject *obj); \
static struct JSClass gjs_##cname##_class = { \
type_name, \
JSCLASS_HAS_PRIVATE | jsclass_flags, \
- 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 */ \
gjs_##cname##_finalize \
}; \
JS::Value \
diff --git a/test/gjs-test-rooting.cpp b/test/gjs-test-rooting.cpp
index dfec684..b44cdec 100644
--- a/test/gjs-test-rooting.cpp
+++ b/test/gjs-test-rooting.cpp
@@ -27,13 +27,13 @@ test_obj_finalize(JSFreeOp *fop,
static JSClass test_obj_class = {
"TestObj",
JSCLASS_HAS_PRIVATE,
- 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 */
test_obj_finalize
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]