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