Subject: [gjs/wip/ptomato/mozjs38: 12/17] WIP - js: Remove
JSCLASS_NEW_RESOLVE where not used



commit 95824a6851ec69e70b6f1964ec94ea4c095ce21a
Author: Philip Chimento <philip.chimento@xxxxxxxxx>
Date: Wed Jan 11 23:31:43 2017 -0800

WIP - js: Remove JSCLASS_NEW_RESOLVE where not used

Can be cherry picked to master??

Classes that don't have a resolve callback, or have one but don't need
it, can lose the JSCLASS_NEW_RESOLVE flag as well. This flag is going
away in SpiderMonkey 38.

gi/gerror.cpp | 1 -
gjs/jsapi-util.h | 12 ++----------
2 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/gi/gerror.cpp b/gi/gerror.cpp
index 3d5ac43..d8ec0f3 100644
--- a/gi/gerror.cpp
+++ b/gi/gerror.cpp
@@ -276,7 +276,6 @@ error_constructor_value_of(JSContext *context,
struct JSClass gjs_error_class = {
"GLib_Error",
JSCLASS_HAS_PRIVATE |
- JSCLASS_NEW_RESOLVE |
JSCLASS_BACKGROUND_FINALIZE,
NULL, /* addProperty */
NULL, /* deleteProperty *...

/
diff --git a/gjs/jsapi-util.h b/gjs/jsapi-util.h
index 760b174..0cb00dd 100644
--- a/gjs/jsapi-util.h
+++ b/gjs/jsapi-util.h
@@ -175,23 +175,15 @@ _GJS_DEFINE_PROTO_FULL(tn, cn, NULL, gtype, flags)
extern JSPropertySpec gjs_##cname##_proto_props[]; \
extern JSFunctionSpec gjs_##cname##_proto_funcs[]; \
static void gjs_##cname##_finalize(JSFreeOp *fop, JSObject *obj); \
-static bool gjs_##cname##_new_resolve(JSContext *context, \
- JSObject *obj, \
- JS::Value id, \
- JSObject **objp) \
-...

{ \
- return true; \
-} \
static struct JSClass gjs_##cname##_class = { \
type_name, \
- JSCLASS_HAS_PRIVATE | \
- JSCLASS_NEW_RESOLVE | jsclass_flags, \
+ JSCLASS_HAS_PRIVATE | jsclass_flags,
\
NULL, /* addProperty */
\
NULL, /* deleteProperty */
\
NULL, /* getProperty */
\
NULL, /* setProperty */
\
NULL, /* enumerate */
\
- (JSResolveOp) gjs_##cname##_new_resolve, \
+ NULL, /* resolve */
\
NULL, /* convert */
\
gjs_##cname##_finalize
\
}; \
_______________________________________________
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