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