[gjs: 1/2] wrapperutils: Define $gtype property as non-enumerable



commit a8c0217b4f0703a064a27b6337173b7d66e8968a
Author: Philip Chimento <philip chimento gmail com>
Date:   Thu Feb 14 23:02:43 2019 -0800

    wrapperutils: Define $gtype property as non-enumerable
    
    When factoring out this function, the property flags should not have
    included JSPROP_ENUMERABLE (in GJS_MODULE_PROP_FLAGS, intended for API
    but not data.)

 gi/wrapperutils.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gi/wrapperutils.cpp b/gi/wrapperutils.cpp
index caa441e9..1b79f1c0 100644
--- a/gi/wrapperutils.cpp
+++ b/gi/wrapperutils.cpp
@@ -93,7 +93,7 @@ bool gjs_wrapper_define_gtype_prop(JSContext* cx, JS::HandleObject constructor,
 
     const GjsAtoms& atoms = GjsContextPrivate::atoms(cx);
     return JS_DefinePropertyById(cx, constructor, atoms.gtype(), gtype_obj,
-                                 GJS_MODULE_PROP_FLAGS);
+                                 JSPROP_PERMANENT);
 }
 
 // These policies work around having separate g_foo_info_get_n_methods() and


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