Modified: branches/safari-612.2.9.0-branch/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (283423 => 283424)
--- branches/safari-612.2.9.0-branch/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2021-10-01 23:48:33 UTC (rev 283423)
+++ branches/safari-612.2.9.0-branch/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2021-10-01 23:48:39 UTC (rev 283424)
@@ -2055,7 +2055,7 @@
push(@specials, "JSC::PropertyAttribute::DontEnum") if ($attribute->extendedAttributes->{NotEnumerable} || $isGlobalConstructor);
push(@specials, "JSC::PropertyAttribute::ReadOnly") if IsReadonly($attribute);
push(@specials, "JSC::PropertyAttribute::CustomAccessor") unless $isGlobalConstructor or IsJSBuiltin($interface, $attribute);
- push(@specials, "JSC::PropertyAttribute::DOMLegacyAccessor") if $attribute->extendedAttributes->{LegacyActiveWindowForAccessor};
+ push(@specials, "JSC::PropertyAttribute::DOMLegacyAccessor") if $codeGenerator->ExtendedAttributeContains($attribute->extendedAttributes->{SetterCallWith}, "LegacyActiveWindowForAccessor");
push(@specials, "JSC::PropertyAttribute::DOMAttribute") if IsAcceleratedDOMAttribute($interface, $attribute);
push(@specials, "JSC::PropertyAttribute::DOMJITAttribute") if $attribute->extendedAttributes->{DOMJIT};
push(@specials, "JSC::PropertyAttribute::Accessor | JSC::PropertyAttribute::Builtin") if IsJSBuiltin($interface, $attribute);
Modified: branches/safari-612.2.9.0-branch/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (283423 => 283424)
--- branches/safari-612.2.9.0-branch/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2021-10-01 23:48:33 UTC (rev 283423)
+++ branches/safari-612.2.9.0-branch/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2021-10-01 23:48:39 UTC (rev 283424)
@@ -1847,6 +1847,8 @@
static JSC_DECLARE_CUSTOM_SETTER(setJSTestObj_double_leading_underscore_attribute);
static JSC_DECLARE_CUSTOM_GETTER(jsTestObj_trailing_underscore_attribute_);
static JSC_DECLARE_CUSTOM_SETTER(setJSTestObj_trailing_underscore_attribute_);
+static JSC_DECLARE_CUSTOM_GETTER(jsTestObj_href);
+static JSC_DECLARE_CUSTOM_SETTER(setJSTestObj_href);
class JSTestObjPrototype final : public JSC::JSNonFinalObject {
public:
@@ -2181,6 +2183,7 @@
{ "leading_underscore_attribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObj_leading_underscore_attribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObj_leading_underscore_attribute) } },
{ "_double_leading_underscore_attribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObj_double_leading_underscore_attribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObj_double_leading_underscore_attribute) } },
{ "trailing_underscore_attribute_", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObj_trailing_underscore_attribute_), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObj_trailing_underscore_attribute_) } },
+ { "href", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMLegacyAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObj_href), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObj_href) } },
#if ENABLE(TEST_FEATURE)
{ "enabledAtRuntimeOperation", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunction_enabledAtRuntimeOperation), (intptr_t) (1) } },
#else
@@ -5326,6 +5329,37 @@
return IDLAttribute<JSTestObj>::set<setJSTestObj_trailing_underscore_attribute_Setter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName);
}
+static inline JSValue jsTestObj_hrefGetter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject)
+{
+ auto& vm = JSC::getVM(&lexicalGlobalObject);
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
+ auto& impl = thisObject.wrapped();
+ RELEASE_AND_RETURN(throwScope, (toJS<IDLUSVString>(lexicalGlobalObject, throwScope, impl.href())));
+}
+
+JSC_DEFINE_CUSTOM_GETTER(jsTestObj_href, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName attributeName))
+{
+ return IDLAttribute<JSTestObj>::get<jsTestObj_hrefGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName);
+}
+
+static inline bool setJSTestObj_hrefSetter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject, JSValue value)
+{
+ auto& vm = JSC::getVM(&lexicalGlobalObject);
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
+ auto& impl = thisObject.wrapped();
+ auto nativeValue = convert<IDLUSVString>(lexicalGlobalObject, value);
+ RETURN_IF_EXCEPTION(throwScope, false);
+ invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] {
+ return impl.setHref(legacyActiveDOMWindowForAccessor(*jsCast<JSDOMGlobalObject*>(&lexicalGlobalObject)), firstDOMWindow(*jsCast<JSDOMGlobalObject*>(&lexicalGlobalObject)), WTFMove(nativeValue));
+ });
+ return true;
+}
+
+JSC_DEFINE_CUSTOM_SETTER(setJSTestObj_href, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName))
+{
+ return IDLAttribute<JSTestObj>::set<setJSTestObj_hrefSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName);
+}
+
#if ENABLE(TEST_FEATURE)
static inline JSC::EncodedJSValue jsTestObjPrototypeFunction_enabledAtRuntimeOperation1Body(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
{