| /* |
| This file is part of the WebKit open source project. |
| This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
| |
| This library is free software; you can redistribute it and/or |
| modify it under the terms of the GNU Library General Public |
| License as published by the Free Software Foundation; either |
| version 2 of the License, or (at your option) any later version. |
| |
| This library is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| Library General Public License for more details. |
| |
| You should have received a copy of the GNU Library General Public License |
| along with this library; see the file COPYING.LIB. If not, write to |
| the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| Boston, MA 02110-1301, USA. |
| */ |
| |
| #include "config.h" |
| #include "JSTestDefaultToJSON.h" |
| |
| #include "ActiveDOMObject.h" |
| #include "DOMIsoSubspaces.h" |
| #include "EventNames.h" |
| #include "JSDOMAttribute.h" |
| #include "JSDOMBinding.h" |
| #include "JSDOMConstructorNotConstructable.h" |
| #include "JSDOMConvertBoolean.h" |
| #include "JSDOMConvertInterface.h" |
| #include "JSDOMConvertNullable.h" |
| #include "JSDOMConvertNumbers.h" |
| #include "JSDOMConvertRecord.h" |
| #include "JSDOMConvertSequences.h" |
| #include "JSDOMConvertStrings.h" |
| #include "JSDOMExceptionHandling.h" |
| #include "JSDOMGlobalObject.h" |
| #include "JSDOMOperation.h" |
| #include "JSDOMWrapperCache.h" |
| #include "JSEventListener.h" |
| #include "JSTestDefaultToJSONIndirectInheritance.h" |
| #include "JSTestDefaultToJSONInheritFinal.h" |
| #include "JSTestException.h" |
| #include "RuntimeEnabledFeatures.h" |
| #include "ScriptExecutionContext.h" |
| #include "WebCoreJSClientData.h" |
| #include <JavaScriptCore/FunctionPrototype.h> |
| #include <JavaScriptCore/HeapAnalyzer.h> |
| #include <JavaScriptCore/JSArray.h> |
| #include <JavaScriptCore/JSCInlines.h> |
| #include <JavaScriptCore/JSDestructibleObjectHeapCellType.h> |
| #include <JavaScriptCore/ObjectConstructor.h> |
| #include <JavaScriptCore/SlotVisitorMacros.h> |
| #include <JavaScriptCore/SubspaceInlines.h> |
| #include <wtf/GetPtr.h> |
| #include <wtf/PointerPreparations.h> |
| #include <wtf/URL.h> |
| #include <wtf/Vector.h> |
| |
| #if ENABLE(TEST_CONDITIONAL) |
| #include "JSDOMConvertEnumeration.h" |
| #include "JSTestDefaultToJSONEnum.h" |
| #endif |
| |
| |
| namespace WebCore { |
| using namespace JSC; |
| |
| // Functions |
| |
| static JSC_DECLARE_HOST_FUNCTION(jsTestDefaultToJSONPrototypeFunction_toJSON); |
| |
| // Attributes |
| |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSONConstructor); |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_longAttribute); |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_enabledBySettingsAttribute); |
| #if ENABLE(TEST_CONDITIONAL) |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_enabledByConditionalAttribute); |
| #endif |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_eventHandlerAttribute); |
| static JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSON_eventHandlerAttribute); |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_firstStringAttribute); |
| static JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSON_firstStringAttribute); |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_secondLongAttribute); |
| static JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSON_secondLongAttribute); |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_thirdUnJSONableAttribute); |
| static JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSON_thirdUnJSONableAttribute); |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_fourthUnrestrictedDoubleAttribute); |
| static JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSON_fourthUnrestrictedDoubleAttribute); |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_fifthLongClampedAttribute); |
| static JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSON_fifthLongClampedAttribute); |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_sixthTypedefAttribute); |
| static JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSON_sixthTypedefAttribute); |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_seventhDirectlyToJSONableAttribute); |
| static JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSON_seventhDirectlyToJSONableAttribute); |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_eighthIndirectlyAttribute); |
| static JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSON_eighthIndirectlyAttribute); |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_ninthOptionalDirectlyToJSONableAttribute); |
| static JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSON_ninthOptionalDirectlyToJSONableAttribute); |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_tenthFrozenArrayAttribute); |
| static JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSON_tenthFrozenArrayAttribute); |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_eleventhSequenceAttribute); |
| static JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSON_eleventhSequenceAttribute); |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_twelfthInterfaceSequenceAttribute); |
| static JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSON_twelfthInterfaceSequenceAttribute); |
| static JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_thirteenthRecordAttribute); |
| static JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSON_thirteenthRecordAttribute); |
| |
| class JSTestDefaultToJSONPrototype final : public JSC::JSNonFinalObject { |
| public: |
| using Base = JSC::JSNonFinalObject; |
| static JSTestDefaultToJSONPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
| { |
| JSTestDefaultToJSONPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestDefaultToJSONPrototype>(vm.heap)) JSTestDefaultToJSONPrototype(vm, globalObject, structure); |
| ptr->finishCreation(vm); |
| return ptr; |
| } |
| |
| DECLARE_INFO; |
| template<typename CellType, JSC::SubspaceAccess> |
| static JSC::IsoSubspace* subspaceFor(JSC::VM& vm) |
| { |
| STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSTestDefaultToJSONPrototype, Base); |
| return &vm.plainObjectSpace; |
| } |
| static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
| { |
| return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
| } |
| |
| private: |
| JSTestDefaultToJSONPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
| : JSC::JSNonFinalObject(vm, structure) |
| { |
| } |
| |
| void finishCreation(JSC::VM&); |
| }; |
| STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSTestDefaultToJSONPrototype, JSTestDefaultToJSONPrototype::Base); |
| |
| using JSTestDefaultToJSONDOMConstructor = JSDOMConstructorNotConstructable<JSTestDefaultToJSON>; |
| |
| template<> JSValue JSTestDefaultToJSONDOMConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
| { |
| UNUSED_PARAM(vm); |
| return globalObject.functionPrototype(); |
| } |
| |
| template<> void JSTestDefaultToJSONDOMConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
| { |
| putDirect(vm, vm.propertyNames->prototype, JSTestDefaultToJSON::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| putDirect(vm, vm.propertyNames->name, jsNontrivialString(vm, "TestDefaultToJSON"_s), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| } |
| |
| template<> const ClassInfo JSTestDefaultToJSONDOMConstructor::s_info = { "TestDefaultToJSON", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSTestDefaultToJSONDOMConstructor) }; |
| |
| /* Hash table for prototype */ |
| |
| static const HashTableValue JSTestDefaultToJSONPrototypeTableValues[] = |
| { |
| { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "longAttribute", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_longAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "enabledBySettingsAttribute", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_enabledBySettingsAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| #if ENABLE(TEST_CONDITIONAL) |
| { "enabledByConditionalAttribute", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_enabledByConditionalAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| { "eventHandlerAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_eventHandlerAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSON_eventHandlerAttribute) } }, |
| { "firstStringAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_firstStringAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSON_firstStringAttribute) } }, |
| { "secondLongAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_secondLongAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSON_secondLongAttribute) } }, |
| { "thirdUnJSONableAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_thirdUnJSONableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSON_thirdUnJSONableAttribute) } }, |
| { "fourthUnrestrictedDoubleAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_fourthUnrestrictedDoubleAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSON_fourthUnrestrictedDoubleAttribute) } }, |
| { "fifthLongClampedAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_fifthLongClampedAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSON_fifthLongClampedAttribute) } }, |
| { "sixthTypedefAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_sixthTypedefAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSON_sixthTypedefAttribute) } }, |
| { "seventhDirectlyToJSONableAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_seventhDirectlyToJSONableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSON_seventhDirectlyToJSONableAttribute) } }, |
| { "eighthIndirectlyAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_eighthIndirectlyAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSON_eighthIndirectlyAttribute) } }, |
| { "ninthOptionalDirectlyToJSONableAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_ninthOptionalDirectlyToJSONableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSON_ninthOptionalDirectlyToJSONableAttribute) } }, |
| { "tenthFrozenArrayAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_tenthFrozenArrayAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSON_tenthFrozenArrayAttribute) } }, |
| { "eleventhSequenceAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_eleventhSequenceAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSON_eleventhSequenceAttribute) } }, |
| { "twelfthInterfaceSequenceAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_twelfthInterfaceSequenceAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSON_twelfthInterfaceSequenceAttribute) } }, |
| { "thirteenthRecordAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_thirteenthRecordAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSON_thirteenthRecordAttribute) } }, |
| { "toJSON", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestDefaultToJSONPrototypeFunction_toJSON), (intptr_t) (0) } }, |
| }; |
| |
| const ClassInfo JSTestDefaultToJSONPrototype::s_info = { "TestDefaultToJSON", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSTestDefaultToJSONPrototype) }; |
| |
| void JSTestDefaultToJSONPrototype::finishCreation(VM& vm) |
| { |
| Base::finishCreation(vm); |
| reifyStaticProperties(vm, JSTestDefaultToJSON::info(), JSTestDefaultToJSONPrototypeTableValues, *this); |
| bool hasDisabledRuntimeProperties = false; |
| if (!RuntimeEnabledFeatures::sharedFeatures().testRuntimeEnabledEnabled()) { |
| hasDisabledRuntimeProperties = true; |
| auto propertyName = Identifier::fromString(vm, reinterpret_cast<const LChar*>("longAttribute"), strlen("longAttribute")); |
| VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable); |
| DeletePropertySlot slot; |
| JSObject::deleteProperty(this, globalObject(), propertyName, slot); |
| } |
| if (!jsCast<JSDOMGlobalObject*>(globalObject())->scriptExecutionContext()->settingsValues().testSettingEnabled) { |
| hasDisabledRuntimeProperties = true; |
| auto propertyName = Identifier::fromString(vm, reinterpret_cast<const LChar*>("enabledBySettingsAttribute"), strlen("enabledBySettingsAttribute")); |
| VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable); |
| DeletePropertySlot slot; |
| JSObject::deleteProperty(this, globalObject(), propertyName, slot); |
| } |
| if (hasDisabledRuntimeProperties && structure()->isDictionary()) |
| flattenDictionaryObject(vm); |
| JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); |
| } |
| |
| const ClassInfo JSTestDefaultToJSON::s_info = { "TestDefaultToJSON", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSTestDefaultToJSON) }; |
| |
| JSTestDefaultToJSON::JSTestDefaultToJSON(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestDefaultToJSON>&& impl) |
| : JSDOMWrapper<TestDefaultToJSON>(structure, globalObject, WTFMove(impl)) |
| { |
| } |
| |
| void JSTestDefaultToJSON::finishCreation(VM& vm) |
| { |
| Base::finishCreation(vm); |
| ASSERT(inherits(vm, info())); |
| |
| static_assert(!std::is_base_of<ActiveDOMObject, TestDefaultToJSON>::value, "Interface is not marked as [ActiveDOMObject] even though implementation class subclasses ActiveDOMObject."); |
| |
| } |
| |
| JSObject* JSTestDefaultToJSON::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
| { |
| return JSTestDefaultToJSONPrototype::create(vm, &globalObject, JSTestDefaultToJSONPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); |
| } |
| |
| JSObject* JSTestDefaultToJSON::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
| { |
| return getDOMPrototype<JSTestDefaultToJSON>(vm, globalObject); |
| } |
| |
| JSValue JSTestDefaultToJSON::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
| { |
| return getDOMConstructor<JSTestDefaultToJSONDOMConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
| } |
| |
| void JSTestDefaultToJSON::destroy(JSC::JSCell* cell) |
| { |
| JSTestDefaultToJSON* thisObject = static_cast<JSTestDefaultToJSON*>(cell); |
| thisObject->JSTestDefaultToJSON::~JSTestDefaultToJSON(); |
| } |
| |
| template<> inline JSTestDefaultToJSON* IDLAttribute<JSTestDefaultToJSON>::cast(JSGlobalObject& lexicalGlobalObject, EncodedJSValue thisValue) |
| { |
| return jsDynamicCast<JSTestDefaultToJSON*>(JSC::getVM(&lexicalGlobalObject), JSValue::decode(thisValue)); |
| } |
| |
| template<> inline JSTestDefaultToJSON* IDLOperation<JSTestDefaultToJSON>::cast(JSGlobalObject& lexicalGlobalObject, CallFrame& callFrame) |
| { |
| return jsDynamicCast<JSTestDefaultToJSON*>(JSC::getVM(&lexicalGlobalObject), callFrame.thisValue()); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSONConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| VM& vm = JSC::getVM(lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto* prototype = jsDynamicCast<JSTestDefaultToJSONPrototype*>(vm, JSValue::decode(thisValue)); |
| if (UNLIKELY(!prototype)) |
| return throwVMTypeError(lexicalGlobalObject, throwScope); |
| return JSValue::encode(JSTestDefaultToJSON::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); |
| } |
| |
| static inline JSValue jsTestDefaultToJSON_longAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLLong>(lexicalGlobalObject, throwScope, impl.longAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_longAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_longAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "longAttribute"); |
| } |
| |
| static inline JSValue jsTestDefaultToJSON_enabledBySettingsAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLUnsignedShort>(lexicalGlobalObject, throwScope, impl.enabledBySettingsAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_enabledBySettingsAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_enabledBySettingsAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "enabledBySettingsAttribute"); |
| } |
| |
| #if ENABLE(TEST_CONDITIONAL) |
| static inline JSValue jsTestDefaultToJSON_enabledByConditionalAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLEnumeration<TestDefaultToJSONEnum>>(lexicalGlobalObject, throwScope, impl.enabledByConditionalAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_enabledByConditionalAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_enabledByConditionalAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "enabledByConditionalAttribute"); |
| } |
| |
| #endif |
| |
| static inline JSValue jsTestDefaultToJSON_eventHandlerAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| UNUSED_PARAM(lexicalGlobalObject); |
| return eventHandlerAttribute(thisObject.wrapped(), eventNames().entHandlerAttributeEvent, worldForDOMObject(thisObject)); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_eventHandlerAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_eventHandlerAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "eventHandlerAttribute"); |
| } |
| |
| static inline bool setJSTestDefaultToJSON_eventHandlerAttributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject, JSValue value) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| setEventHandlerAttribute(lexicalGlobalObject, thisObject, thisObject.wrapped(), eventNames().entHandlerAttributeEvent, value); |
| vm.heap.writeBarrier(&thisObject, value); |
| ensureStillAliveHere(value); |
| |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_eventHandlerAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_eventHandlerAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "eventHandlerAttribute"); |
| } |
| |
| static inline JSValue jsTestDefaultToJSON_firstStringAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLDOMString>(lexicalGlobalObject, throwScope, impl.firstStringAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_firstStringAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_firstStringAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "firstStringAttribute"); |
| } |
| |
| static inline bool setJSTestDefaultToJSON_firstStringAttributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject, JSValue value) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| auto nativeValue = convert<IDLDOMString>(lexicalGlobalObject, value); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { |
| return impl.setFirstStringAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_firstStringAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_firstStringAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "firstStringAttribute"); |
| } |
| |
| static inline JSValue jsTestDefaultToJSON_secondLongAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLLong>(lexicalGlobalObject, throwScope, impl.secondLongAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_secondLongAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_secondLongAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "secondLongAttribute"); |
| } |
| |
| static inline bool setJSTestDefaultToJSON_secondLongAttributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject, JSValue value) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| auto nativeValue = convert<IDLLong>(lexicalGlobalObject, value); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { |
| return impl.setSecondLongAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_secondLongAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_secondLongAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "secondLongAttribute"); |
| } |
| |
| static inline JSValue jsTestDefaultToJSON_thirdUnJSONableAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLInterface<TestException>>(lexicalGlobalObject, *thisObject.globalObject(), throwScope, impl.thirdUnJSONableAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_thirdUnJSONableAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_thirdUnJSONableAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "thirdUnJSONableAttribute"); |
| } |
| |
| static inline bool setJSTestDefaultToJSON_thirdUnJSONableAttributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject, JSValue value) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| auto nativeValue = convert<IDLInterface<TestException>>(lexicalGlobalObject, value, [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwAttributeTypeError(lexicalGlobalObject, scope, "TestDefaultToJSON", "thirdUnJSONableAttribute", "TestException"); }); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { |
| return impl.setThirdUnJSONableAttribute(*nativeValue); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_thirdUnJSONableAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_thirdUnJSONableAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "thirdUnJSONableAttribute"); |
| } |
| |
| static inline JSValue jsTestDefaultToJSON_fourthUnrestrictedDoubleAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLUnrestrictedDouble>(lexicalGlobalObject, throwScope, impl.fourthUnrestrictedDoubleAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_fourthUnrestrictedDoubleAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_fourthUnrestrictedDoubleAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "fourthUnrestrictedDoubleAttribute"); |
| } |
| |
| static inline bool setJSTestDefaultToJSON_fourthUnrestrictedDoubleAttributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject, JSValue value) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| auto nativeValue = convert<IDLUnrestrictedDouble>(lexicalGlobalObject, value); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { |
| return impl.setFourthUnrestrictedDoubleAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_fourthUnrestrictedDoubleAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_fourthUnrestrictedDoubleAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "fourthUnrestrictedDoubleAttribute"); |
| } |
| |
| static inline JSValue jsTestDefaultToJSON_fifthLongClampedAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLClampAdaptor<IDLLong>>(lexicalGlobalObject, throwScope, impl.fifthLongClampedAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_fifthLongClampedAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_fifthLongClampedAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "fifthLongClampedAttribute"); |
| } |
| |
| static inline bool setJSTestDefaultToJSON_fifthLongClampedAttributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject, JSValue value) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| auto nativeValue = convert<IDLClampAdaptor<IDLLong>>(lexicalGlobalObject, value); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { |
| return impl.setFifthLongClampedAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_fifthLongClampedAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_fifthLongClampedAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "fifthLongClampedAttribute"); |
| } |
| |
| static inline JSValue jsTestDefaultToJSON_sixthTypedefAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLDouble>(lexicalGlobalObject, throwScope, impl.sixthTypedefAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_sixthTypedefAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_sixthTypedefAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "sixthTypedefAttribute"); |
| } |
| |
| static inline bool setJSTestDefaultToJSON_sixthTypedefAttributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject, JSValue value) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| auto nativeValue = convert<IDLDouble>(lexicalGlobalObject, value); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { |
| return impl.setSixthTypedefAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_sixthTypedefAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_sixthTypedefAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "sixthTypedefAttribute"); |
| } |
| |
| static inline JSValue jsTestDefaultToJSON_seventhDirectlyToJSONableAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLInterface<TestDefaultToJSONInheritFinal>>(lexicalGlobalObject, *thisObject.globalObject(), throwScope, impl.seventhDirectlyToJSONableAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_seventhDirectlyToJSONableAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_seventhDirectlyToJSONableAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "seventhDirectlyToJSONableAttribute"); |
| } |
| |
| static inline bool setJSTestDefaultToJSON_seventhDirectlyToJSONableAttributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject, JSValue value) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| auto nativeValue = convert<IDLInterface<TestDefaultToJSONInheritFinal>>(lexicalGlobalObject, value, [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwAttributeTypeError(lexicalGlobalObject, scope, "TestDefaultToJSON", "seventhDirectlyToJSONableAttribute", "TestDefaultToJSONInheritFinal"); }); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { |
| return impl.setSeventhDirectlyToJSONableAttribute(*nativeValue); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_seventhDirectlyToJSONableAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_seventhDirectlyToJSONableAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "seventhDirectlyToJSONableAttribute"); |
| } |
| |
| static inline JSValue jsTestDefaultToJSON_eighthIndirectlyAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLInterface<TestDefaultToJSONIndirectInheritance>>(lexicalGlobalObject, *thisObject.globalObject(), throwScope, impl.eighthIndirectlyAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_eighthIndirectlyAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_eighthIndirectlyAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "eighthIndirectlyAttribute"); |
| } |
| |
| static inline bool setJSTestDefaultToJSON_eighthIndirectlyAttributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject, JSValue value) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| auto nativeValue = convert<IDLInterface<TestDefaultToJSONIndirectInheritance>>(lexicalGlobalObject, value, [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwAttributeTypeError(lexicalGlobalObject, scope, "TestDefaultToJSON", "eighthIndirectlyAttribute", "TestDefaultToJSONIndirectInheritance"); }); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { |
| return impl.setEighthIndirectlyAttribute(*nativeValue); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_eighthIndirectlyAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_eighthIndirectlyAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "eighthIndirectlyAttribute"); |
| } |
| |
| static inline JSValue jsTestDefaultToJSON_ninthOptionalDirectlyToJSONableAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLNullable<IDLInterface<TestDefaultToJSONInheritFinal>>>(lexicalGlobalObject, *thisObject.globalObject(), throwScope, impl.ninthOptionalDirectlyToJSONableAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_ninthOptionalDirectlyToJSONableAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_ninthOptionalDirectlyToJSONableAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "ninthOptionalDirectlyToJSONableAttribute"); |
| } |
| |
| static inline bool setJSTestDefaultToJSON_ninthOptionalDirectlyToJSONableAttributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject, JSValue value) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| auto nativeValue = convert<IDLNullable<IDLInterface<TestDefaultToJSONInheritFinal>>>(lexicalGlobalObject, value, [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwAttributeTypeError(lexicalGlobalObject, scope, "TestDefaultToJSON", "ninthOptionalDirectlyToJSONableAttribute", "TestDefaultToJSONInheritFinal"); }); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { |
| return impl.setNinthOptionalDirectlyToJSONableAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_ninthOptionalDirectlyToJSONableAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_ninthOptionalDirectlyToJSONableAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "ninthOptionalDirectlyToJSONableAttribute"); |
| } |
| |
| static inline JSValue jsTestDefaultToJSON_tenthFrozenArrayAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLFrozenArray<IDLBoolean>>(lexicalGlobalObject, *thisObject.globalObject(), throwScope, impl.tenthFrozenArrayAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_tenthFrozenArrayAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_tenthFrozenArrayAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "tenthFrozenArrayAttribute"); |
| } |
| |
| static inline bool setJSTestDefaultToJSON_tenthFrozenArrayAttributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject, JSValue value) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| auto nativeValue = convert<IDLFrozenArray<IDLBoolean>>(lexicalGlobalObject, value); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { |
| return impl.setTenthFrozenArrayAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_tenthFrozenArrayAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_tenthFrozenArrayAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "tenthFrozenArrayAttribute"); |
| } |
| |
| static inline JSValue jsTestDefaultToJSON_eleventhSequenceAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLSequence<IDLDOMString>>(lexicalGlobalObject, *thisObject.globalObject(), throwScope, impl.eleventhSequenceAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_eleventhSequenceAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_eleventhSequenceAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "eleventhSequenceAttribute"); |
| } |
| |
| static inline bool setJSTestDefaultToJSON_eleventhSequenceAttributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject, JSValue value) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| auto nativeValue = convert<IDLSequence<IDLDOMString>>(lexicalGlobalObject, value); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { |
| return impl.setEleventhSequenceAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_eleventhSequenceAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_eleventhSequenceAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "eleventhSequenceAttribute"); |
| } |
| |
| static inline JSValue jsTestDefaultToJSON_twelfthInterfaceSequenceAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLSequence<IDLInterface<TestDefaultToJSONInheritFinal>>>(lexicalGlobalObject, *thisObject.globalObject(), throwScope, impl.twelfthInterfaceSequenceAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_twelfthInterfaceSequenceAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_twelfthInterfaceSequenceAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "twelfthInterfaceSequenceAttribute"); |
| } |
| |
| static inline bool setJSTestDefaultToJSON_twelfthInterfaceSequenceAttributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject, JSValue value) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| auto nativeValue = convert<IDLSequence<IDLInterface<TestDefaultToJSONInheritFinal>>>(lexicalGlobalObject, value); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { |
| return impl.setTwelfthInterfaceSequenceAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_twelfthInterfaceSequenceAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_twelfthInterfaceSequenceAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "twelfthInterfaceSequenceAttribute"); |
| } |
| |
| static inline JSValue jsTestDefaultToJSON_thirteenthRecordAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| RELEASE_AND_RETURN(throwScope, (toJS<IDLRecord<IDLDOMString, IDLUnsignedShort>>(lexicalGlobalObject, *thisObject.globalObject(), throwScope, impl.thirteenthRecordAttribute()))); |
| } |
| |
| JSC_DEFINE_CUSTOM_GETTER(jsTestDefaultToJSON_thirteenthRecordAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_thirteenthRecordAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, "thirteenthRecordAttribute"); |
| } |
| |
| static inline bool setJSTestDefaultToJSON_thirteenthRecordAttributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject, JSValue value) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| auto& impl = thisObject.wrapped(); |
| auto nativeValue = convert<IDLRecord<IDLDOMString, IDLUnsignedShort>>(lexicalGlobalObject, value); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| AttributeSetter::call(lexicalGlobalObject, throwScope, [&] { |
| return impl.setThirteenthRecordAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_thirteenthRecordAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_thirteenthRecordAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, "thirteenthRecordAttribute"); |
| } |
| |
| static inline EncodedJSValue jsTestDefaultToJSONPrototypeFunction_toJSONBody(JSGlobalObject* lexicalGlobalObject, CallFrame*, JSTestDefaultToJSON* castedThis) |
| { |
| auto& vm = JSC::getVM(lexicalGlobalObject); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| auto& impl = castedThis->wrapped(); |
| auto* result = constructEmptyObject(lexicalGlobalObject, castedThis->globalObject()->objectPrototype()); |
| if (RuntimeEnabledFeatures::sharedFeatures().testRuntimeEnabledEnabled()) { |
| result->putDirect(vm, Identifier::fromString(vm, "longAttribute"), toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.longAttribute())); |
| } |
| if (jsCast<JSDOMGlobalObject*>(castedThis->globalObject())->scriptExecutionContext()->settingsValues().testSettingEnabled) { |
| result->putDirect(vm, Identifier::fromString(vm, "enabledBySettingsAttribute"), toJS<IDLUnsignedShort>(*lexicalGlobalObject, throwScope, impl.enabledBySettingsAttribute())); |
| } |
| #if ENABLE(TEST_CONDITIONAL) |
| result->putDirect(vm, Identifier::fromString(vm, "enabledByConditionalAttribute"), toJS<IDLEnumeration<TestDefaultToJSONEnum>>(*lexicalGlobalObject, throwScope, impl.enabledByConditionalAttribute())); |
| #endif |
| |
| result->putDirect(vm, Identifier::fromString(vm, "firstStringAttribute"), toJS<IDLDOMString>(*lexicalGlobalObject, throwScope, impl.firstStringAttribute())); |
| result->putDirect(vm, Identifier::fromString(vm, "secondLongAttribute"), toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.secondLongAttribute())); |
| result->putDirect(vm, Identifier::fromString(vm, "fourthUnrestrictedDoubleAttribute"), toJS<IDLUnrestrictedDouble>(*lexicalGlobalObject, throwScope, impl.fourthUnrestrictedDoubleAttribute())); |
| result->putDirect(vm, Identifier::fromString(vm, "fifthLongClampedAttribute"), toJS<IDLClampAdaptor<IDLLong>>(*lexicalGlobalObject, throwScope, impl.fifthLongClampedAttribute())); |
| result->putDirect(vm, Identifier::fromString(vm, "sixthTypedefAttribute"), toJS<IDLDouble>(*lexicalGlobalObject, throwScope, impl.sixthTypedefAttribute())); |
| result->putDirect(vm, Identifier::fromString(vm, "seventhDirectlyToJSONableAttribute"), toJS<IDLInterface<TestDefaultToJSONInheritFinal>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.seventhDirectlyToJSONableAttribute())); |
| result->putDirect(vm, Identifier::fromString(vm, "eighthIndirectlyAttribute"), toJS<IDLInterface<TestDefaultToJSONIndirectInheritance>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eighthIndirectlyAttribute())); |
| result->putDirect(vm, Identifier::fromString(vm, "ninthOptionalDirectlyToJSONableAttribute"), toJS<IDLNullable<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.ninthOptionalDirectlyToJSONableAttribute())); |
| result->putDirect(vm, Identifier::fromString(vm, "tenthFrozenArrayAttribute"), toJS<IDLFrozenArray<IDLBoolean>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.tenthFrozenArrayAttribute())); |
| result->putDirect(vm, Identifier::fromString(vm, "eleventhSequenceAttribute"), toJS<IDLSequence<IDLDOMString>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eleventhSequenceAttribute())); |
| result->putDirect(vm, Identifier::fromString(vm, "twelfthInterfaceSequenceAttribute"), toJS<IDLSequence<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.twelfthInterfaceSequenceAttribute())); |
| result->putDirect(vm, Identifier::fromString(vm, "thirteenthRecordAttribute"), toJS<IDLRecord<IDLDOMString, IDLUnsignedShort>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.thirteenthRecordAttribute())); |
| return JSValue::encode(result); |
| } |
| |
| JSC_DEFINE_HOST_FUNCTION(jsTestDefaultToJSONPrototypeFunction_toJSON, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame)) |
| { |
| return IDLOperation<JSTestDefaultToJSON>::call<jsTestDefaultToJSONPrototypeFunction_toJSONBody>(*lexicalGlobalObject, *callFrame, "toJSON"); |
| } |
| |
| JSC::IsoSubspace* JSTestDefaultToJSON::subspaceForImpl(JSC::VM& vm) |
| { |
| auto& clientData = *static_cast<JSVMClientData*>(vm.clientData); |
| auto& spaces = clientData.subspaces(); |
| if (auto* space = spaces.m_subspaceForTestDefaultToJSON.get()) |
| return space; |
| static_assert(std::is_base_of_v<JSC::JSDestructibleObject, JSTestDefaultToJSON> || !JSTestDefaultToJSON::needsDestruction); |
| if constexpr (std::is_base_of_v<JSC::JSDestructibleObject, JSTestDefaultToJSON>) |
| spaces.m_subspaceForTestDefaultToJSON = makeUnique<IsoSubspace> ISO_SUBSPACE_INIT(vm.heap, vm.destructibleObjectHeapCellType.get(), JSTestDefaultToJSON); |
| else |
| spaces.m_subspaceForTestDefaultToJSON = makeUnique<IsoSubspace> ISO_SUBSPACE_INIT(vm.heap, vm.cellHeapCellType.get(), JSTestDefaultToJSON); |
| auto* space = spaces.m_subspaceForTestDefaultToJSON.get(); |
| IGNORE_WARNINGS_BEGIN("unreachable-code") |
| IGNORE_WARNINGS_BEGIN("tautological-compare") |
| void (*myVisitOutputConstraint)(JSC::JSCell*, JSC::SlotVisitor&) = JSTestDefaultToJSON::visitOutputConstraints; |
| void (*jsCellVisitOutputConstraint)(JSC::JSCell*, JSC::SlotVisitor&) = JSC::JSCell::visitOutputConstraints; |
| if (myVisitOutputConstraint != jsCellVisitOutputConstraint) |
| clientData.outputConstraintSpaces().append(space); |
| IGNORE_WARNINGS_END |
| IGNORE_WARNINGS_END |
| return space; |
| } |
| |
| void JSTestDefaultToJSON::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) |
| { |
| auto* thisObject = jsCast<JSTestDefaultToJSON*>(cell); |
| analyzer.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
| if (thisObject->scriptExecutionContext()) |
| analyzer.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
| Base::analyzeHeap(cell, analyzer); |
| } |
| |
| bool JSTestDefaultToJSONOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, AbstractSlotVisitor& visitor, const char** reason) |
| { |
| UNUSED_PARAM(handle); |
| UNUSED_PARAM(visitor); |
| UNUSED_PARAM(reason); |
| return false; |
| } |
| |
| void JSTestDefaultToJSONOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context) |
| { |
| auto* jsTestDefaultToJSON = static_cast<JSTestDefaultToJSON*>(handle.slot()->asCell()); |
| auto& world = *static_cast<DOMWrapperWorld*>(context); |
| uncacheWrapper(world, &jsTestDefaultToJSON->wrapped(), jsTestDefaultToJSON); |
| } |
| |
| #if ENABLE(BINDING_INTEGRITY) |
| #if PLATFORM(WIN) |
| #pragma warning(disable: 4483) |
| extern "C" { extern void (*const __identifier("??_7TestDefaultToJSON@WebCore@@6B@")[])(); } |
| #else |
| extern "C" { extern void* _ZTVN7WebCore17TestDefaultToJSONE[]; } |
| #endif |
| #endif |
| |
| JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject* globalObject, Ref<TestDefaultToJSON>&& impl) |
| { |
| |
| #if ENABLE(BINDING_INTEGRITY) |
| const void* actualVTablePointer = getVTablePointer(impl.ptr()); |
| #if PLATFORM(WIN) |
| void* expectedVTablePointer = __identifier("??_7TestDefaultToJSON@WebCore@@6B@"); |
| #else |
| void* expectedVTablePointer = &_ZTVN7WebCore17TestDefaultToJSONE[2]; |
| #endif |
| |
| // If this fails TestDefaultToJSON does not have a vtable, so you need to add the |
| // ImplementationLacksVTable attribute to the interface definition |
| static_assert(std::is_polymorphic<TestDefaultToJSON>::value, "TestDefaultToJSON is not polymorphic"); |
| |
| // If you hit this assertion you either have a use after free bug, or |
| // TestDefaultToJSON has subclasses. If TestDefaultToJSON has subclasses that get passed |
| // to toJS() we currently require TestDefaultToJSON you to opt out of binding hardening |
| // by adding the SkipVTableValidation attribute to the interface IDL definition |
| RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer); |
| #endif |
| return createWrapper<TestDefaultToJSON>(globalObject, WTFMove(impl)); |
| } |
| |
| JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, TestDefaultToJSON& impl) |
| { |
| return wrap(lexicalGlobalObject, globalObject, impl); |
| } |
| |
| TestDefaultToJSON* JSTestDefaultToJSON::toWrapped(JSC::VM& vm, JSC::JSValue value) |
| { |
| if (auto* wrapper = jsDynamicCast<JSTestDefaultToJSON*>(vm, value)) |
| return &wrapper->wrapped(); |
| return nullptr; |
| } |
| |
| } |