From 32a5ba085c1e76df81699de9b2f6661deaf2a974 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Wed, 4 Jun 2014 15:12:25 -0700 Subject: [PATCH] Bug 987111 - Introduce a method to determine whether a given PropertyDescriptor is an accessor prop. r=terrence --- js/src/jsapi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/js/src/jsapi.h b/js/src/jsapi.h index fb06d280066..39e10989a57 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -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; }