$OpenBSD$ index 9d4cb06..673e567 100644 --- dom/bindings/DOMJSProxyHandler.h.orig Fri Feb 20 15:40:37 2015 +++ dom/bindings/DOMJSProxyHandler.h Fri Feb 20 15:40:37 2015 @@ -51,6 +51,9 @@ public: bool getPropertyDescriptor(JSContext* cx, JS::Handle proxy, JS::Handle id, JS::MutableHandle desc) MOZ_OVERRIDE; + bool getOwnPropertyDescriptor(JSContext* cx, JS::Handle proxy, + JS::Handle id, + JS::MutableHandle desc) MOZ_OVERRIDE; bool watch(JSContext* cx, JS::Handle proxy, JS::Handle id, JS::Handle callable) MOZ_OVERRIDE; @@ -72,6 +75,16 @@ protected: virtual bool ownPropNames(JSContext* cx, JS::Handle proxy, unsigned flags, JS::AutoIdVector& props) = 0; + + // Hook for subclasses to allow set() to ignore named props while other things + // that look at property descriptors see them. This is intentionally not + // named getOwnPropertyDescriptor to avoid subclasses that override it hiding + // our public getOwnPropertyDescriptor. + virtual bool getOwnPropDescriptor(JSContext* cx, + JS::Handle proxy, + JS::Handle id, + bool ignoreNamedProps, + JS::MutableHandle desc) = 0; }; class DOMProxyHandler : public BaseDOMProxyHandler