[gjs] js: Remove JSCLASS_NEW_RESOLVE where not used



commit 42ffb1560f999ee239f33f9e2c35914927424c93
Author: Philip Chimento <philip chimento gmail com>
Date:   Wed Jan 11 23:31:43 2017 -0800

    js: Remove JSCLASS_NEW_RESOLVE where not used
    
    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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776966

 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 6ae2207..c069a19 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 |
     JSCLASS_IMPLEMENTS_BARRIERS,
     JS_PropertyStub,
diff --git a/gjs/jsapi-util.h b/gjs/jsapi-util.h
index 8789c3b..78cc4a9 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,                                       \
     JS_PropertyStub, \
     JS_DeletePropertyStub, \
     JS_PropertyStub, \
     JS_StrictPropertyStub, \
     JS_EnumerateStub,\
-    (JSResolveOp) gjs_##cname##_new_resolve, \
+    JS_ResolveStub,                                                            \
     JS_ConvertStub, \
     gjs_##cname##_finalize                                                     \
 }; \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]