[WebIDL] Replace general inclusion of JSDOMConvert.h with inclusion of individual...
[WebKit.git] / Source / WebCore / bindings / scripts / test / JS / JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.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 "JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h"
23
24 #include "JSDOMAbstractOperations.h"
25 #include "JSDOMAttribute.h"
26 #include "JSDOMBinding.h"
27 #include "JSDOMConstructorNotConstructable.h"
28 #include "JSDOMConvertStrings.h"
29 #include "JSDOMExceptionHandling.h"
30 #include "JSDOMOperation.h"
31 #include "JSDOMWrapperCache.h"
32 #include <runtime/FunctionPrototype.h>
33 #include <runtime/JSCInlines.h>
34 #include <wtf/GetPtr.h>
35
36 using namespace JSC;
37
38 namespace WebCore {
39
40 // Functions
41
42 JSC::EncodedJSValue JSC_HOST_CALL jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsInstanceFunctionUnforgeableOperation(JSC::ExecState*);
43
44 // Attributes
45
46 JSC::EncodedJSValue jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
47 bool setJSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
48 JSC::EncodedJSValue jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsUnforgeableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
49
50 class JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype : public JSC::JSNonFinalObject {
51 public:
52     using Base = JSC::JSNonFinalObject;
53     static JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
54     {
55         JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype>(vm.heap)) JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype(vm, globalObject, structure);
56         ptr->finishCreation(vm);
57         return ptr;
58     }
59
60     DECLARE_INFO;
61     static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
62     {
63         return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
64     }
65
66 private:
67     JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
68         : JSC::JSNonFinalObject(vm, structure)
69     {
70     }
71
72     void finishCreation(JSC::VM&);
73 };
74
75 using JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor = JSDOMConstructorNotConstructable<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>;
76
77 /* Hash table */
78
79 static const struct CompactHashIndex JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsTableIndex[4] = {
80     { -1, -1 },
81     { 1, -1 },
82     { -1, -1 },
83     { 0, -1 },
84 };
85
86
87 static const HashTableValue JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsTableValues[] =
88 {
89     { "unforgeableAttribute", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsUnforgeableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
90     { "unforgeableOperation", DontDelete | ReadOnly | JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsInstanceFunctionUnforgeableOperation), (intptr_t) (0) } },
91 };
92
93 static const HashTable JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsTable = { 2, 3, true, JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsTableValues, JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsTableIndex };
94 template<> JSValue JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
95 {
96     UNUSED_PARAM(vm);
97     return globalObject.functionPrototype();
98 }
99
100 template<> void JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
101 {
102     putDirect(vm, vm.propertyNames->prototype, JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);
103     putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins"))), ReadOnly | DontEnum);
104     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
105 }
106
107 template<> const ClassInfo JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor::s_info = { "TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor) };
108
109 /* Hash table for prototype */
110
111 static const HashTableValue JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototypeTableValues[] =
112 {
113     { "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor) } },
114 };
115
116 const ClassInfo JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::s_info = { "TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype) };
117
118 void JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::finishCreation(VM& vm)
119 {
120     Base::finishCreation(vm);
121     reifyStaticProperties(vm, JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototypeTableValues, *this);
122 }
123
124 const ClassInfo JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::s_info = { "TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins", &Base::s_info, &JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsTable, nullptr, CREATE_METHOD_TABLE(JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins) };
125
126 JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>&& impl)
127     : JSDOMWrapper<TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>(structure, globalObject, WTFMove(impl))
128 {
129 }
130
131 void JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::finishCreation(VM& vm)
132 {
133     Base::finishCreation(vm);
134     ASSERT(inherits(vm, info()));
135
136 }
137
138 JSObject* JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
139 {
140     return JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::create(vm, &globalObject, JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
141 }
142
143 JSObject* JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::prototype(VM& vm, JSDOMGlobalObject& globalObject)
144 {
145     return getDOMPrototype<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>(vm, globalObject);
146 }
147
148 JSValue JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getConstructor(VM& vm, const JSGlobalObject* globalObject)
149 {
150     return getDOMConstructor<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
151 }
152
153 void JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::destroy(JSC::JSCell* cell)
154 {
155     JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins* thisObject = static_cast<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins*>(cell);
156     thisObject->JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::~JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins();
157 }
158
159 bool JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
160 {
161     auto* thisObject = jsCast<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins*>(object);
162     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
163     using GetterIDLType = IDLDOMString;
164     auto getterFunctor = [] (auto& thisObject, auto propertyName) -> std::optional<typename GetterIDLType::ImplementationType> {
165         auto result = thisObject.wrapped().namedItem(propertyNameToAtomicString(propertyName));
166         if (!GetterIDLType::isNullValue(result))
167             return typename GetterIDLType::ImplementationType { GetterIDLType::extractValueFromNullable(result) };
168         return std::nullopt;
169     };
170     if (auto namedProperty = accessVisibleNamedProperty<OverrideBuiltins::Yes>(*state, *thisObject, propertyName, getterFunctor)) {
171         auto value = toJS<IDLDOMString>(*state, WTFMove(namedProperty.value()));
172         slot.setValue(thisObject, 0, value);
173         return true;
174     }
175     return JSObject::getOwnPropertySlot(object, state, propertyName, slot);
176 }
177
178 bool JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertySlotByIndex(JSObject* object, ExecState* state, unsigned index, PropertySlot& slot)
179 {
180     auto* thisObject = jsCast<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins*>(object);
181     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
182     auto propertyName = Identifier::from(state, index);
183     using GetterIDLType = IDLDOMString;
184     auto getterFunctor = [] (auto& thisObject, auto propertyName) -> std::optional<typename GetterIDLType::ImplementationType> {
185         auto result = thisObject.wrapped().namedItem(propertyNameToAtomicString(propertyName));
186         if (!GetterIDLType::isNullValue(result))
187             return typename GetterIDLType::ImplementationType { GetterIDLType::extractValueFromNullable(result) };
188         return std::nullopt;
189     };
190     if (auto namedProperty = accessVisibleNamedProperty<OverrideBuiltins::Yes>(*state, *thisObject, propertyName, getterFunctor)) {
191         auto value = toJS<IDLDOMString>(*state, WTFMove(namedProperty.value()));
192         slot.setValue(thisObject, 0, value);
193         return true;
194     }
195     return JSObject::getOwnPropertySlotByIndex(object, state, index, slot);
196 }
197
198 void JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)
199 {
200     auto* thisObject = jsCast<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins*>(object);
201     ASSERT_GC_OBJECT_INHERITS(object, info());
202     for (auto& propertyName : thisObject->wrapped().supportedPropertyNames())
203         propertyNames.add(Identifier::fromString(state, propertyName));
204     JSObject::getOwnPropertyNames(object, state, propertyNames, mode);
205 }
206
207 bool JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::put(JSCell* cell, ExecState* state, PropertyName propertyName, JSValue value, PutPropertySlot& putPropertySlot)
208 {
209     auto* thisObject = jsCast<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins*>(cell);
210     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
211
212     if (!propertyName.isSymbol()) {
213         auto throwScope = DECLARE_THROW_SCOPE(state->vm());
214         auto nativeValue = convert<IDLDOMString>(*state, value);
215         RETURN_IF_EXCEPTION(throwScope, true);
216         thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));
217         return true;
218     }
219
220     return JSObject::put(thisObject, state, propertyName, value, putPropertySlot);
221 }
222
223 bool JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::putByIndex(JSCell* cell, ExecState* state, unsigned index, JSValue value, bool)
224 {
225     auto* thisObject = jsCast<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins*>(cell);
226     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
227
228     auto propertyName = Identifier::from(state, index);
229     auto throwScope = DECLARE_THROW_SCOPE(state->vm());
230     auto nativeValue = convert<IDLDOMString>(*state, value);
231     RETURN_IF_EXCEPTION(throwScope, true);
232     thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));
233     return true;
234 }
235
236 bool JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::defineOwnProperty(JSObject* object, ExecState* state, PropertyName propertyName, const PropertyDescriptor& propertyDescriptor, bool shouldThrow)
237 {
238     auto* thisObject = jsCast<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins*>(object);
239     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
240
241     if (!propertyName.isSymbol()) {
242 static bool isUnforgeablePropertyName(PropertyName propertyName)
243 {
244     return propertyName == "unforgeableAttribute" || propertyName == "unforgeableOperation";
245 }
246
247         if (!isUnforgeablePropertyName(propertyName)) {
248             if (!propertyDescriptor.isDataDescriptor())
249                 return false;
250             auto throwScope = DECLARE_THROW_SCOPE(state->vm());
251             auto nativeValue = convert<IDLDOMString>(*state, propertyDescriptor.value());
252             RETURN_IF_EXCEPTION(throwScope, true);
253             thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));
254             return true;
255         }
256     }
257
258     PropertyDescriptor newPropertyDescriptor = propertyDescriptor;
259     newPropertyDescriptor.setConfigurable(true);
260     return JSObject::defineOwnProperty(object, state, propertyName, newPropertyDescriptor, shouldThrow);
261 }
262
263 template<> inline JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins* IDLAttribute<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>::cast(ExecState& state, EncodedJSValue thisValue)
264 {
265     return jsDynamicDowncast<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins*>(state.vm(), JSValue::decode(thisValue));
266 }
267
268 template<> inline JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins* IDLOperation<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>::cast(ExecState& state)
269 {
270     return jsDynamicDowncast<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins*>(state.vm(), state.thisValue());
271 }
272
273 EncodedJSValue jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
274 {
275     VM& vm = state->vm();
276     auto throwScope = DECLARE_THROW_SCOPE(vm);
277     auto* prototype = jsDynamicDowncast<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype*>(vm, JSValue::decode(thisValue));
278     if (UNLIKELY(!prototype))
279         return throwVMTypeError(state, throwScope);
280     return JSValue::encode(JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getConstructor(state->vm(), prototype->globalObject()));
281 }
282
283 bool setJSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
284 {
285     VM& vm = state->vm();
286     auto throwScope = DECLARE_THROW_SCOPE(vm);
287     auto* prototype = jsDynamicDowncast<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype*>(vm, JSValue::decode(thisValue));
288     if (UNLIKELY(!prototype)) {
289         throwVMTypeError(state, throwScope);
290         return false;
291     }
292     // Shadowing a built-in constructor
293     return prototype->putDirect(state->vm(), state->propertyNames().constructor, JSValue::decode(encodedValue));
294 }
295
296 static inline JSValue jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsUnforgeableAttributeGetter(ExecState& state, JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins& thisObject, ThrowScope& throwScope)
297 {
298     UNUSED_PARAM(throwScope);
299     UNUSED_PARAM(state);
300     auto& impl = thisObject.wrapped();
301     JSValue result = toJS<IDLDOMString>(state, impl.unforgeableAttribute());
302     return result;
303 }
304
305 EncodedJSValue jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsUnforgeableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
306 {
307     return IDLAttribute<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>::get<jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsUnforgeableAttributeGetter>(*state, thisValue, "unforgeableAttribute");
308 }
309
310 static inline JSC::EncodedJSValue jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsInstanceFunctionUnforgeableOperationBody(JSC::ExecState* state, typename IDLOperation<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
311 {
312     UNUSED_PARAM(state);
313     UNUSED_PARAM(throwScope);
314     auto& impl = castedThis->wrapped();
315     impl.unforgeableOperation();
316     return JSValue::encode(jsUndefined());
317 }
318
319 EncodedJSValue JSC_HOST_CALL jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsInstanceFunctionUnforgeableOperation(ExecState* state)
320 {
321     return IDLOperation<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>::call<jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsInstanceFunctionUnforgeableOperationBody>(*state, "unforgeableOperation");
322 }
323
324 bool JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
325 {
326     UNUSED_PARAM(handle);
327     UNUSED_PARAM(visitor);
328     return false;
329 }
330
331 void JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
332 {
333     auto* jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins = static_cast<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins*>(handle.slot()->asCell());
334     auto& world = *static_cast<DOMWrapperWorld*>(context);
335     uncacheWrapper(world, &jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins->wrapped(), jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins);
336 }
337
338 #if ENABLE(BINDING_INTEGRITY)
339 #if PLATFORM(WIN)
340 #pragma warning(disable: 4483)
341 extern "C" { extern void (*const __identifier("??_7TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins@WebCore@@6B@")[])(); }
342 #else
343 extern "C" { extern void* _ZTVN7WebCore58TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsE[]; }
344 #endif
345 #endif
346
347 JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>&& impl)
348 {
349
350 #if ENABLE(BINDING_INTEGRITY)
351     void* actualVTablePointer = *(reinterpret_cast<void**>(impl.ptr()));
352 #if PLATFORM(WIN)
353     void* expectedVTablePointer = reinterpret_cast<void*>(__identifier("??_7TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins@WebCore@@6B@"));
354 #else
355     void* expectedVTablePointer = &_ZTVN7WebCore58TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsE[2];
356 #if COMPILER(CLANG)
357     // If this fails TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins does not have a vtable, so you need to add the
358     // ImplementationLacksVTable attribute to the interface definition
359     static_assert(__is_polymorphic(TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins), "TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins is not polymorphic");
360 #endif
361 #endif
362     // If you hit this assertion you either have a use after free bug, or
363     // TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins has subclasses. If TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins has subclasses that get passed
364     // to toJS() we currently require TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins you to opt out of binding hardening
365     // by adding the SkipVTableValidation attribute to the interface IDL definition
366     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
367 #endif
368     return createWrapper<TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>(globalObject, WTFMove(impl));
369 }
370
371 JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins& impl)
372 {
373     return wrap(state, globalObject, impl);
374 }
375
376 TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins* JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::toWrapped(JSC::VM& vm, JSC::JSValue value)
377 {
378     if (auto* wrapper = jsDynamicDowncast<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins*>(vm, value))
379         return &wrapper->wrapped();
380     return nullptr;
381 }
382
383 }