Fix a typo in CGDOMJSProxyHandler_getOwnPropertyDescriptor

Named properties are read-only if there is no named setter.
This commit is contained in:
Anthony Ramine 2016-02-23 17:23:03 +01:00
parent b783d96749
commit cbf514d63f

View file

@ -4341,7 +4341,7 @@ class CGDOMJSProxyHandler_getOwnPropertyDescriptor(CGAbstractExternMethod):
namedGetter = self.descriptor.operations['NamedGetter']
if namedGetter:
attrs = "JSPROP_ENUMERATE"
if self.descriptor.operations['IndexedSetter'] is None:
if self.descriptor.operations['NamedSetter'] is None:
attrs += " | JSPROP_READONLY"
fillDescriptor = ("desc.get().value = result_root.ptr;\n"
"fill_property_descriptor(&mut *desc.ptr, *proxy.ptr, %s);\n"