Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp (197883 => 197884)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp 2016-03-09 21:44:00 UTC (rev 197883)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp 2016-03-09 21:48:19 UTC (rev 197884)
@@ -65,6 +65,20 @@
typedef JSDOMConstructorNotConstructable<JSattribute> JSattributeConstructor;
+/* Hash table */
+
+static const struct CompactHashIndex JSattributeTableIndex[2] = {
+ { 0, -1 },
+ { -1, -1 },
+};
+
+
+static const HashTableValue JSattributeTableValues[] =
+{
+ { "readonly", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsattributeReadonly), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
+};
+
+static const HashTable JSattributeTable = { 1, 1, true, JSattributeTableValues, JSattributeTableIndex };
template<> JSValue JSattributeConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
{
UNUSED_PARAM(vm);
@@ -85,7 +99,6 @@
static const HashTableValue JSattributePrototypeTableValues[] =
{
{ "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsattributeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSattributeConstructor) } },
- { "readonly", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsattributeReadonly), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
};
const ClassInfo JSattributePrototype::s_info = { "attributePrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSattributePrototype) };
@@ -96,7 +109,7 @@
reifyStaticProperties(vm, JSattributePrototypeTableValues, *this);
}
-const ClassInfo JSattribute::s_info = { "attribute", &Base::s_info, 0, CREATE_METHOD_TABLE(JSattribute) };
+const ClassInfo JSattribute::s_info = { "attribute", &Base::s_info, &JSattributeTable, CREATE_METHOD_TABLE(JSattribute) };
JSattribute::JSattribute(Structure* structure, JSDOMGlobalObject& globalObject, Ref<attribute>&& impl)
: JSDOMWrapper<attribute>(structure, globalObject, WTFMove(impl))
@@ -119,6 +132,15 @@
thisObject->JSattribute::~JSattribute();
}
+bool JSattribute::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
+{
+ auto* thisObject = jsCast<JSattribute*>(object);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+ if (getStaticValueSlot<JSattribute, Base>(state, JSattributeTable, thisObject, propertyName, slot))
+ return true;
+ return false;
+}
+
EncodedJSValue jsattributeReadonly(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(state);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h (197883 => 197884)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h 2016-03-09 21:44:00 UTC (rev 197883)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h 2016-03-09 21:48:19 UTC (rev 197884)
@@ -38,11 +38,12 @@
return ptr;
}
- static const bool hasStaticPropertyTable = false;
+ static const bool hasStaticPropertyTable = true;
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
static attribute* toWrapped(JSC::JSValue);
+ static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
DECLARE_INFO;
@@ -53,6 +54,8 @@
}
static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
+public:
+ static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
protected:
JSattribute(JSC::Structure*, JSDOMGlobalObject&, Ref<attribute>&&);