All prototypes should call didBecomePrototype()
[WebKit-https.git] / Source / WebCore / bindings / scripts / test / JS / JSTestCEReactions.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 "JSTestCEReactions.h"
23
24 #include "CustomElementReactionQueue.h"
25 #include "HTMLNames.h"
26 #include "JSDOMAttribute.h"
27 #include "JSDOMBinding.h"
28 #include "JSDOMConstructorNotConstructable.h"
29 #include "JSDOMConvertInterface.h"
30 #include "JSDOMConvertStrings.h"
31 #include "JSDOMExceptionHandling.h"
32 #include "JSDOMGlobalObject.h"
33 #include "JSDOMOperation.h"
34 #include "JSDOMWrapperCache.h"
35 #include "JSTestCEReactionsStringifier.h"
36 #include "ScriptExecutionContext.h"
37 #include <JavaScriptCore/FunctionPrototype.h>
38 #include <JavaScriptCore/HeapSnapshotBuilder.h>
39 #include <JavaScriptCore/JSCInlines.h>
40 #include <wtf/GetPtr.h>
41 #include <wtf/PointerPreparations.h>
42 #include <wtf/URL.h>
43
44
45 namespace WebCore {
46 using namespace JSC;
47
48 // Functions
49
50 JSC::EncodedJSValue JSC_HOST_CALL jsTestCEReactionsPrototypeFunctionMethodWithCEReactions(JSC::ExecState*);
51 JSC::EncodedJSValue JSC_HOST_CALL jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsNotNeeded(JSC::ExecState*);
52
53 // Attributes
54
55 JSC::EncodedJSValue jsTestCEReactionsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
56 bool setJSTestCEReactionsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
57 JSC::EncodedJSValue jsTestCEReactionsAttributeWithCEReactions(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
58 bool setJSTestCEReactionsAttributeWithCEReactions(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
59 JSC::EncodedJSValue jsTestCEReactionsReflectAttributeWithCEReactions(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
60 bool setJSTestCEReactionsReflectAttributeWithCEReactions(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
61 JSC::EncodedJSValue jsTestCEReactionsStringifierAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
62 bool setJSTestCEReactionsStringifierAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
63 JSC::EncodedJSValue jsTestCEReactionsAttributeWithCEReactionsNotNeeded(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
64 bool setJSTestCEReactionsAttributeWithCEReactionsNotNeeded(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
65 JSC::EncodedJSValue jsTestCEReactionsReflectAttributeWithCEReactionsNotNeeded(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
66 bool setJSTestCEReactionsReflectAttributeWithCEReactionsNotNeeded(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
67 JSC::EncodedJSValue jsTestCEReactionsStringifierAttributeNotNeeded(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
68 bool setJSTestCEReactionsStringifierAttributeNotNeeded(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
69
70 class JSTestCEReactionsPrototype : public JSC::JSNonFinalObject {
71 public:
72     using Base = JSC::JSNonFinalObject;
73     static JSTestCEReactionsPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
74     {
75         JSTestCEReactionsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestCEReactionsPrototype>(vm.heap)) JSTestCEReactionsPrototype(vm, globalObject, structure);
76         ptr->finishCreation(vm);
77         return ptr;
78     }
79
80     DECLARE_INFO;
81     static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
82     {
83         return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
84     }
85
86 private:
87     JSTestCEReactionsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
88         : JSC::JSNonFinalObject(vm, structure)
89     {
90         didBecomePrototype();
91     }
92
93     void finishCreation(JSC::VM&);
94 };
95
96 using JSTestCEReactionsConstructor = JSDOMConstructorNotConstructable<JSTestCEReactions>;
97
98 template<> JSValue JSTestCEReactionsConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
99 {
100     UNUSED_PARAM(vm);
101     return globalObject.functionPrototype();
102 }
103
104 template<> void JSTestCEReactionsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
105 {
106     putDirect(vm, vm.propertyNames->prototype, JSTestCEReactions::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
107     putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestCEReactions"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
108     putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
109 }
110
111 template<> const ClassInfo JSTestCEReactionsConstructor::s_info = { "TestCEReactions", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSTestCEReactionsConstructor) };
112
113 /* Hash table for prototype */
114
115 static const HashTableValue JSTestCEReactionsPrototypeTableValues[] =
116 {
117     { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactionsConstructor) } },
118     { "attributeWithCEReactions", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsAttributeWithCEReactions), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactionsAttributeWithCEReactions) } },
119     { "reflectAttributeWithCEReactions", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsReflectAttributeWithCEReactions), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactionsReflectAttributeWithCEReactions) } },
120     { "stringifierAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsStringifierAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactionsStringifierAttribute) } },
121     { "attributeWithCEReactionsNotNeeded", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsAttributeWithCEReactionsNotNeeded), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactionsAttributeWithCEReactionsNotNeeded) } },
122     { "reflectAttributeWithCEReactionsNotNeeded", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsReflectAttributeWithCEReactionsNotNeeded), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactionsReflectAttributeWithCEReactionsNotNeeded) } },
123     { "stringifierAttributeNotNeeded", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsStringifierAttributeNotNeeded), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactionsStringifierAttributeNotNeeded) } },
124     { "methodWithCEReactions", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestCEReactionsPrototypeFunctionMethodWithCEReactions), (intptr_t) (0) } },
125     { "methodWithCEReactionsNotNeeded", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsNotNeeded), (intptr_t) (0) } },
126 };
127
128 const ClassInfo JSTestCEReactionsPrototype::s_info = { "TestCEReactionsPrototype", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSTestCEReactionsPrototype) };
129
130 void JSTestCEReactionsPrototype::finishCreation(VM& vm)
131 {
132     Base::finishCreation(vm);
133     reifyStaticProperties(vm, JSTestCEReactions::info(), JSTestCEReactionsPrototypeTableValues, *this);
134 }
135
136 const ClassInfo JSTestCEReactions::s_info = { "TestCEReactions", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSTestCEReactions) };
137
138 JSTestCEReactions::JSTestCEReactions(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestCEReactions>&& impl)
139     : JSDOMWrapper<TestCEReactions>(structure, globalObject, WTFMove(impl))
140 {
141 }
142
143 void JSTestCEReactions::finishCreation(VM& vm)
144 {
145     Base::finishCreation(vm);
146     ASSERT(inherits(vm, info()));
147
148 }
149
150 JSObject* JSTestCEReactions::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
151 {
152     return JSTestCEReactionsPrototype::create(vm, &globalObject, JSTestCEReactionsPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
153 }
154
155 JSObject* JSTestCEReactions::prototype(VM& vm, JSDOMGlobalObject& globalObject)
156 {
157     return getDOMPrototype<JSTestCEReactions>(vm, globalObject);
158 }
159
160 JSValue JSTestCEReactions::getConstructor(VM& vm, const JSGlobalObject* globalObject)
161 {
162     return getDOMConstructor<JSTestCEReactionsConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
163 }
164
165 void JSTestCEReactions::destroy(JSC::JSCell* cell)
166 {
167     JSTestCEReactions* thisObject = static_cast<JSTestCEReactions*>(cell);
168     thisObject->JSTestCEReactions::~JSTestCEReactions();
169 }
170
171 template<> inline JSTestCEReactions* IDLAttribute<JSTestCEReactions>::cast(ExecState& state, EncodedJSValue thisValue)
172 {
173     return jsDynamicCast<JSTestCEReactions*>(state.vm(), JSValue::decode(thisValue));
174 }
175
176 template<> inline JSTestCEReactions* IDLOperation<JSTestCEReactions>::cast(ExecState& state)
177 {
178     return jsDynamicCast<JSTestCEReactions*>(state.vm(), state.thisValue());
179 }
180
181 EncodedJSValue jsTestCEReactionsConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
182 {
183     VM& vm = state->vm();
184     auto throwScope = DECLARE_THROW_SCOPE(vm);
185     auto* prototype = jsDynamicCast<JSTestCEReactionsPrototype*>(vm, JSValue::decode(thisValue));
186     if (UNLIKELY(!prototype))
187         return throwVMTypeError(state, throwScope);
188     return JSValue::encode(JSTestCEReactions::getConstructor(state->vm(), prototype->globalObject()));
189 }
190
191 bool setJSTestCEReactionsConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
192 {
193     VM& vm = state->vm();
194     auto throwScope = DECLARE_THROW_SCOPE(vm);
195     auto* prototype = jsDynamicCast<JSTestCEReactionsPrototype*>(vm, JSValue::decode(thisValue));
196     if (UNLIKELY(!prototype)) {
197         throwVMTypeError(state, throwScope);
198         return false;
199     }
200     // Shadowing a built-in constructor
201     return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));
202 }
203
204 static inline JSValue jsTestCEReactionsAttributeWithCEReactionsGetter(ExecState& state, JSTestCEReactions& thisObject, ThrowScope& throwScope)
205 {
206     UNUSED_PARAM(throwScope);
207     UNUSED_PARAM(state);
208     auto& impl = thisObject.wrapped();
209     JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithCEReactions());
210     return result;
211 }
212
213 EncodedJSValue jsTestCEReactionsAttributeWithCEReactions(ExecState* state, EncodedJSValue thisValue, PropertyName)
214 {
215     return IDLAttribute<JSTestCEReactions>::get<jsTestCEReactionsAttributeWithCEReactionsGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "attributeWithCEReactions");
216 }
217
218 static inline bool setJSTestCEReactionsAttributeWithCEReactionsSetter(ExecState& state, JSTestCEReactions& thisObject, JSValue value, ThrowScope& throwScope)
219 {
220     UNUSED_PARAM(throwScope);
221     CustomElementReactionStack customElementReactionStack(state);
222     auto& impl = thisObject.wrapped();
223     auto nativeValue = convert<IDLDOMString>(state, value);
224     RETURN_IF_EXCEPTION(throwScope, false);
225     AttributeSetter::call(state, throwScope, [&] {
226         return impl.setAttributeWithCEReactions(WTFMove(nativeValue));
227     });
228     return true;
229 }
230
231 bool setJSTestCEReactionsAttributeWithCEReactions(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
232 {
233     return IDLAttribute<JSTestCEReactions>::set<setJSTestCEReactionsAttributeWithCEReactionsSetter>(*state, thisValue, encodedValue, "attributeWithCEReactions");
234 }
235
236 static inline JSValue jsTestCEReactionsReflectAttributeWithCEReactionsGetter(ExecState& state, JSTestCEReactions& thisObject, ThrowScope& throwScope)
237 {
238     UNUSED_PARAM(throwScope);
239     UNUSED_PARAM(state);
240     auto& impl = thisObject.wrapped();
241     JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::reflectattributewithcereactionsAttr));
242     return result;
243 }
244
245 EncodedJSValue jsTestCEReactionsReflectAttributeWithCEReactions(ExecState* state, EncodedJSValue thisValue, PropertyName)
246 {
247     return IDLAttribute<JSTestCEReactions>::get<jsTestCEReactionsReflectAttributeWithCEReactionsGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "reflectAttributeWithCEReactions");
248 }
249
250 static inline bool setJSTestCEReactionsReflectAttributeWithCEReactionsSetter(ExecState& state, JSTestCEReactions& thisObject, JSValue value, ThrowScope& throwScope)
251 {
252     UNUSED_PARAM(throwScope);
253     CustomElementReactionStack customElementReactionStack(state);
254     auto& impl = thisObject.wrapped();
255     auto nativeValue = convert<IDLDOMString>(state, value);
256     RETURN_IF_EXCEPTION(throwScope, false);
257     AttributeSetter::call(state, throwScope, [&] {
258         return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectattributewithcereactionsAttr, WTFMove(nativeValue));
259     });
260     return true;
261 }
262
263 bool setJSTestCEReactionsReflectAttributeWithCEReactions(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
264 {
265     return IDLAttribute<JSTestCEReactions>::set<setJSTestCEReactionsReflectAttributeWithCEReactionsSetter>(*state, thisValue, encodedValue, "reflectAttributeWithCEReactions");
266 }
267
268 static inline JSValue jsTestCEReactionsStringifierAttributeGetter(ExecState& state, JSTestCEReactions& thisObject, ThrowScope& throwScope)
269 {
270     UNUSED_PARAM(throwScope);
271     UNUSED_PARAM(state);
272     auto& impl = thisObject.wrapped();
273     JSValue result = toJS<IDLInterface<TestCEReactionsStringifier>>(state, *thisObject.globalObject(), throwScope, impl.stringifierAttribute());
274     return result;
275 }
276
277 EncodedJSValue jsTestCEReactionsStringifierAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
278 {
279     return IDLAttribute<JSTestCEReactions>::get<jsTestCEReactionsStringifierAttributeGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "stringifierAttribute");
280 }
281
282 static inline bool setJSTestCEReactionsStringifierAttributeSetter(ExecState& state, JSTestCEReactions& thisObject, JSValue value, ThrowScope& throwScope)
283 {
284     UNUSED_PARAM(throwScope);
285     auto id = Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("stringifierAttribute"), strlen("stringifierAttribute"));
286     auto valueToForwardTo = thisObject.get(&state, id);
287     RETURN_IF_EXCEPTION(throwScope, false);
288     if (UNLIKELY(!valueToForwardTo.isObject())) {
289         throwTypeError(&state, throwScope);
290         return false;
291     }
292     auto forwardId = Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("value"), strlen("value"));
293     PutPropertySlot slot(valueToForwardTo, false);
294     asObject(valueToForwardTo)->methodTable(state.vm())->put(asObject(valueToForwardTo), &state, forwardId, value, slot);
295     RETURN_IF_EXCEPTION(throwScope, false);
296     return true;
297 }
298
299 bool setJSTestCEReactionsStringifierAttribute(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
300 {
301     return IDLAttribute<JSTestCEReactions>::set<setJSTestCEReactionsStringifierAttributeSetter>(*state, thisValue, encodedValue, "stringifierAttribute");
302 }
303
304 static inline JSValue jsTestCEReactionsAttributeWithCEReactionsNotNeededGetter(ExecState& state, JSTestCEReactions& thisObject, ThrowScope& throwScope)
305 {
306     UNUSED_PARAM(throwScope);
307     UNUSED_PARAM(state);
308     auto& impl = thisObject.wrapped();
309     JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithCEReactionsNotNeeded());
310     return result;
311 }
312
313 EncodedJSValue jsTestCEReactionsAttributeWithCEReactionsNotNeeded(ExecState* state, EncodedJSValue thisValue, PropertyName)
314 {
315     return IDLAttribute<JSTestCEReactions>::get<jsTestCEReactionsAttributeWithCEReactionsNotNeededGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "attributeWithCEReactionsNotNeeded");
316 }
317
318 static inline bool setJSTestCEReactionsAttributeWithCEReactionsNotNeededSetter(ExecState& state, JSTestCEReactions& thisObject, JSValue value, ThrowScope& throwScope)
319 {
320     UNUSED_PARAM(throwScope);
321     CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
322     auto& impl = thisObject.wrapped();
323     auto nativeValue = convert<IDLDOMString>(state, value);
324     RETURN_IF_EXCEPTION(throwScope, false);
325     AttributeSetter::call(state, throwScope, [&] {
326         return impl.setAttributeWithCEReactionsNotNeeded(WTFMove(nativeValue));
327     });
328     return true;
329 }
330
331 bool setJSTestCEReactionsAttributeWithCEReactionsNotNeeded(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
332 {
333     return IDLAttribute<JSTestCEReactions>::set<setJSTestCEReactionsAttributeWithCEReactionsNotNeededSetter>(*state, thisValue, encodedValue, "attributeWithCEReactionsNotNeeded");
334 }
335
336 static inline JSValue jsTestCEReactionsReflectAttributeWithCEReactionsNotNeededGetter(ExecState& state, JSTestCEReactions& thisObject, ThrowScope& throwScope)
337 {
338     UNUSED_PARAM(throwScope);
339     UNUSED_PARAM(state);
340     auto& impl = thisObject.wrapped();
341     JSValue result = toJS<IDLDOMString>(state, throwScope, impl.attributeWithoutSynchronization(WebCore::HTMLNames::reflectattributewithcereactionsnotneededAttr));
342     return result;
343 }
344
345 EncodedJSValue jsTestCEReactionsReflectAttributeWithCEReactionsNotNeeded(ExecState* state, EncodedJSValue thisValue, PropertyName)
346 {
347     return IDLAttribute<JSTestCEReactions>::get<jsTestCEReactionsReflectAttributeWithCEReactionsNotNeededGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "reflectAttributeWithCEReactionsNotNeeded");
348 }
349
350 static inline bool setJSTestCEReactionsReflectAttributeWithCEReactionsNotNeededSetter(ExecState& state, JSTestCEReactions& thisObject, JSValue value, ThrowScope& throwScope)
351 {
352     UNUSED_PARAM(throwScope);
353     CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
354     auto& impl = thisObject.wrapped();
355     auto nativeValue = convert<IDLDOMString>(state, value);
356     RETURN_IF_EXCEPTION(throwScope, false);
357     AttributeSetter::call(state, throwScope, [&] {
358         return impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectattributewithcereactionsnotneededAttr, WTFMove(nativeValue));
359     });
360     return true;
361 }
362
363 bool setJSTestCEReactionsReflectAttributeWithCEReactionsNotNeeded(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
364 {
365     return IDLAttribute<JSTestCEReactions>::set<setJSTestCEReactionsReflectAttributeWithCEReactionsNotNeededSetter>(*state, thisValue, encodedValue, "reflectAttributeWithCEReactionsNotNeeded");
366 }
367
368 static inline JSValue jsTestCEReactionsStringifierAttributeNotNeededGetter(ExecState& state, JSTestCEReactions& thisObject, ThrowScope& throwScope)
369 {
370     UNUSED_PARAM(throwScope);
371     UNUSED_PARAM(state);
372     auto& impl = thisObject.wrapped();
373     JSValue result = toJS<IDLInterface<TestCEReactionsStringifier>>(state, *thisObject.globalObject(), throwScope, impl.stringifierAttributeNotNeeded());
374     return result;
375 }
376
377 EncodedJSValue jsTestCEReactionsStringifierAttributeNotNeeded(ExecState* state, EncodedJSValue thisValue, PropertyName)
378 {
379     return IDLAttribute<JSTestCEReactions>::get<jsTestCEReactionsStringifierAttributeNotNeededGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "stringifierAttributeNotNeeded");
380 }
381
382 static inline bool setJSTestCEReactionsStringifierAttributeNotNeededSetter(ExecState& state, JSTestCEReactions& thisObject, JSValue value, ThrowScope& throwScope)
383 {
384     UNUSED_PARAM(throwScope);
385     auto id = Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("stringifierAttributeNotNeeded"), strlen("stringifierAttributeNotNeeded"));
386     auto valueToForwardTo = thisObject.get(&state, id);
387     RETURN_IF_EXCEPTION(throwScope, false);
388     if (UNLIKELY(!valueToForwardTo.isObject())) {
389         throwTypeError(&state, throwScope);
390         return false;
391     }
392     auto forwardId = Identifier::fromString(&state.vm(), reinterpret_cast<const LChar*>("valueWithoutReactions"), strlen("valueWithoutReactions"));
393     PutPropertySlot slot(valueToForwardTo, false);
394     asObject(valueToForwardTo)->methodTable(state.vm())->put(asObject(valueToForwardTo), &state, forwardId, value, slot);
395     RETURN_IF_EXCEPTION(throwScope, false);
396     return true;
397 }
398
399 bool setJSTestCEReactionsStringifierAttributeNotNeeded(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
400 {
401     return IDLAttribute<JSTestCEReactions>::set<setJSTestCEReactionsStringifierAttributeNotNeededSetter>(*state, thisValue, encodedValue, "stringifierAttributeNotNeeded");
402 }
403
404 static inline JSC::EncodedJSValue jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsBody(JSC::ExecState* state, typename IDLOperation<JSTestCEReactions>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
405 {
406     UNUSED_PARAM(state);
407     UNUSED_PARAM(throwScope);
408     CustomElementReactionStack customElementReactionStack(*state);
409     auto& impl = castedThis->wrapped();
410     impl.methodWithCEReactions();
411     return JSValue::encode(jsUndefined());
412 }
413
414 EncodedJSValue JSC_HOST_CALL jsTestCEReactionsPrototypeFunctionMethodWithCEReactions(ExecState* state)
415 {
416     return IDLOperation<JSTestCEReactions>::call<jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsBody>(*state, "methodWithCEReactions");
417 }
418
419 static inline JSC::EncodedJSValue jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsNotNeededBody(JSC::ExecState* state, typename IDLOperation<JSTestCEReactions>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
420 {
421     UNUSED_PARAM(state);
422     UNUSED_PARAM(throwScope);
423     CustomElementReactionDisallowedScope customElementReactionDisallowedScope;
424     auto& impl = castedThis->wrapped();
425     impl.methodWithCEReactionsNotNeeded();
426     return JSValue::encode(jsUndefined());
427 }
428
429 EncodedJSValue JSC_HOST_CALL jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsNotNeeded(ExecState* state)
430 {
431     return IDLOperation<JSTestCEReactions>::call<jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsNotNeededBody>(*state, "methodWithCEReactionsNotNeeded");
432 }
433
434 void JSTestCEReactions::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder)
435 {
436     auto* thisObject = jsCast<JSTestCEReactions*>(cell);
437     builder.setWrappedObjectForCell(cell, &thisObject->wrapped());
438     if (thisObject->scriptExecutionContext())
439         builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string());
440     Base::heapSnapshot(cell, builder);
441 }
442
443 bool JSTestCEReactionsOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor, const char** reason)
444 {
445     UNUSED_PARAM(handle);
446     UNUSED_PARAM(visitor);
447     UNUSED_PARAM(reason);
448     return false;
449 }
450
451 void JSTestCEReactionsOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
452 {
453     auto* jsTestCEReactions = static_cast<JSTestCEReactions*>(handle.slot()->asCell());
454     auto& world = *static_cast<DOMWrapperWorld*>(context);
455     uncacheWrapper(world, &jsTestCEReactions->wrapped(), jsTestCEReactions);
456 }
457
458 #if ENABLE(BINDING_INTEGRITY)
459 #if PLATFORM(WIN)
460 #pragma warning(disable: 4483)
461 extern "C" { extern void (*const __identifier("??_7TestCEReactions@WebCore@@6B@")[])(); }
462 #else
463 extern "C" { extern void* _ZTVN7WebCore15TestCEReactionsE[]; }
464 #endif
465 #endif
466
467 JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<TestCEReactions>&& impl)
468 {
469
470 #if ENABLE(BINDING_INTEGRITY)
471     void* actualVTablePointer = *(reinterpret_cast<void**>(impl.ptr()));
472 #if PLATFORM(WIN)
473     void* expectedVTablePointer = WTF_PREPARE_VTBL_POINTER_FOR_INSPECTION(__identifier("??_7TestCEReactions@WebCore@@6B@"));
474 #else
475     void* expectedVTablePointer = WTF_PREPARE_VTBL_POINTER_FOR_INSPECTION(&_ZTVN7WebCore15TestCEReactionsE[2]);
476 #endif
477
478     // If this fails TestCEReactions does not have a vtable, so you need to add the
479     // ImplementationLacksVTable attribute to the interface definition
480     static_assert(std::is_polymorphic<TestCEReactions>::value, "TestCEReactions is not polymorphic");
481
482     // If you hit this assertion you either have a use after free bug, or
483     // TestCEReactions has subclasses. If TestCEReactions has subclasses that get passed
484     // to toJS() we currently require TestCEReactions you to opt out of binding hardening
485     // by adding the SkipVTableValidation attribute to the interface IDL definition
486     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
487 #endif
488     return createWrapper<TestCEReactions>(globalObject, WTFMove(impl));
489 }
490
491 JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCEReactions& impl)
492 {
493     return wrap(state, globalObject, impl);
494 }
495
496 TestCEReactions* JSTestCEReactions::toWrapped(JSC::VM& vm, JSC::JSValue value)
497 {
498     if (auto* wrapper = jsDynamicCast<JSTestCEReactions*>(vm, value))
499         return &wrapper->wrapped();
500     return nullptr;
501 }
502
503 }