[gjs/wip/ptomato/mozjs31prep: 8/8] js: Don't pass JSPROP_READONLY to JS_PSG



commit 7fd3971fcd702836e3ca2723df3c484385c67bd6
Author: Philip Chimento <philip endlessm com>
Date:   Thu Nov 3 18:39:16 2016 -0700

    js: Don't pass JSPROP_READONLY to JS_PSG
    
    This is redundant, since you already can't set a property that doesn't
    have a setter. It will be illegal and caught at compile time in mozjs31.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742249

 gi/function.cpp |    2 +-
 gi/gerror.cpp   |    6 +++---
 gi/gtype.cpp    |    2 +-
 gi/ns.cpp       |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gi/function.cpp b/gi/function.cpp
index fccd5e7..9cca448 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -1484,7 +1484,7 @@ struct JSClass gjs_function_class = {
 };
 
 JSPropertySpec gjs_function_proto_props[] = {
-    JS_PSG("length", get_num_arguments, JSPROP_READONLY | JSPROP_PERMANENT),
+    JS_PSG("length", get_num_arguments, JSPROP_PERMANENT),
     JS_PS_END
 };
 
diff --git a/gi/gerror.cpp b/gi/gerror.cpp
index 70ea7c1..a70466b 100644
--- a/gi/gerror.cpp
+++ b/gi/gerror.cpp
@@ -292,9 +292,9 @@ struct JSClass gjs_error_class = {
 /* We need to shadow all fields of GError, to prevent calling the getter from GBoxed
    (which would trash memory accessing the instance private data) */
 JSPropertySpec gjs_error_proto_props[] = {
-    JS_PSG("domain", error_get_domain, GJS_MODULE_PROP_FLAGS | JSPROP_READONLY),
-    JS_PSG("code", error_get_code, GJS_MODULE_PROP_FLAGS | JSPROP_READONLY),
-    JS_PSG("message", error_get_message, GJS_MODULE_PROP_FLAGS | JSPROP_READONLY),
+    JS_PSG("domain", error_get_domain, GJS_MODULE_PROP_FLAGS),
+    JS_PSG("code", error_get_code, GJS_MODULE_PROP_FLAGS),
+    JS_PSG("message", error_get_message, GJS_MODULE_PROP_FLAGS),
     JS_PS_END
 };
 
diff --git a/gi/gtype.cpp b/gi/gtype.cpp
index 9421fcd..bc2eadb 100644
--- a/gi/gtype.cpp
+++ b/gi/gtype.cpp
@@ -106,7 +106,7 @@ get_name_func (JSContext *context,
 
 /* Properties */
 JSPropertySpec gjs_gtype_proto_props[] = {
-    JS_PSG("name", get_name_func, JSPROP_READONLY | JSPROP_PERMANENT),
+    JS_PSG("name", get_name_func, JSPROP_PERMANENT),
     JS_PS_END,
 };
 
diff --git a/gi/ns.cpp b/gi/ns.cpp
index 293dea6..c727aab 100644
--- a/gi/ns.cpp
+++ b/gi/ns.cpp
@@ -180,7 +180,7 @@ struct JSClass gjs_ns_class = {
 };
 
 JSPropertySpec gjs_ns_proto_props[] = {
-    JS_PSG("__name__", get_name, GJS_MODULE_PROP_FLAGS | JSPROP_READONLY),
+    JS_PSG("__name__", get_name, GJS_MODULE_PROP_FLAGS),
     JS_PS_END
 };
 


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