861500e86807ce9496d19b9ca13a8c13eaf64cd2
[WebKit-https.git] / Source / WebCore / bindings / scripts / test / JS / JSTestTypedefs.cpp
1 /*
2     This file is part of the WebKit open source project.
3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
4
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Library General Public
7     License as published by the Free Software Foundation; either
8     version 2 of the License, or (at your option) any later version.
9
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13     Library General Public License for more details.
14
15     You should have received a copy of the GNU Library General Public License
16     along with this library; see the file COPYING.LIB.  If not, write to
17     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18     Boston, MA 02110-1301, USA.
19 */
20
21 #include "config.h"
22 #include "JSTestTypedefs.h"
23
24 #include "JSDOMAttribute.h"
25 #include "JSDOMBinding.h"
26 #include "JSDOMConstructor.h"
27 #include "JSDOMConvertBoolean.h"
28 #include "JSDOMConvertBufferSource.h"
29 #include "JSDOMConvertCallbacks.h"
30 #include "JSDOMConvertInterface.h"
31 #include "JSDOMConvertNullable.h"
32 #include "JSDOMConvertNumbers.h"
33 #include "JSDOMConvertSequences.h"
34 #include "JSDOMConvertSerializedScriptValue.h"
35 #include "JSDOMConvertStrings.h"
36 #include "JSDOMConvertUnion.h"
37 #include "JSDOMExceptionHandling.h"
38 #include "JSDOMGlobalObject.h"
39 #include "JSDOMOperation.h"
40 #include "JSDOMWrapperCache.h"
41 #include "JSSVGPoint.h"
42 #include "JSTestCallbackFunction.h"
43 #include "JSTestCallbackInterface.h"
44 #include "JSTestEventTarget.h"
45 #include "JSTestSubObj.h"
46 #include "SerializedScriptValue.h"
47 #include <runtime/FunctionPrototype.h>
48 #include <runtime/JSArray.h>
49 #include <runtime/JSCInlines.h>
50 #include <wtf/GetPtr.h>
51 #include <wtf/Variant.h>
52
53 using namespace JSC;
54
55 namespace WebCore {
56
57 // Functions
58
59 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFunc(JSC::ExecState*);
60 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSetShadow(JSC::ExecState*);
61 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithSequenceArg(JSC::ExecState*);
62 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceArg(JSC::ExecState*);
63 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSequenceOfNullablesArg(JSC::ExecState*);
64 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArg(JSC::ExecState*);
65 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArg(JSC::ExecState*);
66 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionUnionArg(JSC::ExecState*);
67 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClamp(JSC::ExecState*);
68 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClampInTypedef(JSC::ExecState*);
69 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionPointFunction(JSC::ExecState*);
70 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringSequenceFunction(JSC::ExecState*);
71 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringSequenceFunction2(JSC::ExecState*);
72 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude(JSC::ExecState*);
73 JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithException(JSC::ExecState*);
74
75 // Attributes
76
77 JSC::EncodedJSValue jsTestTypedefsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
78 bool setJSTestTypedefsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
79 JSC::EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
80 bool setJSTestTypedefsUnsignedLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
81 JSC::EncodedJSValue jsTestTypedefsSerializedScriptValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
82 bool setJSTestTypedefsSerializedScriptValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
83 JSC::EncodedJSValue jsTestTypedefsConstructorTestSubObj(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
84 JSC::EncodedJSValue jsTestTypedefsAttributeWithClamp(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
85 bool setJSTestTypedefsAttributeWithClamp(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
86 JSC::EncodedJSValue jsTestTypedefsAttributeWithClampInTypedef(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
87 bool setJSTestTypedefsAttributeWithClampInTypedef(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
88 JSC::EncodedJSValue jsTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
89 bool setJSTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
90 JSC::EncodedJSValue jsTestTypedefsStringAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
91 bool setJSTestTypedefsStringAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
92 JSC::EncodedJSValue jsTestTypedefsBufferSourceAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
93 bool setJSTestTypedefsBufferSourceAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
94 JSC::EncodedJSValue jsTestTypedefsDomTimeStampAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
95 bool setJSTestTypedefsDomTimeStampAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
96
97 class JSTestTypedefsPrototype : public JSC::JSNonFinalObject {
98 public:
99     using Base = JSC::JSNonFinalObject;
100     static JSTestTypedefsPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
101     {
102         JSTestTypedefsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefsPrototype>(vm.heap)) JSTestTypedefsPrototype(vm, globalObject, structure);
103         ptr->finishCreation(vm);
104         return ptr;
105     }
106
107     DECLARE_INFO;
108     static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
109     {
110         return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
111     }
112
113 private:
114     JSTestTypedefsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
115         : JSC::JSNonFinalObject(vm, structure)
116     {
117     }
118
119     void finishCreation(JSC::VM&);
120 };
121
122 using JSTestTypedefsConstructor = JSDOMConstructor<JSTestTypedefs>;
123
124 /* Hash table */
125
126 static const struct CompactHashIndex JSTestTypedefsTableIndex[2] = {
127     { -1, -1 },
128     { -1, -1 },
129 };
130
131
132 static const HashTableValue JSTestTypedefsTableValues[] =
133 {
134     { 0, 0, NoIntrinsic, { 0, 0 } }
135 };
136
137 static const HashTable JSTestTypedefsTable = { 0, 1, false, JSTestTypedefs::info(), JSTestTypedefsTableValues, JSTestTypedefsTableIndex };
138 /* Hash table for constructor */
139
140 static const HashTableValue JSTestTypedefsConstructorTableValues[] =
141 {
142     { "TestSubObj", ReadOnly, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsConstructorTestSubObj), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
143 };
144
145 template<> EncodedJSValue JSC_HOST_CALL JSTestTypedefsConstructor::construct(ExecState* state)
146 {
147     VM& vm = state->vm();
148     auto throwScope = DECLARE_THROW_SCOPE(vm);
149     UNUSED_PARAM(throwScope);
150     auto* castedThis = jsCast<JSTestTypedefsConstructor*>(state->jsCallee());
151     ASSERT(castedThis);
152     if (UNLIKELY(state->argumentCount() < 3))
153         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
154     auto hello = convert<IDLDOMString>(*state, state->uncheckedArgument(0));
155     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
156     auto testCallbackFunction = convert<IDLCallbackFunction<JSTestCallbackFunction>>(*state, state->uncheckedArgument(1), *castedThis->globalObject(), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentMustBeFunctionError(state, scope, 1, "testCallbackFunction", "TestTypedefs", nullptr); });
157     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
158     auto testCallbackInterface = convert<IDLCallbackInterface<JSTestCallbackInterface>>(*state, state->uncheckedArgument(2), *castedThis->globalObject(), [](JSC::ExecState& state, JSC::ThrowScope& scope) { throwArgumentMustBeFunctionError(state, scope, 2, "testCallbackInterface", "TestTypedefs", nullptr); });
159     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
160     auto object = TestTypedefs::create(WTFMove(hello), testCallbackFunction.releaseNonNull(), testCallbackInterface.releaseNonNull());
161     return JSValue::encode(toJSNewlyCreated<IDLInterface<TestTypedefs>>(*state, *castedThis->globalObject(), WTFMove(object)));
162 }
163
164 template<> JSValue JSTestTypedefsConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
165 {
166     UNUSED_PARAM(vm);
167     return globalObject.functionPrototype();
168 }
169
170 template<> void JSTestTypedefsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
171 {
172     putDirect(vm, vm.propertyNames->prototype, JSTestTypedefs::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
173     putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestTypedefs"))), ReadOnly | DontEnum);
174     putDirect(vm, vm.propertyNames->length, jsNumber(3), ReadOnly | DontEnum);
175     reifyStaticProperties(vm, JSTestTypedefs::info(), JSTestTypedefsConstructorTableValues, *this);
176 }
177
178 template<> const ClassInfo JSTestTypedefsConstructor::s_info = { "TestTypedefs", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSTestTypedefsConstructor) };
179
180 /* Hash table for prototype */
181
182 static const HashTableValue JSTestTypedefsPrototypeTableValues[] =
183 {
184     { "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsConstructor) } },
185     { "unsignedLongLongAttr", CustomAccessor | DOMAttribute, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsUnsignedLongLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsUnsignedLongLongAttr) } },
186     { "serializedScriptValue", CustomAccessor | DOMAttribute, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsSerializedScriptValue), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsSerializedScriptValue) } },
187     { "attributeWithClamp", CustomAccessor | DOMAttribute, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsAttributeWithClamp), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsAttributeWithClamp) } },
188     { "attributeWithClampInTypedef", CustomAccessor | DOMAttribute, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsAttributeWithClampInTypedef), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsAttributeWithClampInTypedef) } },
189     { "attrWithGetterException", CustomAccessor | DOMAttribute, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsAttrWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsAttrWithGetterException) } },
190     { "stringAttrWithGetterException", CustomAccessor | DOMAttribute, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsStringAttrWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsStringAttrWithGetterException) } },
191     { "bufferSourceAttr", CustomAccessor | DOMAttribute, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsBufferSourceAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsBufferSourceAttr) } },
192     { "domTimeStampAttr", CustomAccessor | DOMAttribute, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsDomTimeStampAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsDomTimeStampAttr) } },
193     { "func", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionFunc), (intptr_t) (0) } },
194     { "setShadow", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionSetShadow), (intptr_t) (3) } },
195     { "methodWithSequenceArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionMethodWithSequenceArg), (intptr_t) (1) } },
196     { "nullableSequenceArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionNullableSequenceArg), (intptr_t) (1) } },
197     { "sequenceOfNullablesArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionSequenceOfNullablesArg), (intptr_t) (1) } },
198     { "nullableSequenceOfNullablesArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArg), (intptr_t) (1) } },
199     { "nullableSequenceOfUnionsArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArg), (intptr_t) (1) } },
200     { "unionArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionUnionArg), (intptr_t) (1) } },
201     { "funcWithClamp", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionFuncWithClamp), (intptr_t) (1) } },
202     { "funcWithClampInTypedef", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionFuncWithClampInTypedef), (intptr_t) (1) } },
203     { "pointFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionPointFunction), (intptr_t) (0) } },
204     { "stringSequenceFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionStringSequenceFunction), (intptr_t) (1) } },
205     { "stringSequenceFunction2", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionStringSequenceFunction2), (intptr_t) (1) } },
206     { "callWithSequenceThatRequiresInclude", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude), (intptr_t) (1) } },
207     { "methodWithException", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionMethodWithException), (intptr_t) (0) } },
208 };
209
210 const ClassInfo JSTestTypedefsPrototype::s_info = { "TestTypedefsPrototype", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSTestTypedefsPrototype) };
211
212 void JSTestTypedefsPrototype::finishCreation(VM& vm)
213 {
214     Base::finishCreation(vm);
215     reifyStaticProperties(vm, JSTestTypedefs::info(), JSTestTypedefsPrototypeTableValues, *this);
216 }
217
218 const ClassInfo JSTestTypedefs::s_info = { "TestTypedefs", &Base::s_info, &JSTestTypedefsTable, nullptr, CREATE_METHOD_TABLE(JSTestTypedefs) };
219
220 JSTestTypedefs::JSTestTypedefs(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestTypedefs>&& impl)
221     : JSDOMWrapper<TestTypedefs>(structure, globalObject, WTFMove(impl))
222 {
223 }
224
225 void JSTestTypedefs::finishCreation(VM& vm)
226 {
227     Base::finishCreation(vm);
228     ASSERT(inherits(vm, info()));
229
230 }
231
232 JSObject* JSTestTypedefs::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
233 {
234     return JSTestTypedefsPrototype::create(vm, &globalObject, JSTestTypedefsPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
235 }
236
237 JSObject* JSTestTypedefs::prototype(VM& vm, JSDOMGlobalObject& globalObject)
238 {
239     return getDOMPrototype<JSTestTypedefs>(vm, globalObject);
240 }
241
242 JSValue JSTestTypedefs::getConstructor(VM& vm, const JSGlobalObject* globalObject)
243 {
244     return getDOMConstructor<JSTestTypedefsConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
245 }
246
247 void JSTestTypedefs::destroy(JSC::JSCell* cell)
248 {
249     JSTestTypedefs* thisObject = static_cast<JSTestTypedefs*>(cell);
250     thisObject->JSTestTypedefs::~JSTestTypedefs();
251 }
252
253 template<> inline JSTestTypedefs* IDLAttribute<JSTestTypedefs>::cast(ExecState& state, EncodedJSValue thisValue)
254 {
255     return jsDynamicDowncast<JSTestTypedefs*>(state.vm(), JSValue::decode(thisValue));
256 }
257
258 template<> inline JSTestTypedefs* IDLOperation<JSTestTypedefs>::cast(ExecState& state)
259 {
260     return jsDynamicDowncast<JSTestTypedefs*>(state.vm(), state.thisValue());
261 }
262
263 EncodedJSValue jsTestTypedefsConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
264 {
265     VM& vm = state->vm();
266     auto throwScope = DECLARE_THROW_SCOPE(vm);
267     auto* prototype = jsDynamicDowncast<JSTestTypedefsPrototype*>(vm, JSValue::decode(thisValue));
268     if (UNLIKELY(!prototype))
269         return throwVMTypeError(state, throwScope);
270     return JSValue::encode(JSTestTypedefs::getConstructor(state->vm(), prototype->globalObject()));
271 }
272
273 bool setJSTestTypedefsConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
274 {
275     VM& vm = state->vm();
276     auto throwScope = DECLARE_THROW_SCOPE(vm);
277     auto* prototype = jsDynamicDowncast<JSTestTypedefsPrototype*>(vm, JSValue::decode(thisValue));
278     if (UNLIKELY(!prototype)) {
279         throwVMTypeError(state, throwScope);
280         return false;
281     }
282     // Shadowing a built-in constructor
283     return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));
284 }
285
286 static inline JSValue jsTestTypedefsUnsignedLongLongAttrGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
287 {
288     UNUSED_PARAM(throwScope);
289     UNUSED_PARAM(state);
290     auto& impl = thisObject.wrapped();
291     JSValue result = toJS<IDLUnsignedLongLong>(impl.unsignedLongLongAttr());
292     return result;
293 }
294
295 EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
296 {
297     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsUnsignedLongLongAttrGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "unsignedLongLongAttr");
298 }
299
300 static inline bool setJSTestTypedefsUnsignedLongLongAttrSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
301 {
302     UNUSED_PARAM(throwScope);
303     auto& impl = thisObject.wrapped();
304     auto nativeValue = convert<IDLUnsignedLongLong>(state, value);
305     RETURN_IF_EXCEPTION(throwScope, false);
306     AttributeSetter::call(state, throwScope, [&] {
307         return impl.setUnsignedLongLongAttr(WTFMove(nativeValue));
308     });
309     return true;
310 }
311
312 bool setJSTestTypedefsUnsignedLongLongAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
313 {
314     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsUnsignedLongLongAttrSetter>(*state, thisValue, encodedValue, "unsignedLongLongAttr");
315 }
316
317 static inline JSValue jsTestTypedefsSerializedScriptValueGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
318 {
319     UNUSED_PARAM(throwScope);
320     UNUSED_PARAM(state);
321     auto& impl = thisObject.wrapped();
322     JSValue result = toJS<IDLSerializedScriptValue<SerializedScriptValue>>(state, *thisObject.globalObject(), impl.serializedScriptValue());
323     return result;
324 }
325
326 EncodedJSValue jsTestTypedefsSerializedScriptValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
327 {
328     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsSerializedScriptValueGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "serializedScriptValue");
329 }
330
331 static inline bool setJSTestTypedefsSerializedScriptValueSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
332 {
333     UNUSED_PARAM(throwScope);
334     auto& impl = thisObject.wrapped();
335     auto nativeValue = convert<IDLSerializedScriptValue<SerializedScriptValue>>(state, value);
336     RETURN_IF_EXCEPTION(throwScope, false);
337     AttributeSetter::call(state, throwScope, [&] {
338         return impl.setSerializedScriptValue(WTFMove(nativeValue));
339     });
340     return true;
341 }
342
343 bool setJSTestTypedefsSerializedScriptValue(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
344 {
345     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsSerializedScriptValueSetter>(*state, thisValue, encodedValue, "serializedScriptValue");
346 }
347
348 static inline JSValue jsTestTypedefsConstructorTestSubObjGetter(ExecState& state, ThrowScope& throwScope)
349 {
350     UNUSED_PARAM(throwScope);
351     UNUSED_PARAM(state);
352     return JSTestSubObj::getConstructor(state.vm(), thisObject.globalObject());
353 }
354
355 EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* state, EncodedJSValue thisValue, PropertyName)
356 {
357     return IDLAttribute<JSTestTypedefs>::getStatic<jsTestTypedefsConstructorTestSubObjGetter>(*state, thisValue, "TestSubObj");
358 }
359
360 static inline JSValue jsTestTypedefsAttributeWithClampGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
361 {
362     UNUSED_PARAM(throwScope);
363     UNUSED_PARAM(state);
364     auto& impl = thisObject.wrapped();
365     JSValue result = toJS<IDLClampAdaptor<IDLUnsignedLongLong>>(impl.attributeWithClamp());
366     return result;
367 }
368
369 EncodedJSValue jsTestTypedefsAttributeWithClamp(ExecState* state, EncodedJSValue thisValue, PropertyName)
370 {
371     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsAttributeWithClampGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "attributeWithClamp");
372 }
373
374 static inline bool setJSTestTypedefsAttributeWithClampSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
375 {
376     UNUSED_PARAM(throwScope);
377     auto& impl = thisObject.wrapped();
378     auto nativeValue = convert<IDLClampAdaptor<IDLUnsignedLongLong>>(state, value);
379     RETURN_IF_EXCEPTION(throwScope, false);
380     AttributeSetter::call(state, throwScope, [&] {
381         return impl.setAttributeWithClamp(WTFMove(nativeValue));
382     });
383     return true;
384 }
385
386 bool setJSTestTypedefsAttributeWithClamp(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
387 {
388     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsAttributeWithClampSetter>(*state, thisValue, encodedValue, "attributeWithClamp");
389 }
390
391 static inline JSValue jsTestTypedefsAttributeWithClampInTypedefGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
392 {
393     UNUSED_PARAM(throwScope);
394     UNUSED_PARAM(state);
395     auto& impl = thisObject.wrapped();
396     JSValue result = toJS<IDLClampAdaptor<IDLLong>>(impl.attributeWithClampInTypedef());
397     return result;
398 }
399
400 EncodedJSValue jsTestTypedefsAttributeWithClampInTypedef(ExecState* state, EncodedJSValue thisValue, PropertyName)
401 {
402     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsAttributeWithClampInTypedefGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "attributeWithClampInTypedef");
403 }
404
405 static inline bool setJSTestTypedefsAttributeWithClampInTypedefSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
406 {
407     UNUSED_PARAM(throwScope);
408     auto& impl = thisObject.wrapped();
409     auto nativeValue = convert<IDLClampAdaptor<IDLLong>>(state, value);
410     RETURN_IF_EXCEPTION(throwScope, false);
411     AttributeSetter::call(state, throwScope, [&] {
412         return impl.setAttributeWithClampInTypedef(WTFMove(nativeValue));
413     });
414     return true;
415 }
416
417 bool setJSTestTypedefsAttributeWithClampInTypedef(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
418 {
419     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsAttributeWithClampInTypedefSetter>(*state, thisValue, encodedValue, "attributeWithClampInTypedef");
420 }
421
422 static inline JSValue jsTestTypedefsAttrWithGetterExceptionGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
423 {
424     UNUSED_PARAM(throwScope);
425     UNUSED_PARAM(state);
426     auto& impl = thisObject.wrapped();
427     JSValue result = toJS<IDLLong>(state, throwScope, impl.attrWithGetterException());
428     return result;
429 }
430
431 EncodedJSValue jsTestTypedefsAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
432 {
433     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsAttrWithGetterExceptionGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "attrWithGetterException");
434 }
435
436 static inline bool setJSTestTypedefsAttrWithGetterExceptionSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
437 {
438     UNUSED_PARAM(throwScope);
439     auto& impl = thisObject.wrapped();
440     auto nativeValue = convert<IDLLong>(state, value);
441     RETURN_IF_EXCEPTION(throwScope, false);
442     AttributeSetter::call(state, throwScope, [&] {
443         return impl.setAttrWithGetterException(WTFMove(nativeValue));
444     });
445     return true;
446 }
447
448 bool setJSTestTypedefsAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
449 {
450     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsAttrWithGetterExceptionSetter>(*state, thisValue, encodedValue, "attrWithGetterException");
451 }
452
453 static inline JSValue jsTestTypedefsStringAttrWithGetterExceptionGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
454 {
455     UNUSED_PARAM(throwScope);
456     UNUSED_PARAM(state);
457     auto& impl = thisObject.wrapped();
458     JSValue result = toJS<IDLDOMString>(state, throwScope, impl.stringAttrWithGetterException());
459     return result;
460 }
461
462 EncodedJSValue jsTestTypedefsStringAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
463 {
464     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsStringAttrWithGetterExceptionGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "stringAttrWithGetterException");
465 }
466
467 static inline bool setJSTestTypedefsStringAttrWithGetterExceptionSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
468 {
469     UNUSED_PARAM(throwScope);
470     auto& impl = thisObject.wrapped();
471     auto nativeValue = convert<IDLDOMString>(state, value);
472     RETURN_IF_EXCEPTION(throwScope, false);
473     AttributeSetter::call(state, throwScope, [&] {
474         return impl.setStringAttrWithGetterException(WTFMove(nativeValue));
475     });
476     return true;
477 }
478
479 bool setJSTestTypedefsStringAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
480 {
481     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsStringAttrWithGetterExceptionSetter>(*state, thisValue, encodedValue, "stringAttrWithGetterException");
482 }
483
484 static inline JSValue jsTestTypedefsBufferSourceAttrGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
485 {
486     UNUSED_PARAM(throwScope);
487     UNUSED_PARAM(state);
488     auto& impl = thisObject.wrapped();
489     JSValue result = toJS<IDLUnion<IDLArrayBufferView, IDLArrayBuffer>>(state, *thisObject.globalObject(), impl.bufferSourceAttr());
490     return result;
491 }
492
493 EncodedJSValue jsTestTypedefsBufferSourceAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
494 {
495     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsBufferSourceAttrGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "bufferSourceAttr");
496 }
497
498 static inline bool setJSTestTypedefsBufferSourceAttrSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
499 {
500     UNUSED_PARAM(throwScope);
501     auto& impl = thisObject.wrapped();
502     auto nativeValue = convert<IDLUnion<IDLArrayBufferView, IDLArrayBuffer>>(state, value);
503     RETURN_IF_EXCEPTION(throwScope, false);
504     AttributeSetter::call(state, throwScope, [&] {
505         return impl.setBufferSourceAttr(WTFMove(nativeValue));
506     });
507     return true;
508 }
509
510 bool setJSTestTypedefsBufferSourceAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
511 {
512     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsBufferSourceAttrSetter>(*state, thisValue, encodedValue, "bufferSourceAttr");
513 }
514
515 static inline JSValue jsTestTypedefsDomTimeStampAttrGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
516 {
517     UNUSED_PARAM(throwScope);
518     UNUSED_PARAM(state);
519     auto& impl = thisObject.wrapped();
520     JSValue result = toJS<IDLUnsignedLongLong>(impl.domTimeStampAttr());
521     return result;
522 }
523
524 EncodedJSValue jsTestTypedefsDomTimeStampAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
525 {
526     return IDLAttribute<JSTestTypedefs>::get<jsTestTypedefsDomTimeStampAttrGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "domTimeStampAttr");
527 }
528
529 static inline bool setJSTestTypedefsDomTimeStampAttrSetter(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
530 {
531     UNUSED_PARAM(throwScope);
532     auto& impl = thisObject.wrapped();
533     auto nativeValue = convert<IDLUnsignedLongLong>(state, value);
534     RETURN_IF_EXCEPTION(throwScope, false);
535     AttributeSetter::call(state, throwScope, [&] {
536         return impl.setDomTimeStampAttr(WTFMove(nativeValue));
537     });
538     return true;
539 }
540
541 bool setJSTestTypedefsDomTimeStampAttr(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
542 {
543     return IDLAttribute<JSTestTypedefs>::set<setJSTestTypedefsDomTimeStampAttrSetter>(*state, thisValue, encodedValue, "domTimeStampAttr");
544 }
545
546 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionFuncBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
547 {
548     UNUSED_PARAM(state);
549     UNUSED_PARAM(throwScope);
550     auto& impl = castedThis->wrapped();
551     auto x = state->argument(0).isUndefined() ? Converter<IDLSequence<IDLLong>>::ReturnType{ } : convert<IDLSequence<IDLLong>>(*state, state->uncheckedArgument(0));
552     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
553     impl.func(WTFMove(x));
554     return JSValue::encode(jsUndefined());
555 }
556
557 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFunc(ExecState* state)
558 {
559     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionFuncBody>(*state, "func");
560 }
561
562 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionSetShadowBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
563 {
564     UNUSED_PARAM(state);
565     UNUSED_PARAM(throwScope);
566     auto& impl = castedThis->wrapped();
567     if (UNLIKELY(state->argumentCount() < 3))
568         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
569     auto width = convert<IDLUnrestrictedFloat>(*state, state->uncheckedArgument(0));
570     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
571     auto height = convert<IDLUnrestrictedFloat>(*state, state->uncheckedArgument(1));
572     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
573     auto blur = convert<IDLUnrestrictedFloat>(*state, state->uncheckedArgument(2));
574     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
575     auto color = state->argument(3).isUndefined() ? String() : convert<IDLDOMString>(*state, state->uncheckedArgument(3));
576     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
577     auto alpha = state->argument(4).isUndefined() ? std::optional<Converter<IDLUnrestrictedFloat>::ReturnType>() : std::optional<Converter<IDLUnrestrictedFloat>::ReturnType>(convert<IDLUnrestrictedFloat>(*state, state->uncheckedArgument(4)));
578     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
579     impl.setShadow(WTFMove(width), WTFMove(height), WTFMove(blur), WTFMove(color), WTFMove(alpha));
580     return JSValue::encode(jsUndefined());
581 }
582
583 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSetShadow(ExecState* state)
584 {
585     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionSetShadowBody>(*state, "setShadow");
586 }
587
588 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionMethodWithSequenceArgBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
589 {
590     UNUSED_PARAM(state);
591     UNUSED_PARAM(throwScope);
592     auto& impl = castedThis->wrapped();
593     if (UNLIKELY(state->argumentCount() < 1))
594         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
595     auto sequenceArg = convert<IDLSequence<IDLSerializedScriptValue<SerializedScriptValue>>>(*state, state->uncheckedArgument(0));
596     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
597     return JSValue::encode(toJS<IDLUnsignedLongLong>(impl.methodWithSequenceArg(WTFMove(sequenceArg))));
598 }
599
600 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithSequenceArg(ExecState* state)
601 {
602     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionMethodWithSequenceArgBody>(*state, "methodWithSequenceArg");
603 }
604
605 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionNullableSequenceArgBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
606 {
607     UNUSED_PARAM(state);
608     UNUSED_PARAM(throwScope);
609     auto& impl = castedThis->wrapped();
610     if (UNLIKELY(state->argumentCount() < 1))
611         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
612     auto sequenceArg = convert<IDLNullable<IDLSequence<IDLDOMString>>>(*state, state->uncheckedArgument(0));
613     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
614     impl.nullableSequenceArg(WTFMove(sequenceArg));
615     return JSValue::encode(jsUndefined());
616 }
617
618 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceArg(ExecState* state)
619 {
620     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionNullableSequenceArgBody>(*state, "nullableSequenceArg");
621 }
622
623 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionSequenceOfNullablesArgBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
624 {
625     UNUSED_PARAM(state);
626     UNUSED_PARAM(throwScope);
627     auto& impl = castedThis->wrapped();
628     if (UNLIKELY(state->argumentCount() < 1))
629         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
630     auto sequenceArg = convert<IDLSequence<IDLNullable<IDLDOMString>>>(*state, state->uncheckedArgument(0));
631     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
632     impl.sequenceOfNullablesArg(WTFMove(sequenceArg));
633     return JSValue::encode(jsUndefined());
634 }
635
636 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSequenceOfNullablesArg(ExecState* state)
637 {
638     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionSequenceOfNullablesArgBody>(*state, "sequenceOfNullablesArg");
639 }
640
641 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArgBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
642 {
643     UNUSED_PARAM(state);
644     UNUSED_PARAM(throwScope);
645     auto& impl = castedThis->wrapped();
646     if (UNLIKELY(state->argumentCount() < 1))
647         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
648     auto sequenceArg = convert<IDLNullable<IDLSequence<IDLNullable<IDLDOMString>>>>(*state, state->uncheckedArgument(0));
649     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
650     impl.nullableSequenceOfNullablesArg(WTFMove(sequenceArg));
651     return JSValue::encode(jsUndefined());
652 }
653
654 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArg(ExecState* state)
655 {
656     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArgBody>(*state, "nullableSequenceOfNullablesArg");
657 }
658
659 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArgBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
660 {
661     UNUSED_PARAM(state);
662     UNUSED_PARAM(throwScope);
663     auto& impl = castedThis->wrapped();
664     if (UNLIKELY(state->argumentCount() < 1))
665         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
666     auto sequenceArg = convert<IDLNullable<IDLSequence<IDLUnion<IDLDOMString, IDLSequence<IDLDOMString>>>>>(*state, state->uncheckedArgument(0));
667     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
668     impl.nullableSequenceOfUnionsArg(WTFMove(sequenceArg));
669     return JSValue::encode(jsUndefined());
670 }
671
672 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArg(ExecState* state)
673 {
674     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArgBody>(*state, "nullableSequenceOfUnionsArg");
675 }
676
677 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionUnionArgBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
678 {
679     UNUSED_PARAM(state);
680     UNUSED_PARAM(throwScope);
681     auto& impl = castedThis->wrapped();
682     if (UNLIKELY(state->argumentCount() < 1))
683         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
684     auto unionArg = convert<IDLUnion<IDLDOMString, IDLLong>>(*state, state->uncheckedArgument(0));
685     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
686     impl.unionArg(WTFMove(unionArg));
687     return JSValue::encode(jsUndefined());
688 }
689
690 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionUnionArg(ExecState* state)
691 {
692     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionUnionArgBody>(*state, "unionArg");
693 }
694
695 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionFuncWithClampBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
696 {
697     UNUSED_PARAM(state);
698     UNUSED_PARAM(throwScope);
699     auto& impl = castedThis->wrapped();
700     if (UNLIKELY(state->argumentCount() < 1))
701         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
702     auto arg1 = convert<IDLClampAdaptor<IDLUnsignedLongLong>>(*state, state->uncheckedArgument(0));
703     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
704     auto arg2 = state->argument(1).isUndefined() ? std::optional<Converter<IDLClampAdaptor<IDLUnsignedLongLong>>::ReturnType>() : std::optional<Converter<IDLClampAdaptor<IDLUnsignedLongLong>>::ReturnType>(convert<IDLClampAdaptor<IDLUnsignedLongLong>>(*state, state->uncheckedArgument(1)));
705     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
706     impl.funcWithClamp(WTFMove(arg1), WTFMove(arg2));
707     return JSValue::encode(jsUndefined());
708 }
709
710 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClamp(ExecState* state)
711 {
712     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionFuncWithClampBody>(*state, "funcWithClamp");
713 }
714
715 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
716 {
717     UNUSED_PARAM(state);
718     UNUSED_PARAM(throwScope);
719     auto& impl = castedThis->wrapped();
720     if (UNLIKELY(state->argumentCount() < 1))
721         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
722     auto arg = convert<IDLClampAdaptor<IDLLong>>(*state, state->uncheckedArgument(0));
723     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
724     impl.funcWithClampInTypedef(WTFMove(arg));
725     return JSValue::encode(jsUndefined());
726 }
727
728 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClampInTypedef(ExecState* state)
729 {
730     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefBody>(*state, "funcWithClampInTypedef");
731 }
732
733 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionPointFunctionBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
734 {
735     UNUSED_PARAM(state);
736     UNUSED_PARAM(throwScope);
737     auto& impl = castedThis->wrapped();
738     return JSValue::encode(toJS<IDLInterface<SVGPoint>>(*state, *castedThis->globalObject(), impl.pointFunction()));
739 }
740
741 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionPointFunction(ExecState* state)
742 {
743     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionPointFunctionBody>(*state, "pointFunction");
744 }
745
746 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionStringSequenceFunctionBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
747 {
748     UNUSED_PARAM(state);
749     UNUSED_PARAM(throwScope);
750     auto& impl = castedThis->wrapped();
751     if (UNLIKELY(state->argumentCount() < 1))
752         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
753     auto values = convert<IDLSequence<IDLDOMString>>(*state, state->uncheckedArgument(0));
754     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
755     return JSValue::encode(toJS<IDLSequence<IDLDOMString>>(*state, *castedThis->globalObject(), throwScope, impl.stringSequenceFunction(WTFMove(values))));
756 }
757
758 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringSequenceFunction(ExecState* state)
759 {
760     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionStringSequenceFunctionBody>(*state, "stringSequenceFunction");
761 }
762
763 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionStringSequenceFunction2Body(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
764 {
765     UNUSED_PARAM(state);
766     UNUSED_PARAM(throwScope);
767     auto& impl = castedThis->wrapped();
768     if (UNLIKELY(state->argumentCount() < 1))
769         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
770     auto values = convert<IDLSequence<IDLDOMString>>(*state, state->uncheckedArgument(0));
771     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
772     return JSValue::encode(toJS<IDLSequence<IDLDOMString>>(*state, *castedThis->globalObject(), throwScope, impl.stringSequenceFunction2(WTFMove(values))));
773 }
774
775 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringSequenceFunction2(ExecState* state)
776 {
777     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionStringSequenceFunction2Body>(*state, "stringSequenceFunction2");
778 }
779
780 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresIncludeBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
781 {
782     UNUSED_PARAM(state);
783     UNUSED_PARAM(throwScope);
784     auto& impl = castedThis->wrapped();
785     if (UNLIKELY(state->argumentCount() < 1))
786         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
787     auto sequenceArg = convert<IDLSequence<IDLInterface<TestEventTarget>>>(*state, state->uncheckedArgument(0));
788     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
789     return JSValue::encode(toJS<IDLBoolean>(impl.callWithSequenceThatRequiresInclude(WTFMove(sequenceArg))));
790 }
791
792 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude(ExecState* state)
793 {
794     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresIncludeBody>(*state, "callWithSequenceThatRequiresInclude");
795 }
796
797 static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionMethodWithExceptionBody(JSC::ExecState* state, typename IDLOperation<JSTestTypedefs>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
798 {
799     UNUSED_PARAM(state);
800     UNUSED_PARAM(throwScope);
801     auto& impl = castedThis->wrapped();
802     propagateException(*state, throwScope, impl.methodWithException());
803     return JSValue::encode(jsUndefined());
804 }
805
806 EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithException(ExecState* state)
807 {
808     return IDLOperation<JSTestTypedefs>::call<jsTestTypedefsPrototypeFunctionMethodWithExceptionBody>(*state, "methodWithException");
809 }
810
811 bool JSTestTypedefsOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
812 {
813     UNUSED_PARAM(handle);
814     UNUSED_PARAM(visitor);
815     return false;
816 }
817
818 void JSTestTypedefsOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
819 {
820     auto* jsTestTypedefs = static_cast<JSTestTypedefs*>(handle.slot()->asCell());
821     auto& world = *static_cast<DOMWrapperWorld*>(context);
822     uncacheWrapper(world, &jsTestTypedefs->wrapped(), jsTestTypedefs);
823 }
824
825 #if ENABLE(BINDING_INTEGRITY)
826 #if PLATFORM(WIN)
827 #pragma warning(disable: 4483)
828 extern "C" { extern void (*const __identifier("??_7TestTypedefs@WebCore@@6B@")[])(); }
829 #else
830 extern "C" { extern void* _ZTVN7WebCore12TestTypedefsE[]; }
831 #endif
832 #endif
833
834 JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<TestTypedefs>&& impl)
835 {
836
837 #if ENABLE(BINDING_INTEGRITY)
838     void* actualVTablePointer = *(reinterpret_cast<void**>(impl.ptr()));
839 #if PLATFORM(WIN)
840     void* expectedVTablePointer = reinterpret_cast<void*>(__identifier("??_7TestTypedefs@WebCore@@6B@"));
841 #else
842     void* expectedVTablePointer = &_ZTVN7WebCore12TestTypedefsE[2];
843 #endif
844
845     // If this fails TestTypedefs does not have a vtable, so you need to add the
846     // ImplementationLacksVTable attribute to the interface definition
847     static_assert(std::is_polymorphic<TestTypedefs>::value, "TestTypedefs is not polymorphic");
848
849     // If you hit this assertion you either have a use after free bug, or
850     // TestTypedefs has subclasses. If TestTypedefs has subclasses that get passed
851     // to toJS() we currently require TestTypedefs you to opt out of binding hardening
852     // by adding the SkipVTableValidation attribute to the interface IDL definition
853     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
854 #endif
855     return createWrapper<TestTypedefs>(globalObject, WTFMove(impl));
856 }
857
858 JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestTypedefs& impl)
859 {
860     return wrap(state, globalObject, impl);
861 }
862
863 TestTypedefs* JSTestTypedefs::toWrapped(JSC::VM& vm, JSC::JSValue value)
864 {
865     if (auto* wrapper = jsDynamicDowncast<JSTestTypedefs*>(vm, value))
866         return &wrapper->wrapped();
867     return nullptr;
868 }
869
870 }