Bug 987111 - Introduce a method to determine whether a given PropertyDescriptor is an accessor prop. r=terrence

This commit is contained in:
Bobby Holley 2014-06-04 15:12:25 -07:00
parent 67b3be8d7e
commit 32a5ba085c

View File

@ -2895,6 +2895,7 @@ class PropertyDescriptorOperations
bool hasGetterObject() const { return desc()->attrs & JSPROP_GETTER; }
bool hasSetterObject() const { return desc()->attrs & JSPROP_SETTER; }
bool hasGetterOrSetterObject() const { return desc()->attrs & (JSPROP_GETTER | JSPROP_SETTER); }
bool hasGetterOrSetter() const { return desc()->getter || desc()->setter; }
bool isShared() const { return desc()->attrs & JSPROP_SHARED; }
bool isIndex() const { return desc()->attrs & JSPROP_INDEX; }
bool hasAttributes(unsigned attrs) const { return desc()->attrs & attrs; }