X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/ba379fdc102753d6be2c4d937058fe40257329fe..f9bf01c6616d5ddcf65b13b33cedf9e387ff7a63:/API/JSCallbackObject.h diff --git a/API/JSCallbackObject.h b/API/JSCallbackObject.h index 9d22ad9..adb5b60 100644 --- a/API/JSCallbackObject.h +++ b/API/JSCallbackObject.h @@ -36,7 +36,7 @@ namespace JSC { template class JSCallbackObject : public Base { public: - JSCallbackObject(ExecState*, PassRefPtr, JSClassRef, void* data); + JSCallbackObject(ExecState*, NonNullPassRefPtr, JSClassRef, void* data); JSCallbackObject(JSClassRef); virtual ~JSCallbackObject(); @@ -50,14 +50,18 @@ public: static PassRefPtr createStructure(JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance | OverridesHasInstance)); + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), Base::AnonymousSlotCount); } +protected: + static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesHasInstance | OverridesMarkChildren | OverridesGetPropertyNames | Base::StructureFlags; + private: virtual UString className() const; virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual bool getOwnPropertySlot(ExecState*, unsigned, PropertySlot&); + virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&); @@ -66,7 +70,7 @@ private: virtual bool hasInstance(ExecState* exec, JSValue value, JSValue proto); - virtual void getPropertyNames(ExecState*, PropertyNameArray&); + virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties); virtual double toNumber(ExecState*) const; virtual UString toString(ExecState*) const;