Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (239315 => 239316)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2018-12-18 04:09:50 UTC (rev 239315)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2018-12-18 04:17:58 UTC (rev 239316)
@@ -1737,6 +1737,9 @@
#endif
JSC::EncodedJSValue jsTestObjCachedAttribute1(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjCachedAttribute2(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+#if ENABLE(CONDITION)
+JSC::EncodedJSValue jsTestObjCachedAttribute3(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+#endif
JSC::EncodedJSValue jsTestObjAnyAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSTestObjAnyAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjObjectAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
@@ -2072,6 +2075,11 @@
#endif
{ "cachedAttribute1", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCachedAttribute1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "cachedAttribute2", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCachedAttribute2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
+#if ENABLE(CONDITION)
+ { "cachedAttribute3", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCachedAttribute3), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
+#else
+ { 0, 0, NoIntrinsic, { 0, 0 } },
+#endif
{ "anyAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAnyAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAnyAttribute) } },
{ "objectAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjObjectAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjObjectAttribute) } },
{ "contentDocument", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjContentDocument), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
@@ -4543,6 +4551,26 @@
return IDLAttribute<JSTestObj>::get<jsTestObjCachedAttribute2Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "cachedAttribute2");
}
+#if ENABLE(CONDITION)
+static inline JSValue jsTestObjCachedAttribute3Getter(ExecState& state, JSTestObj& thisObject, ThrowScope& throwScope)
+{
+ UNUSED_PARAM(throwScope);
+ UNUSED_PARAM(state);
+ if (JSValue cachedValue = thisObject.m_cachedAttribute3.get())
+ return cachedValue;
+ auto& impl = thisObject.wrapped();
+ JSValue result = toJS<IDLAny>(state, throwScope, impl.cachedAttribute3());
+ thisObject.m_cachedAttribute3.set(state.vm(), &thisObject, result);
+ return result;
+}
+
+EncodedJSValue jsTestObjCachedAttribute3(ExecState* state, EncodedJSValue thisValue, PropertyName)
+{
+ return IDLAttribute<JSTestObj>::get<jsTestObjCachedAttribute3Getter, CastedThisErrorBehavior::Assert>(*state, thisValue, "cachedAttribute3");
+}
+
+#endif
+
static inline JSValue jsTestObjAnyAttributeGetter(ExecState& state, JSTestObj& thisObject, ThrowScope& throwScope)
{
UNUSED_PARAM(throwScope);
@@ -8494,6 +8522,9 @@
Base::visitChildren(thisObject, visitor);
visitor.append(thisObject->m_cachedAttribute1);
visitor.append(thisObject->m_cachedAttribute2);
+#if ENABLE(CONDITION)
+ visitor.append(thisObject->m_cachedAttribute3);
+#endif
}
void JSTestObj::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder)
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h (239315 => 239316)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h 2018-12-18 04:09:50 UTC (rev 239315)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h 2018-12-18 04:17:58 UTC (rev 239316)
@@ -60,6 +60,9 @@
static JSC::JSObject* serialize(JSC::ExecState&, JSTestObj& thisObject, JSDOMGlobalObject&, JSC::ThrowScope&);
mutable JSC::WriteBarrier<JSC::Unknown> m_cachedAttribute1;
mutable JSC::WriteBarrier<JSC::Unknown> m_cachedAttribute2;
+#if ENABLE(CONDITION)
+ mutable JSC::WriteBarrier<JSC::Unknown> m_cachedAttribute3;
+#endif
static void visitChildren(JSCell*, JSC::SlotVisitor&);
static void heapSnapshot(JSCell*, JSC::HeapSnapshotBuilder&);