| /* |
| 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 "JSTypeConversions.h" |
| |
| #include "JSDOMBinding.h" |
| #include "JSDOMConvert.h" |
| #include "URL.h" |
| #include <runtime/JSString.h> |
| #include <wtf/GetPtr.h> |
| |
| using namespace JSC; |
| |
| namespace WebCore { |
| |
| // Attributes |
| |
| JSC::EncodedJSValue jsTypeConversionsTestLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestEnforceRangeLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestEnforceRangeLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestUnsignedLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestUnsignedLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestEnforceRangeUnsignedLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestEnforceRangeUnsignedLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestLongLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestLongLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestEnforceRangeLongLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestEnforceRangeLongLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestUnsignedLongLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestUnsignedLongLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestEnforceRangeUnsignedLongLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestEnforceRangeUnsignedLongLong(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestByte(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestByte(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestEnforceRangeByte(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestEnforceRangeByte(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestOctet(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestOctet(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestEnforceRangeOctet(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestEnforceRangeOctet(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestShort(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestShort(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestEnforceRangeShort(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestEnforceRangeShort(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestUnsignedShort(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestUnsignedShort(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestEnforceRangeUnsignedShort(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestEnforceRangeUnsignedShort(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestString(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestString(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsTypeConversionsTestUSVString(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSTypeConversionsTestUSVString(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| bool setJSTypeConversionsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| |
| class JSTypeConversionsPrototype : public JSC::JSNonFinalObject { |
| public: |
| typedef JSC::JSNonFinalObject Base; |
| static JSTypeConversionsPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) |
| { |
| JSTypeConversionsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTypeConversionsPrototype>(vm.heap)) JSTypeConversionsPrototype(vm, globalObject, structure); |
| ptr->finishCreation(vm); |
| return ptr; |
| } |
| |
| DECLARE_INFO; |
| 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: |
| JSTypeConversionsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
| : JSC::JSNonFinalObject(vm, structure) |
| { |
| } |
| |
| void finishCreation(JSC::VM&); |
| }; |
| |
| /* Hash table for prototype */ |
| |
| static const HashTableValue JSTypeConversionsPrototypeTableValues[] = |
| { |
| { "testLong", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestLong), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestLong) } }, |
| { "testEnforceRangeLong", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestEnforceRangeLong), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestEnforceRangeLong) } }, |
| { "testUnsignedLong", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestUnsignedLong), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestUnsignedLong) } }, |
| { "testEnforceRangeUnsignedLong", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestEnforceRangeUnsignedLong), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestEnforceRangeUnsignedLong) } }, |
| { "testLongLong", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestLongLong), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestLongLong) } }, |
| { "testEnforceRangeLongLong", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestEnforceRangeLongLong), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestEnforceRangeLongLong) } }, |
| { "testUnsignedLongLong", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestUnsignedLongLong), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestUnsignedLongLong) } }, |
| { "testEnforceRangeUnsignedLongLong", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestEnforceRangeUnsignedLongLong), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestEnforceRangeUnsignedLongLong) } }, |
| { "testByte", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestByte), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestByte) } }, |
| { "testEnforceRangeByte", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestEnforceRangeByte), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestEnforceRangeByte) } }, |
| { "testOctet", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestOctet), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestOctet) } }, |
| { "testEnforceRangeOctet", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestEnforceRangeOctet), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestEnforceRangeOctet) } }, |
| { "testShort", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestShort), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestShort) } }, |
| { "testEnforceRangeShort", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestEnforceRangeShort), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestEnforceRangeShort) } }, |
| { "testUnsignedShort", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestUnsignedShort), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestUnsignedShort) } }, |
| { "testEnforceRangeUnsignedShort", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestEnforceRangeUnsignedShort), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestEnforceRangeUnsignedShort) } }, |
| { "testString", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestString), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestString) } }, |
| { "testUSVString", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTypeConversionsTestUSVString), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTypeConversionsTestUSVString) } }, |
| }; |
| |
| const ClassInfo JSTypeConversionsPrototype::s_info = { "TypeConversionsPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTypeConversionsPrototype) }; |
| |
| void JSTypeConversionsPrototype::finishCreation(VM& vm) |
| { |
| Base::finishCreation(vm); |
| reifyStaticProperties(vm, JSTypeConversionsPrototypeTableValues, *this); |
| } |
| |
| const ClassInfo JSTypeConversions::s_info = { "TypeConversions", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTypeConversions) }; |
| |
| JSTypeConversions::JSTypeConversions(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TypeConversions>&& impl) |
| : JSDOMWrapper<TypeConversions>(structure, globalObject, WTFMove(impl)) |
| { |
| } |
| |
| JSObject* JSTypeConversions::createPrototype(VM& vm, JSGlobalObject* globalObject) |
| { |
| return JSTypeConversionsPrototype::create(vm, globalObject, JSTypeConversionsPrototype::createStructure(vm, globalObject, globalObject->objectPrototype())); |
| } |
| |
| JSObject* JSTypeConversions::prototype(VM& vm, JSGlobalObject* globalObject) |
| { |
| return getDOMPrototype<JSTypeConversions>(vm, globalObject); |
| } |
| |
| void JSTypeConversions::destroy(JSC::JSCell* cell) |
| { |
| JSTypeConversions* thisObject = static_cast<JSTypeConversions*>(cell); |
| thisObject->JSTypeConversions::~JSTypeConversions(); |
| } |
| |
| EncodedJSValue jsTypeConversionsTestLong(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testLong()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestEnforceRangeLong(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testEnforceRangeLong()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestUnsignedLong(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testUnsignedLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testUnsignedLong()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestEnforceRangeUnsignedLong(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeUnsignedLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testEnforceRangeUnsignedLong()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestLongLong(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testLongLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testLongLong()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestEnforceRangeLongLong(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeLongLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testEnforceRangeLongLong()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestUnsignedLongLong(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testUnsignedLongLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testUnsignedLongLong()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestEnforceRangeUnsignedLongLong(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeUnsignedLongLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testEnforceRangeUnsignedLongLong()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestByte(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testByte"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testByte()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestEnforceRangeByte(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeByte"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testEnforceRangeByte()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestOctet(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testOctet"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testOctet()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestEnforceRangeOctet(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeOctet"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testEnforceRangeOctet()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestShort(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testShort"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testShort()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestEnforceRangeShort(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeShort"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testEnforceRangeShort()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestUnsignedShort(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testUnsignedShort"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testUnsignedShort()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestEnforceRangeUnsignedShort(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeUnsignedShort"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.testEnforceRangeUnsignedShort()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestString(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testString"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.testString()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsTypeConversionsTestUSVString(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDynamicCast<JSTypeConversions*>(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "TypeConversions", "testUSVString"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.testUSVString()); |
| return JSValue::encode(result); |
| } |
| |
| |
| bool setJSTypeConversionsConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| JSValue value = JSValue::decode(encodedValue); |
| JSTypeConversionsPrototype* domObject = jsDynamicCast<JSTypeConversionsPrototype*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!domObject)) { |
| throwVMTypeError(state, throwScope); |
| return false; |
| } |
| // Shadowing a built-in constructor |
| return domObject->putDirect(state->vm(), state->propertyNames().constructor, value); |
| } |
| |
| bool setJSTypeConversionsTestLong(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<int32_t>(*state, value, NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestLong(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestEnforceRangeLong(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<int32_t>(*state, value, EnforceRange); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestEnforceRangeLong(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestUnsignedLong(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testUnsignedLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<uint32_t>(*state, value, NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestUnsignedLong(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestEnforceRangeUnsignedLong(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeUnsignedLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<uint32_t>(*state, value, EnforceRange); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestEnforceRangeUnsignedLong(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestLongLong(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testLongLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<int64_t>(*state, value, NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestLongLong(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestEnforceRangeLongLong(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeLongLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<int64_t>(*state, value, EnforceRange); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestEnforceRangeLongLong(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestUnsignedLongLong(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testUnsignedLongLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<uint64_t>(*state, value, NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestUnsignedLongLong(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestEnforceRangeUnsignedLongLong(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeUnsignedLongLong"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<uint64_t>(*state, value, EnforceRange); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestEnforceRangeUnsignedLongLong(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestByte(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testByte"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<int8_t>(*state, value, NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestByte(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestEnforceRangeByte(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeByte"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<int8_t>(*state, value, EnforceRange); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestEnforceRangeByte(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestOctet(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testOctet"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<uint8_t>(*state, value, NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestOctet(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestEnforceRangeOctet(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeOctet"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<uint8_t>(*state, value, EnforceRange); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestEnforceRangeOctet(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestShort(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testShort"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<int16_t>(*state, value, NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestShort(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestEnforceRangeShort(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeShort"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<int16_t>(*state, value, EnforceRange); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestEnforceRangeShort(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestUnsignedShort(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testUnsignedShort"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<uint16_t>(*state, value, NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestUnsignedShort(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestEnforceRangeUnsignedShort(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testEnforceRangeUnsignedShort"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = convert<uint16_t>(*state, value, EnforceRange); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestEnforceRangeUnsignedShort(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestString(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testString"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = value.toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestString(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSTypeConversionsTestUSVString(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSTypeConversions* castedThis = jsDynamicCast<JSTypeConversions*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "TypeConversions", "testUSVString"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = valueToUSVString(state, value); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTestUSVString(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool JSTypeConversionsOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor) |
| { |
| UNUSED_PARAM(handle); |
| UNUSED_PARAM(visitor); |
| return false; |
| } |
| |
| void JSTypeConversionsOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context) |
| { |
| auto* jsTypeConversions = jsCast<JSTypeConversions*>(handle.slot()->asCell()); |
| auto& world = *static_cast<DOMWrapperWorld*>(context); |
| uncacheWrapper(world, &jsTypeConversions->wrapped(), jsTypeConversions); |
| } |
| |
| JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<TypeConversions>&& impl) |
| { |
| #if COMPILER(CLANG) |
| // If you hit this failure the interface definition has the ImplementationLacksVTable |
| // attribute. You should remove that attribute. If the class has subclasses |
| // that may be passed through this toJS() function you should use the SkipVTableValidation |
| // attribute to TypeConversions. |
| static_assert(!__is_polymorphic(TypeConversions), "TypeConversions is polymorphic but the IDL claims it is not"); |
| #endif |
| return createWrapper<TypeConversions>(globalObject, WTFMove(impl)); |
| } |
| |
| JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TypeConversions& impl) |
| { |
| return wrap(state, globalObject, impl); |
| } |
| |
| TypeConversions* JSTypeConversions::toWrapped(JSC::JSValue value) |
| { |
| if (auto* wrapper = jsDynamicCast<JSTypeConversions*>(value)) |
| return &wrapper->wrapped(); |
| return nullptr; |
| } |
| |
| } |