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