| /* |
| 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 "EventNames.h" |
| #include "ExtendedDOMClientIsoSubspaces.h" |
| #include "ExtendedDOMIsoSubspaces.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 "JSDOMGlobalObjectInlines.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)) JSTestDefaultToJSONPrototype(vm, globalObject, structure); |
| ptr->finishCreation(vm); |
| return ptr; |
| } |
| |
| DECLARE_INFO; |
| template<typename CellType, JSC::SubspaceAccess> |
| static JSC::GCClient::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<> const ClassInfo JSTestDefaultToJSONDOMConstructor::s_info = { "TestDefaultToJSON"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSTestDefaultToJSONDOMConstructor) }; |
| |
| 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->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| JSString* nameString = jsNontrivialString(vm, "TestDefaultToJSON"_s); |
| m_originalName.set(vm, this, nameString); |
| putDirect(vm, vm.propertyNames->name, nameString, JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); |
| putDirect(vm, vm.propertyNames->prototype, JSTestDefaultToJSON::prototype(vm, globalObject), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::DontDelete); |
| } |
| |
| /* Hash table for prototype */ |
| |
| static const HashTableValue JSTestDefaultToJSONPrototypeTableValues[] = |
| { |
| { "constructor"_s, static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "longAttribute"_s, 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"_s, 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"_s, 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, NoIntrinsic, { 0, 0 } }, |
| #endif |
| { "eventHandlerAttribute"_s, 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"_s, 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"_s, 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"_s, 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"_s, 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"_s, 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"_s, 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"_s, 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"_s, 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"_s, 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"_s, 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"_s, 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"_s, 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"_s, 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"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestDefaultToJSONPrototypeFunction_toJSON), (intptr_t) (0) } }, |
| }; |
| |
| const ClassInfo JSTestDefaultToJSONPrototype::s_info = { "TestDefaultToJSON"_s, &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, "longAttribute"_s); |
| 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, "enabledBySettingsAttribute"_s); |
| 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"_s, &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(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, DOMConstructorID::TestDefaultToJSON>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
| } |
| |
| void JSTestDefaultToJSON::destroy(JSC::JSCell* cell) |
| { |
| JSTestDefaultToJSON* thisObject = static_cast<JSTestDefaultToJSON*>(cell); |
| thisObject->JSTestDefaultToJSON::~JSTestDefaultToJSON(); |
| } |
| |
| 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*>(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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_longAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| 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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_enabledBySettingsAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| #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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_enabledByConditionalAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| #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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_eventHandlerAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| static inline bool setJSTestDefaultToJSON_eventHandlerAttributeSetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject, JSValue value) |
| { |
| auto& vm = JSC::getVM(&lexicalGlobalObject); |
| setEventHandlerAttribute<JSEventListener>(thisObject.wrapped(), eventNames().entHandlerAttributeEvent, value, thisObject); |
| vm.writeBarrier(&thisObject, value); |
| ensureStillAliveHere(value); |
| |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_eventHandlerAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_eventHandlerAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName); |
| } |
| |
| 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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_firstStringAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| 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); |
| invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] { |
| return impl.setFirstStringAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_firstStringAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_firstStringAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName); |
| } |
| |
| 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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_secondLongAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| 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); |
| invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] { |
| return impl.setSecondLongAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_secondLongAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_secondLongAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName); |
| } |
| |
| 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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_thirdUnJSONableAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| 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); |
| invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] { |
| return impl.setThirdUnJSONableAttribute(*nativeValue); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_thirdUnJSONableAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_thirdUnJSONableAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName); |
| } |
| |
| 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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_fourthUnrestrictedDoubleAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| 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); |
| invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] { |
| return impl.setFourthUnrestrictedDoubleAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_fourthUnrestrictedDoubleAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_fourthUnrestrictedDoubleAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName); |
| } |
| |
| 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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_fifthLongClampedAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| 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); |
| invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] { |
| return impl.setFifthLongClampedAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_fifthLongClampedAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_fifthLongClampedAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName); |
| } |
| |
| 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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_sixthTypedefAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| 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); |
| invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] { |
| return impl.setSixthTypedefAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_sixthTypedefAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_sixthTypedefAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName); |
| } |
| |
| 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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_seventhDirectlyToJSONableAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| 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); |
| invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] { |
| return impl.setSeventhDirectlyToJSONableAttribute(*nativeValue); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_seventhDirectlyToJSONableAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_seventhDirectlyToJSONableAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName); |
| } |
| |
| 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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_eighthIndirectlyAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| 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); |
| invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] { |
| return impl.setEighthIndirectlyAttribute(*nativeValue); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_eighthIndirectlyAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_eighthIndirectlyAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName); |
| } |
| |
| 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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_ninthOptionalDirectlyToJSONableAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| 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); |
| invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] { |
| return impl.setNinthOptionalDirectlyToJSONableAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_ninthOptionalDirectlyToJSONableAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_ninthOptionalDirectlyToJSONableAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName); |
| } |
| |
| 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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_tenthFrozenArrayAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| 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); |
| invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] { |
| return impl.setTenthFrozenArrayAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_tenthFrozenArrayAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_tenthFrozenArrayAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName); |
| } |
| |
| 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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_eleventhSequenceAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| 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); |
| invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] { |
| return impl.setEleventhSequenceAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_eleventhSequenceAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_eleventhSequenceAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName); |
| } |
| |
| 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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_twelfthInterfaceSequenceAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| 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); |
| invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] { |
| return impl.setTwelfthInterfaceSequenceAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_twelfthInterfaceSequenceAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_twelfthInterfaceSequenceAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName); |
| } |
| |
| 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 attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::get<jsTestDefaultToJSON_thirteenthRecordAttributeGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); |
| } |
| |
| 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); |
| invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] { |
| return impl.setThirteenthRecordAttribute(WTFMove(nativeValue)); |
| }); |
| return true; |
| } |
| |
| JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSON_thirteenthRecordAttribute, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName)) |
| { |
| return IDLAttribute<JSTestDefaultToJSON>::set<setJSTestDefaultToJSON_thirteenthRecordAttributeSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName); |
| } |
| |
| 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()) { |
| auto longAttributeValue = toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.longAttribute()); |
| RETURN_IF_EXCEPTION(throwScope, { }); |
| result->putDirect(vm, Identifier::fromString(vm, "longAttribute"_s), longAttributeValue); |
| } |
| if (jsCast<JSDOMGlobalObject*>(castedThis->globalObject())->scriptExecutionContext()->settingsValues().testSettingEnabled) { |
| auto enabledBySettingsAttributeValue = toJS<IDLUnsignedShort>(*lexicalGlobalObject, throwScope, impl.enabledBySettingsAttribute()); |
| RETURN_IF_EXCEPTION(throwScope, { }); |
| result->putDirect(vm, Identifier::fromString(vm, "enabledBySettingsAttribute"_s), enabledBySettingsAttributeValue); |
| } |
| #if ENABLE(TEST_CONDITIONAL) |
| auto enabledByConditionalAttributeValue = toJS<IDLEnumeration<TestDefaultToJSONEnum>>(*lexicalGlobalObject, throwScope, impl.enabledByConditionalAttribute()); |
| RETURN_IF_EXCEPTION(throwScope, { }); |
| result->putDirect(vm, Identifier::fromString(vm, "enabledByConditionalAttribute"_s), enabledByConditionalAttributeValue); |
| #endif |
| |
| auto firstStringAttributeValue = toJS<IDLDOMString>(*lexicalGlobalObject, throwScope, impl.firstStringAttribute()); |
| RETURN_IF_EXCEPTION(throwScope, { }); |
| result->putDirect(vm, Identifier::fromString(vm, "firstStringAttribute"_s), firstStringAttributeValue); |
| auto secondLongAttributeValue = toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.secondLongAttribute()); |
| RETURN_IF_EXCEPTION(throwScope, { }); |
| result->putDirect(vm, Identifier::fromString(vm, "secondLongAttribute"_s), secondLongAttributeValue); |
| auto fourthUnrestrictedDoubleAttributeValue = toJS<IDLUnrestrictedDouble>(*lexicalGlobalObject, throwScope, impl.fourthUnrestrictedDoubleAttribute()); |
| RETURN_IF_EXCEPTION(throwScope, { }); |
| result->putDirect(vm, Identifier::fromString(vm, "fourthUnrestrictedDoubleAttribute"_s), fourthUnrestrictedDoubleAttributeValue); |
| auto fifthLongClampedAttributeValue = toJS<IDLClampAdaptor<IDLLong>>(*lexicalGlobalObject, throwScope, impl.fifthLongClampedAttribute()); |
| RETURN_IF_EXCEPTION(throwScope, { }); |
| result->putDirect(vm, Identifier::fromString(vm, "fifthLongClampedAttribute"_s), fifthLongClampedAttributeValue); |
| auto sixthTypedefAttributeValue = toJS<IDLDouble>(*lexicalGlobalObject, throwScope, impl.sixthTypedefAttribute()); |
| RETURN_IF_EXCEPTION(throwScope, { }); |
| result->putDirect(vm, Identifier::fromString(vm, "sixthTypedefAttribute"_s), sixthTypedefAttributeValue); |
| auto seventhDirectlyToJSONableAttributeValue = toJS<IDLInterface<TestDefaultToJSONInheritFinal>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.seventhDirectlyToJSONableAttribute()); |
| RETURN_IF_EXCEPTION(throwScope, { }); |
| result->putDirect(vm, Identifier::fromString(vm, "seventhDirectlyToJSONableAttribute"_s), seventhDirectlyToJSONableAttributeValue); |
| auto eighthIndirectlyAttributeValue = toJS<IDLInterface<TestDefaultToJSONIndirectInheritance>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eighthIndirectlyAttribute()); |
| RETURN_IF_EXCEPTION(throwScope, { }); |
| result->putDirect(vm, Identifier::fromString(vm, "eighthIndirectlyAttribute"_s), eighthIndirectlyAttributeValue); |
| auto ninthOptionalDirectlyToJSONableAttributeValue = toJS<IDLNullable<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.ninthOptionalDirectlyToJSONableAttribute()); |
| RETURN_IF_EXCEPTION(throwScope, { }); |
| result->putDirect(vm, Identifier::fromString(vm, "ninthOptionalDirectlyToJSONableAttribute"_s), ninthOptionalDirectlyToJSONableAttributeValue); |
| auto tenthFrozenArrayAttributeValue = toJS<IDLFrozenArray<IDLBoolean>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.tenthFrozenArrayAttribute()); |
| RETURN_IF_EXCEPTION(throwScope, { }); |
| result->putDirect(vm, Identifier::fromString(vm, "tenthFrozenArrayAttribute"_s), tenthFrozenArrayAttributeValue); |
| auto eleventhSequenceAttributeValue = toJS<IDLSequence<IDLDOMString>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eleventhSequenceAttribute()); |
| RETURN_IF_EXCEPTION(throwScope, { }); |
| result->putDirect(vm, Identifier::fromString(vm, "eleventhSequenceAttribute"_s), eleventhSequenceAttributeValue); |
| auto twelfthInterfaceSequenceAttributeValue = toJS<IDLSequence<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.twelfthInterfaceSequenceAttribute()); |
| RETURN_IF_EXCEPTION(throwScope, { }); |
| result->putDirect(vm, Identifier::fromString(vm, "twelfthInterfaceSequenceAttribute"_s), twelfthInterfaceSequenceAttributeValue); |
| auto thirteenthRecordAttributeValue = toJS<IDLRecord<IDLDOMString, IDLUnsignedShort>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.thirteenthRecordAttribute()); |
| RETURN_IF_EXCEPTION(throwScope, { }); |
| result->putDirect(vm, Identifier::fromString(vm, "thirteenthRecordAttribute"_s), thirteenthRecordAttributeValue); |
| return JSValue::encode(result); |
| } |
| |
| JSC_DEFINE_HOST_FUNCTION(jsTestDefaultToJSONPrototypeFunction_toJSON, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame)) |
| { |
| return IDLOperation<JSTestDefaultToJSON>::call<jsTestDefaultToJSONPrototypeFunction_toJSONBody>(*lexicalGlobalObject, *callFrame, "toJSON"); |
| } |
| |
| JSC::GCClient::IsoSubspace* JSTestDefaultToJSON::subspaceForImpl(JSC::VM& vm) |
| { |
| return WebCore::subspaceForImpl<JSTestDefaultToJSON, UseCustomHeapCellType::No>(vm, |
| [] (auto& spaces) { return spaces.m_clientSubspaceForTestDefaultToJSON.get(); }, |
| [] (auto& spaces, auto&& space) { spaces.m_clientSubspaceForTestDefaultToJSON = WTFMove(space); }, |
| [] (auto& spaces) { return spaces.m_subspaceForTestDefaultToJSON.get(); }, |
| [] (auto& spaces, auto&& space) { spaces.m_subspaceForTestDefaultToJSON = WTFMove(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 constexpr (std::is_polymorphic_v<TestDefaultToJSON>) { |
| #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 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&, JSC::JSValue value) |
| { |
| if (auto* wrapper = jsDynamicCast<JSTestDefaultToJSON*>(value)) |
| return &wrapper->wrapped(); |
| return nullptr; |
| } |
| |
| } |