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 "JSSVGAngle.h"
23
24#include "JSDOMAttribute.h"
25#include "JSDOMBinding.h"
26#include "JSDOMConstructorNotConstructable.h"
27#include "JSDOMConvertNumbers.h"
28#include "JSDOMConvertStrings.h"
29#include "JSDOMExceptionHandling.h"
30#include "JSDOMOperation.h"
31#include "JSDOMWrapperCache.h"
32#include "ScriptExecutionContext.h"
33#include <JavaScriptCore/FunctionPrototype.h>
34#include <JavaScriptCore/HeapSnapshotBuilder.h>
35#include <JavaScriptCore/JSCInlines.h>
36#include <wtf/GetPtr.h>
37#include <wtf/PointerPreparations.h>
38#include <wtf/URL.h>
39
40
41namespace WebCore {
42using namespace JSC;
43
44// Functions
45
46JSC::EncodedJSValue JSC_HOST_CALL jsSVGAnglePrototypeFunctionNewValueSpecifiedUnits(JSC::ExecState*);
47JSC::EncodedJSValue JSC_HOST_CALL jsSVGAnglePrototypeFunctionConvertToSpecifiedUnits(JSC::ExecState*);
48
49// Attributes
50
51JSC::EncodedJSValue jsSVGAngleConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
52bool setJSSVGAngleConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
53JSC::EncodedJSValue jsSVGAngleUnitType(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
54JSC::EncodedJSValue jsSVGAngleValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
55bool setJSSVGAngleValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
56JSC::EncodedJSValue jsSVGAngleValueInSpecifiedUnits(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
57bool setJSSVGAngleValueInSpecifiedUnits(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
58JSC::EncodedJSValue jsSVGAngleValueAsString(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
59bool setJSSVGAngleValueAsString(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
60
61class JSSVGAnglePrototype : public JSC::JSNonFinalObject {
62public:
63 using Base = JSC::JSNonFinalObject;
64 static JSSVGAnglePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
65 {
66 JSSVGAnglePrototype* ptr = new (NotNull, JSC::allocateCell<JSSVGAnglePrototype>(vm.heap)) JSSVGAnglePrototype(vm, globalObject, structure);
67 ptr->finishCreation(vm);
68 return ptr;
69 }
70
71 DECLARE_INFO;
72 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
73 {
74 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
75 }
76
77private:
78 JSSVGAnglePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
79 : JSC::JSNonFinalObject(vm, structure)
80 {
81 }
82
83 void finishCreation(JSC::VM&);
84};
85
86using JSSVGAngleConstructor = JSDOMConstructorNotConstructable<JSSVGAngle>;
87
88/* Hash table for constructor */
89
90static const HashTableValue JSSVGAngleConstructorTableValues[] =
91{
92 { "SVG_ANGLETYPE_UNKNOWN", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(0) } },
93 { "SVG_ANGLETYPE_UNSPECIFIED", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(1) } },
94 { "SVG_ANGLETYPE_DEG", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(2) } },
95 { "SVG_ANGLETYPE_RAD", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(3) } },
96 { "SVG_ANGLETYPE_GRAD", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(4) } },
97};
98
99static_assert(SVGAngleValue::SVG_ANGLETYPE_UNKNOWN == 0, "SVG_ANGLETYPE_UNKNOWN in SVGAngleValue does not match value from IDL");
100static_assert(SVGAngleValue::SVG_ANGLETYPE_UNSPECIFIED == 1, "SVG_ANGLETYPE_UNSPECIFIED in SVGAngleValue does not match value from IDL");
101static_assert(SVGAngleValue::SVG_ANGLETYPE_DEG == 2, "SVG_ANGLETYPE_DEG in SVGAngleValue does not match value from IDL");
102static_assert(SVGAngleValue::SVG_ANGLETYPE_RAD == 3, "SVG_ANGLETYPE_RAD in SVGAngleValue does not match value from IDL");
103static_assert(SVGAngleValue::SVG_ANGLETYPE_GRAD == 4, "SVG_ANGLETYPE_GRAD in SVGAngleValue does not match value from IDL");
104
105template<> JSValue JSSVGAngleConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
106{
107 UNUSED_PARAM(vm);
108 return globalObject.functionPrototype();
109}
110
111template<> void JSSVGAngleConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
112{
113 putDirect(vm, vm.propertyNames->prototype, JSSVGAngle::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
114 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("SVGAngle"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
115 putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
116 reifyStaticProperties(vm, JSSVGAngle::info(), JSSVGAngleConstructorTableValues, *this);
117}
118
119template<> const ClassInfo JSSVGAngleConstructor::s_info = { "SVGAngle", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGAngleConstructor) };
120
121/* Hash table for prototype */
122
123static const HashTableValue JSSVGAnglePrototypeTableValues[] =
124{
125 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAngleConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGAngleConstructor) } },
126 { "unitType", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAngleUnitType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
127 { "value", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAngleValue), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGAngleValue) } },
128 { "valueInSpecifiedUnits", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAngleValueInSpecifiedUnits), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGAngleValueInSpecifiedUnits) } },
129 { "valueAsString", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGAngleValueAsString), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGAngleValueAsString) } },
130 { "newValueSpecifiedUnits", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGAnglePrototypeFunctionNewValueSpecifiedUnits), (intptr_t) (2) } },
131 { "convertToSpecifiedUnits", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsSVGAnglePrototypeFunctionConvertToSpecifiedUnits), (intptr_t) (1) } },
132 { "SVG_ANGLETYPE_UNKNOWN", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(0) } },
133 { "SVG_ANGLETYPE_UNSPECIFIED", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(1) } },
134 { "SVG_ANGLETYPE_DEG", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(2) } },
135 { "SVG_ANGLETYPE_RAD", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(3) } },
136 { "SVG_ANGLETYPE_GRAD", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(4) } },
137};
138
139const ClassInfo JSSVGAnglePrototype::s_info = { "SVGAnglePrototype", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGAnglePrototype) };
140
141void JSSVGAnglePrototype::finishCreation(VM& vm)
142{
143 Base::finishCreation(vm);
144 reifyStaticProperties(vm, JSSVGAngle::info(), JSSVGAnglePrototypeTableValues, *this);
145}
146
147const ClassInfo JSSVGAngle::s_info = { "SVGAngle", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSSVGAngle) };
148
149JSSVGAngle::JSSVGAngle(Structure* structure, JSDOMGlobalObject& globalObject, Ref<SVGAngle>&& impl)
150 : JSDOMWrapper<SVGAngle>(structure, globalObject, WTFMove(impl))
151{
152}
153
154void JSSVGAngle::finishCreation(VM& vm)
155{
156 Base::finishCreation(vm);
157 ASSERT(inherits(vm, info()));
158
159}
160
161JSObject* JSSVGAngle::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
162{
163 return JSSVGAnglePrototype::create(vm, &globalObject, JSSVGAnglePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
164}
165
166JSObject* JSSVGAngle::prototype(VM& vm, JSDOMGlobalObject& globalObject)
167{
168 return getDOMPrototype<JSSVGAngle>(vm, globalObject);
169}
170
171JSValue JSSVGAngle::getConstructor(VM& vm, const JSGlobalObject* globalObject)
172{
173 return getDOMConstructor<JSSVGAngleConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
174}
175
176void JSSVGAngle::destroy(JSC::JSCell* cell)
177{
178 JSSVGAngle* thisObject = static_cast<JSSVGAngle*>(cell);
179 thisObject->JSSVGAngle::~JSSVGAngle();
180}
181
182template<> inline JSSVGAngle* IDLAttribute<JSSVGAngle>::cast(ExecState& state, EncodedJSValue thisValue)
183{
184 return jsDynamicCast<JSSVGAngle*>(state.vm(), JSValue::decode(thisValue));
185}
186
187template<> inline JSSVGAngle* IDLOperation<JSSVGAngle>::cast(ExecState& state)
188{
189 return jsDynamicCast<JSSVGAngle*>(state.vm(), state.thisValue());
190}
191
192EncodedJSValue jsSVGAngleConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
193{
194 VM& vm = state->vm();
195 auto throwScope = DECLARE_THROW_SCOPE(vm);
196 auto* prototype = jsDynamicCast<JSSVGAnglePrototype*>(vm, JSValue::decode(thisValue));
197 if (UNLIKELY(!prototype))
198 return throwVMTypeError(state, throwScope);
199 return JSValue::encode(JSSVGAngle::getConstructor(state->vm(), prototype->globalObject()));
200}
201
202bool setJSSVGAngleConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
203{
204 VM& vm = state->vm();
205 auto throwScope = DECLARE_THROW_SCOPE(vm);
206 auto* prototype = jsDynamicCast<JSSVGAnglePrototype*>(vm, JSValue::decode(thisValue));
207 if (UNLIKELY(!prototype)) {
208 throwVMTypeError(state, throwScope);
209 return false;
210 }
211 // Shadowing a built-in constructor
212 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));
213}
214
215static inline JSValue jsSVGAngleUnitTypeGetter(ExecState& state, JSSVGAngle& thisObject, ThrowScope& throwScope)
216{
217 UNUSED_PARAM(throwScope);
218 UNUSED_PARAM(state);
219 auto& impl = thisObject.wrapped();
220 JSValue result = toJS<IDLUnsignedShort>(state, throwScope, impl.unitType());
221 return result;
222}
223
224EncodedJSValue jsSVGAngleUnitType(ExecState* state, EncodedJSValue thisValue, PropertyName)
225{
226 return IDLAttribute<JSSVGAngle>::get<jsSVGAngleUnitTypeGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "unitType");
227}
228
229static inline JSValue jsSVGAngleValueGetter(ExecState& state, JSSVGAngle& thisObject, ThrowScope& throwScope)
230{
231 UNUSED_PARAM(throwScope);
232 UNUSED_PARAM(state);
233 auto& impl = thisObject.wrapped();
234 JSValue result = toJS<IDLUnrestrictedFloat>(state, throwScope, impl.valueForBindings());
235 return result;
236}
237
238EncodedJSValue jsSVGAngleValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
239{
240 return IDLAttribute<JSSVGAngle>::get<jsSVGAngleValueGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "value");
241}
242
243static inline bool setJSSVGAngleValueSetter(ExecState& state, JSSVGAngle& thisObject, JSValue value, ThrowScope& throwScope)
244{
245 UNUSED_PARAM(throwScope);
246 auto& impl = thisObject.wrapped();
247 auto nativeValue = convert<IDLUnrestrictedFloat>(state, value);
248 RETURN_IF_EXCEPTION(throwScope, false);
249 AttributeSetter::call(state, throwScope, [&] {
250 return impl.setValueForBindings(WTFMove(nativeValue));
251 });
252 return true;
253}
254
255bool setJSSVGAngleValue(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
256{
257 return IDLAttribute<JSSVGAngle>::set<setJSSVGAngleValueSetter>(*state, thisValue, encodedValue, "value");
258}
259
260static inline JSValue jsSVGAngleValueInSpecifiedUnitsGetter(ExecState& state, JSSVGAngle& thisObject, ThrowScope& throwScope)
261{
262 UNUSED_PARAM(throwScope);
263 UNUSED_PARAM(state);
264 auto& impl = thisObject.wrapped();
265 JSValue result = toJS<IDLUnrestrictedFloat>(state, throwScope, impl.valueInSpecifiedUnits());
266 return result;
267}
268
269EncodedJSValue jsSVGAngleValueInSpecifiedUnits(ExecState* state, EncodedJSValue thisValue, PropertyName)
270{
271 return IDLAttribute<JSSVGAngle>::get<jsSVGAngleValueInSpecifiedUnitsGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "valueInSpecifiedUnits");
272}
273
274static inline bool setJSSVGAngleValueInSpecifiedUnitsSetter(ExecState& state, JSSVGAngle& thisObject, JSValue value, ThrowScope& throwScope)
275{
276 UNUSED_PARAM(throwScope);
277 auto& impl = thisObject.wrapped();
278 auto nativeValue = convert<IDLUnrestrictedFloat>(state, value);
279 RETURN_IF_EXCEPTION(throwScope, false);
280 AttributeSetter::call(state, throwScope, [&] {
281 return impl.setValueInSpecifiedUnits(WTFMove(nativeValue));
282 });
283 return true;
284}
285
286bool setJSSVGAngleValueInSpecifiedUnits(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
287{
288 return IDLAttribute<JSSVGAngle>::set<setJSSVGAngleValueInSpecifiedUnitsSetter>(*state, thisValue, encodedValue, "valueInSpecifiedUnits");
289}
290
291static inline JSValue jsSVGAngleValueAsStringGetter(ExecState& state, JSSVGAngle& thisObject, ThrowScope& throwScope)
292{
293 UNUSED_PARAM(throwScope);
294 UNUSED_PARAM(state);
295 auto& impl = thisObject.wrapped();
296 JSValue result = toJS<IDLDOMString>(state, throwScope, impl.valueAsString());
297 return result;
298}
299
300EncodedJSValue jsSVGAngleValueAsString(ExecState* state, EncodedJSValue thisValue, PropertyName)
301{
302 return IDLAttribute<JSSVGAngle>::get<jsSVGAngleValueAsStringGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "valueAsString");
303}
304
305static inline bool setJSSVGAngleValueAsStringSetter(ExecState& state, JSSVGAngle& thisObject, JSValue value, ThrowScope& throwScope)
306{
307 UNUSED_PARAM(throwScope);
308 auto& impl = thisObject.wrapped();
309 auto nativeValue = convert<IDLDOMString>(state, value);
310 RETURN_IF_EXCEPTION(throwScope, false);
311 AttributeSetter::call(state, throwScope, [&] {
312 return impl.setValueAsString(WTFMove(nativeValue));
313 });
314 return true;
315}
316
317bool setJSSVGAngleValueAsString(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
318{
319 return IDLAttribute<JSSVGAngle>::set<setJSSVGAngleValueAsStringSetter>(*state, thisValue, encodedValue, "valueAsString");
320}
321
322static inline JSC::EncodedJSValue jsSVGAnglePrototypeFunctionNewValueSpecifiedUnitsBody(JSC::ExecState* state, typename IDLOperation<JSSVGAngle>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
323{
324 UNUSED_PARAM(state);
325 UNUSED_PARAM(throwScope);
326 auto& impl = castedThis->wrapped();
327 if (UNLIKELY(state->argumentCount() < 2))
328 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
329 auto unitType = convert<IDLUnsignedShort>(*state, state->uncheckedArgument(0));
330 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
331 auto valueInSpecifiedUnits = convert<IDLUnrestrictedFloat>(*state, state->uncheckedArgument(1));
332 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
333 propagateException(*state, throwScope, impl.newValueSpecifiedUnits(WTFMove(unitType), WTFMove(valueInSpecifiedUnits)));
334 return JSValue::encode(jsUndefined());
335}
336
337EncodedJSValue JSC_HOST_CALL jsSVGAnglePrototypeFunctionNewValueSpecifiedUnits(ExecState* state)
338{
339 return IDLOperation<JSSVGAngle>::call<jsSVGAnglePrototypeFunctionNewValueSpecifiedUnitsBody>(*state, "newValueSpecifiedUnits");
340}
341
342static inline JSC::EncodedJSValue jsSVGAnglePrototypeFunctionConvertToSpecifiedUnitsBody(JSC::ExecState* state, typename IDLOperation<JSSVGAngle>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
343{
344 UNUSED_PARAM(state);
345 UNUSED_PARAM(throwScope);
346 auto& impl = castedThis->wrapped();
347 if (UNLIKELY(state->argumentCount() < 1))
348 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
349 auto unitType = convert<IDLUnsignedShort>(*state, state->uncheckedArgument(0));
350 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
351 propagateException(*state, throwScope, impl.convertToSpecifiedUnits(WTFMove(unitType)));
352 return JSValue::encode(jsUndefined());
353}
354
355EncodedJSValue JSC_HOST_CALL jsSVGAnglePrototypeFunctionConvertToSpecifiedUnits(ExecState* state)
356{
357 return IDLOperation<JSSVGAngle>::call<jsSVGAnglePrototypeFunctionConvertToSpecifiedUnitsBody>(*state, "convertToSpecifiedUnits");
358}
359
360void JSSVGAngle::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder)
361{
362 auto* thisObject = jsCast<JSSVGAngle*>(cell);
363 builder.setWrappedObjectForCell(cell, &thisObject->wrapped());
364 if (thisObject->scriptExecutionContext())
365 builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string());
366 Base::heapSnapshot(cell, builder);
367}
368
369bool JSSVGAngleOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor, const char** reason)
370{
371 UNUSED_PARAM(handle);
372 UNUSED_PARAM(visitor);
373 UNUSED_PARAM(reason);
374 return false;
375}
376
377void JSSVGAngleOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
378{
379 auto* jsSVGAngle = static_cast<JSSVGAngle*>(handle.slot()->asCell());
380 auto& world = *static_cast<DOMWrapperWorld*>(context);
381 uncacheWrapper(world, &jsSVGAngle->wrapped(), jsSVGAngle);
382}
383
384#if ENABLE(BINDING_INTEGRITY)
385#if PLATFORM(WIN)
386#pragma warning(disable: 4483)
387extern "C" { extern void (*const __identifier("??_7SVGAngle@WebCore@@6B@")[])(); }
388#else
389extern "C" { extern void* _ZTVN7WebCore8SVGAngleE[]; }
390#endif
391#endif
392
393JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<SVGAngle>&& impl)
394{
395
396#if ENABLE(BINDING_INTEGRITY)
397 void* actualVTablePointer = *(reinterpret_cast<void**>(impl.ptr()));
398#if PLATFORM(WIN)
399 void* expectedVTablePointer = WTF_PREPARE_VTBL_POINTER_FOR_INSPECTION(__identifier("??_7SVGAngle@WebCore@@6B@"));
400#else
401 void* expectedVTablePointer = WTF_PREPARE_VTBL_POINTER_FOR_INSPECTION(&_ZTVN7WebCore8SVGAngleE[2]);
402#endif
403
404 // If this fails SVGAngle does not have a vtable, so you need to add the
405 // ImplementationLacksVTable attribute to the interface definition
406 static_assert(std::is_polymorphic<SVGAngle>::value, "SVGAngle is not polymorphic");
407
408 // If you hit this assertion you either have a use after free bug, or
409 // SVGAngle has subclasses. If SVGAngle has subclasses that get passed
410 // to toJS() we currently require SVGAngle you to opt out of binding hardening
411 // by adding the SkipVTableValidation attribute to the interface IDL definition
412 RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
413#endif
414 return createWrapper<SVGAngle>(globalObject, WTFMove(impl));
415}
416
417JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, SVGAngle& impl)
418{
419 return wrap(state, globalObject, impl);
420}
421
422SVGAngle* JSSVGAngle::toWrapped(JSC::VM& vm, JSC::JSValue value)
423{
424 if (auto* wrapper = jsDynamicCast<JSSVGAngle*>(vm, value))
425 return &wrapper->wrapped();
426 return nullptr;
427}
428
429}
430