Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM SVGPathElement.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #include "DOMSVGPathSeg.h"
4 : #include "DOMSVGPathSegList.h"
5 : #include "SVGGeometryElementBinding.h"
6 : #include "SVGPathElementBinding.h"
7 : #include "WrapperFactory.h"
8 : #include "mozilla/FloatingPoint.h"
9 : #include "mozilla/OwningNonNull.h"
10 : #include "mozilla/dom/BindingUtils.h"
11 : #include "mozilla/dom/DOMJSClass.h"
12 : #include "mozilla/dom/NonRefcountedDOMObject.h"
13 : #include "mozilla/dom/PrimitiveConversions.h"
14 : #include "mozilla/dom/SVGPathElement.h"
15 : #include "mozilla/dom/XrayExpandoClass.h"
16 :
17 : namespace mozilla {
18 : namespace dom {
19 :
20 : namespace SVGPathElementBinding {
21 :
22 : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGGeometryElementBinding::NativeType>::value,
23 : "Can't inherit from an interface with a different ownership model.");
24 :
25 : static bool
26 0 : getPathSegAtLength(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
27 : {
28 0 : if (MOZ_UNLIKELY(args.length() < 1)) {
29 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.getPathSegAtLength");
30 : }
31 : float arg0;
32 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
33 0 : return false;
34 0 : } else if (!mozilla::IsFinite(arg0)) {
35 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.getPathSegAtLength");
36 0 : return false;
37 : }
38 0 : uint32_t result(self->GetPathSegAtLength(arg0));
39 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
40 0 : args.rval().setNumber(result);
41 0 : return true;
42 : }
43 :
44 : static const JSJitInfo getPathSegAtLength_methodinfo = {
45 : { (JSJitGetterOp)getPathSegAtLength },
46 : { prototypes::id::SVGPathElement },
47 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
48 : JSJitInfo::Method,
49 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
50 : JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
51 : false, /* isInfallible. False in setters. */
52 : false, /* isMovable. Not relevant for setters. */
53 : false, /* isEliminatable. Not relevant for setters. */
54 : false, /* isAlwaysInSlot. Only relevant for getters. */
55 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
56 : false, /* isTypedMethod. Only relevant for methods. */
57 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
58 : };
59 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
60 : static_assert(0 < 1, "There is no slot for us");
61 :
62 : static bool
63 0 : createSVGPathSegClosePath(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
64 : {
65 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegClosePath>(self->CreateSVGPathSegClosePath()));
66 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
67 : static_assert(!IsPointer<decltype(result)>::value,
68 : "NewObject implies that we need to keep the object alive with a strong reference.");
69 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
70 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
71 0 : return false;
72 : }
73 0 : return true;
74 : }
75 :
76 : static const JSJitInfo createSVGPathSegClosePath_methodinfo = {
77 : { (JSJitGetterOp)createSVGPathSegClosePath },
78 : { prototypes::id::SVGPathElement },
79 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
80 : JSJitInfo::Method,
81 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
82 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
83 : false, /* isInfallible. False in setters. */
84 : false, /* isMovable. Not relevant for setters. */
85 : false, /* isEliminatable. Not relevant for setters. */
86 : false, /* isAlwaysInSlot. Only relevant for getters. */
87 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
88 : false, /* isTypedMethod. Only relevant for methods. */
89 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
90 : };
91 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
92 : static_assert(0 < 1, "There is no slot for us");
93 :
94 : static bool
95 0 : createSVGPathSegMovetoAbs(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
96 : {
97 0 : if (MOZ_UNLIKELY(args.length() < 2)) {
98 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegMovetoAbs");
99 : }
100 : float arg0;
101 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
102 0 : return false;
103 0 : } else if (!mozilla::IsFinite(arg0)) {
104 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegMovetoAbs");
105 0 : return false;
106 : }
107 : float arg1;
108 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[1], &arg1)) {
109 0 : return false;
110 0 : } else if (!mozilla::IsFinite(arg1)) {
111 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 2 of SVGPathElement.createSVGPathSegMovetoAbs");
112 0 : return false;
113 : }
114 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegMovetoAbs>(self->CreateSVGPathSegMovetoAbs(arg0, arg1)));
115 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
116 : static_assert(!IsPointer<decltype(result)>::value,
117 : "NewObject implies that we need to keep the object alive with a strong reference.");
118 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
119 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
120 0 : return false;
121 : }
122 0 : return true;
123 : }
124 :
125 : static const JSJitInfo createSVGPathSegMovetoAbs_methodinfo = {
126 : { (JSJitGetterOp)createSVGPathSegMovetoAbs },
127 : { prototypes::id::SVGPathElement },
128 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
129 : JSJitInfo::Method,
130 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
131 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
132 : false, /* isInfallible. False in setters. */
133 : false, /* isMovable. Not relevant for setters. */
134 : false, /* isEliminatable. Not relevant for setters. */
135 : false, /* isAlwaysInSlot. Only relevant for getters. */
136 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
137 : false, /* isTypedMethod. Only relevant for methods. */
138 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
139 : };
140 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
141 : static_assert(0 < 1, "There is no slot for us");
142 :
143 : static bool
144 0 : createSVGPathSegMovetoRel(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
145 : {
146 0 : if (MOZ_UNLIKELY(args.length() < 2)) {
147 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegMovetoRel");
148 : }
149 : float arg0;
150 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
151 0 : return false;
152 0 : } else if (!mozilla::IsFinite(arg0)) {
153 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegMovetoRel");
154 0 : return false;
155 : }
156 : float arg1;
157 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[1], &arg1)) {
158 0 : return false;
159 0 : } else if (!mozilla::IsFinite(arg1)) {
160 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 2 of SVGPathElement.createSVGPathSegMovetoRel");
161 0 : return false;
162 : }
163 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegMovetoRel>(self->CreateSVGPathSegMovetoRel(arg0, arg1)));
164 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
165 : static_assert(!IsPointer<decltype(result)>::value,
166 : "NewObject implies that we need to keep the object alive with a strong reference.");
167 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
168 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
169 0 : return false;
170 : }
171 0 : return true;
172 : }
173 :
174 : static const JSJitInfo createSVGPathSegMovetoRel_methodinfo = {
175 : { (JSJitGetterOp)createSVGPathSegMovetoRel },
176 : { prototypes::id::SVGPathElement },
177 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
178 : JSJitInfo::Method,
179 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
180 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
181 : false, /* isInfallible. False in setters. */
182 : false, /* isMovable. Not relevant for setters. */
183 : false, /* isEliminatable. Not relevant for setters. */
184 : false, /* isAlwaysInSlot. Only relevant for getters. */
185 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
186 : false, /* isTypedMethod. Only relevant for methods. */
187 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
188 : };
189 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
190 : static_assert(0 < 1, "There is no slot for us");
191 :
192 : static bool
193 0 : createSVGPathSegLinetoAbs(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
194 : {
195 0 : if (MOZ_UNLIKELY(args.length() < 2)) {
196 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegLinetoAbs");
197 : }
198 : float arg0;
199 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
200 0 : return false;
201 0 : } else if (!mozilla::IsFinite(arg0)) {
202 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegLinetoAbs");
203 0 : return false;
204 : }
205 : float arg1;
206 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[1], &arg1)) {
207 0 : return false;
208 0 : } else if (!mozilla::IsFinite(arg1)) {
209 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 2 of SVGPathElement.createSVGPathSegLinetoAbs");
210 0 : return false;
211 : }
212 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegLinetoAbs>(self->CreateSVGPathSegLinetoAbs(arg0, arg1)));
213 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
214 : static_assert(!IsPointer<decltype(result)>::value,
215 : "NewObject implies that we need to keep the object alive with a strong reference.");
216 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
217 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
218 0 : return false;
219 : }
220 0 : return true;
221 : }
222 :
223 : static const JSJitInfo createSVGPathSegLinetoAbs_methodinfo = {
224 : { (JSJitGetterOp)createSVGPathSegLinetoAbs },
225 : { prototypes::id::SVGPathElement },
226 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
227 : JSJitInfo::Method,
228 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
229 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
230 : false, /* isInfallible. False in setters. */
231 : false, /* isMovable. Not relevant for setters. */
232 : false, /* isEliminatable. Not relevant for setters. */
233 : false, /* isAlwaysInSlot. Only relevant for getters. */
234 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
235 : false, /* isTypedMethod. Only relevant for methods. */
236 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
237 : };
238 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
239 : static_assert(0 < 1, "There is no slot for us");
240 :
241 : static bool
242 0 : createSVGPathSegLinetoRel(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
243 : {
244 0 : if (MOZ_UNLIKELY(args.length() < 2)) {
245 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegLinetoRel");
246 : }
247 : float arg0;
248 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
249 0 : return false;
250 0 : } else if (!mozilla::IsFinite(arg0)) {
251 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegLinetoRel");
252 0 : return false;
253 : }
254 : float arg1;
255 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[1], &arg1)) {
256 0 : return false;
257 0 : } else if (!mozilla::IsFinite(arg1)) {
258 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 2 of SVGPathElement.createSVGPathSegLinetoRel");
259 0 : return false;
260 : }
261 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegLinetoRel>(self->CreateSVGPathSegLinetoRel(arg0, arg1)));
262 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
263 : static_assert(!IsPointer<decltype(result)>::value,
264 : "NewObject implies that we need to keep the object alive with a strong reference.");
265 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
266 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
267 0 : return false;
268 : }
269 0 : return true;
270 : }
271 :
272 : static const JSJitInfo createSVGPathSegLinetoRel_methodinfo = {
273 : { (JSJitGetterOp)createSVGPathSegLinetoRel },
274 : { prototypes::id::SVGPathElement },
275 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
276 : JSJitInfo::Method,
277 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
278 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
279 : false, /* isInfallible. False in setters. */
280 : false, /* isMovable. Not relevant for setters. */
281 : false, /* isEliminatable. Not relevant for setters. */
282 : false, /* isAlwaysInSlot. Only relevant for getters. */
283 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
284 : false, /* isTypedMethod. Only relevant for methods. */
285 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
286 : };
287 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
288 : static_assert(0 < 1, "There is no slot for us");
289 :
290 : static bool
291 0 : createSVGPathSegCurvetoCubicAbs(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
292 : {
293 0 : if (MOZ_UNLIKELY(args.length() < 6)) {
294 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegCurvetoCubicAbs");
295 : }
296 : float arg0;
297 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
298 0 : return false;
299 0 : } else if (!mozilla::IsFinite(arg0)) {
300 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegCurvetoCubicAbs");
301 0 : return false;
302 : }
303 : float arg1;
304 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[1], &arg1)) {
305 0 : return false;
306 0 : } else if (!mozilla::IsFinite(arg1)) {
307 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 2 of SVGPathElement.createSVGPathSegCurvetoCubicAbs");
308 0 : return false;
309 : }
310 : float arg2;
311 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[2], &arg2)) {
312 0 : return false;
313 0 : } else if (!mozilla::IsFinite(arg2)) {
314 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 3 of SVGPathElement.createSVGPathSegCurvetoCubicAbs");
315 0 : return false;
316 : }
317 : float arg3;
318 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[3], &arg3)) {
319 0 : return false;
320 0 : } else if (!mozilla::IsFinite(arg3)) {
321 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 4 of SVGPathElement.createSVGPathSegCurvetoCubicAbs");
322 0 : return false;
323 : }
324 : float arg4;
325 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[4], &arg4)) {
326 0 : return false;
327 0 : } else if (!mozilla::IsFinite(arg4)) {
328 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 5 of SVGPathElement.createSVGPathSegCurvetoCubicAbs");
329 0 : return false;
330 : }
331 : float arg5;
332 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[5], &arg5)) {
333 0 : return false;
334 0 : } else if (!mozilla::IsFinite(arg5)) {
335 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 6 of SVGPathElement.createSVGPathSegCurvetoCubicAbs");
336 0 : return false;
337 : }
338 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegCurvetoCubicAbs>(self->CreateSVGPathSegCurvetoCubicAbs(arg0, arg1, arg2, arg3, arg4, arg5)));
339 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
340 : static_assert(!IsPointer<decltype(result)>::value,
341 : "NewObject implies that we need to keep the object alive with a strong reference.");
342 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
343 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
344 0 : return false;
345 : }
346 0 : return true;
347 : }
348 :
349 : static const JSJitInfo createSVGPathSegCurvetoCubicAbs_methodinfo = {
350 : { (JSJitGetterOp)createSVGPathSegCurvetoCubicAbs },
351 : { prototypes::id::SVGPathElement },
352 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
353 : JSJitInfo::Method,
354 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
355 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
356 : false, /* isInfallible. False in setters. */
357 : false, /* isMovable. Not relevant for setters. */
358 : false, /* isEliminatable. Not relevant for setters. */
359 : false, /* isAlwaysInSlot. Only relevant for getters. */
360 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
361 : false, /* isTypedMethod. Only relevant for methods. */
362 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
363 : };
364 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
365 : static_assert(0 < 1, "There is no slot for us");
366 :
367 : static bool
368 0 : createSVGPathSegCurvetoCubicRel(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
369 : {
370 0 : if (MOZ_UNLIKELY(args.length() < 6)) {
371 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegCurvetoCubicRel");
372 : }
373 : float arg0;
374 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
375 0 : return false;
376 0 : } else if (!mozilla::IsFinite(arg0)) {
377 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegCurvetoCubicRel");
378 0 : return false;
379 : }
380 : float arg1;
381 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[1], &arg1)) {
382 0 : return false;
383 0 : } else if (!mozilla::IsFinite(arg1)) {
384 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 2 of SVGPathElement.createSVGPathSegCurvetoCubicRel");
385 0 : return false;
386 : }
387 : float arg2;
388 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[2], &arg2)) {
389 0 : return false;
390 0 : } else if (!mozilla::IsFinite(arg2)) {
391 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 3 of SVGPathElement.createSVGPathSegCurvetoCubicRel");
392 0 : return false;
393 : }
394 : float arg3;
395 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[3], &arg3)) {
396 0 : return false;
397 0 : } else if (!mozilla::IsFinite(arg3)) {
398 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 4 of SVGPathElement.createSVGPathSegCurvetoCubicRel");
399 0 : return false;
400 : }
401 : float arg4;
402 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[4], &arg4)) {
403 0 : return false;
404 0 : } else if (!mozilla::IsFinite(arg4)) {
405 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 5 of SVGPathElement.createSVGPathSegCurvetoCubicRel");
406 0 : return false;
407 : }
408 : float arg5;
409 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[5], &arg5)) {
410 0 : return false;
411 0 : } else if (!mozilla::IsFinite(arg5)) {
412 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 6 of SVGPathElement.createSVGPathSegCurvetoCubicRel");
413 0 : return false;
414 : }
415 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegCurvetoCubicRel>(self->CreateSVGPathSegCurvetoCubicRel(arg0, arg1, arg2, arg3, arg4, arg5)));
416 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
417 : static_assert(!IsPointer<decltype(result)>::value,
418 : "NewObject implies that we need to keep the object alive with a strong reference.");
419 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
420 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
421 0 : return false;
422 : }
423 0 : return true;
424 : }
425 :
426 : static const JSJitInfo createSVGPathSegCurvetoCubicRel_methodinfo = {
427 : { (JSJitGetterOp)createSVGPathSegCurvetoCubicRel },
428 : { prototypes::id::SVGPathElement },
429 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
430 : JSJitInfo::Method,
431 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
432 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
433 : false, /* isInfallible. False in setters. */
434 : false, /* isMovable. Not relevant for setters. */
435 : false, /* isEliminatable. Not relevant for setters. */
436 : false, /* isAlwaysInSlot. Only relevant for getters. */
437 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
438 : false, /* isTypedMethod. Only relevant for methods. */
439 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
440 : };
441 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
442 : static_assert(0 < 1, "There is no slot for us");
443 :
444 : static bool
445 0 : createSVGPathSegCurvetoQuadraticAbs(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
446 : {
447 0 : if (MOZ_UNLIKELY(args.length() < 4)) {
448 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegCurvetoQuadraticAbs");
449 : }
450 : float arg0;
451 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
452 0 : return false;
453 0 : } else if (!mozilla::IsFinite(arg0)) {
454 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegCurvetoQuadraticAbs");
455 0 : return false;
456 : }
457 : float arg1;
458 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[1], &arg1)) {
459 0 : return false;
460 0 : } else if (!mozilla::IsFinite(arg1)) {
461 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 2 of SVGPathElement.createSVGPathSegCurvetoQuadraticAbs");
462 0 : return false;
463 : }
464 : float arg2;
465 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[2], &arg2)) {
466 0 : return false;
467 0 : } else if (!mozilla::IsFinite(arg2)) {
468 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 3 of SVGPathElement.createSVGPathSegCurvetoQuadraticAbs");
469 0 : return false;
470 : }
471 : float arg3;
472 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[3], &arg3)) {
473 0 : return false;
474 0 : } else if (!mozilla::IsFinite(arg3)) {
475 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 4 of SVGPathElement.createSVGPathSegCurvetoQuadraticAbs");
476 0 : return false;
477 : }
478 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegCurvetoQuadraticAbs>(self->CreateSVGPathSegCurvetoQuadraticAbs(arg0, arg1, arg2, arg3)));
479 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
480 : static_assert(!IsPointer<decltype(result)>::value,
481 : "NewObject implies that we need to keep the object alive with a strong reference.");
482 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
483 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
484 0 : return false;
485 : }
486 0 : return true;
487 : }
488 :
489 : static const JSJitInfo createSVGPathSegCurvetoQuadraticAbs_methodinfo = {
490 : { (JSJitGetterOp)createSVGPathSegCurvetoQuadraticAbs },
491 : { prototypes::id::SVGPathElement },
492 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
493 : JSJitInfo::Method,
494 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
495 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
496 : false, /* isInfallible. False in setters. */
497 : false, /* isMovable. Not relevant for setters. */
498 : false, /* isEliminatable. Not relevant for setters. */
499 : false, /* isAlwaysInSlot. Only relevant for getters. */
500 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
501 : false, /* isTypedMethod. Only relevant for methods. */
502 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
503 : };
504 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
505 : static_assert(0 < 1, "There is no slot for us");
506 :
507 : static bool
508 0 : createSVGPathSegCurvetoQuadraticRel(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
509 : {
510 0 : if (MOZ_UNLIKELY(args.length() < 4)) {
511 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegCurvetoQuadraticRel");
512 : }
513 : float arg0;
514 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
515 0 : return false;
516 0 : } else if (!mozilla::IsFinite(arg0)) {
517 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegCurvetoQuadraticRel");
518 0 : return false;
519 : }
520 : float arg1;
521 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[1], &arg1)) {
522 0 : return false;
523 0 : } else if (!mozilla::IsFinite(arg1)) {
524 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 2 of SVGPathElement.createSVGPathSegCurvetoQuadraticRel");
525 0 : return false;
526 : }
527 : float arg2;
528 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[2], &arg2)) {
529 0 : return false;
530 0 : } else if (!mozilla::IsFinite(arg2)) {
531 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 3 of SVGPathElement.createSVGPathSegCurvetoQuadraticRel");
532 0 : return false;
533 : }
534 : float arg3;
535 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[3], &arg3)) {
536 0 : return false;
537 0 : } else if (!mozilla::IsFinite(arg3)) {
538 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 4 of SVGPathElement.createSVGPathSegCurvetoQuadraticRel");
539 0 : return false;
540 : }
541 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegCurvetoQuadraticRel>(self->CreateSVGPathSegCurvetoQuadraticRel(arg0, arg1, arg2, arg3)));
542 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
543 : static_assert(!IsPointer<decltype(result)>::value,
544 : "NewObject implies that we need to keep the object alive with a strong reference.");
545 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
546 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
547 0 : return false;
548 : }
549 0 : return true;
550 : }
551 :
552 : static const JSJitInfo createSVGPathSegCurvetoQuadraticRel_methodinfo = {
553 : { (JSJitGetterOp)createSVGPathSegCurvetoQuadraticRel },
554 : { prototypes::id::SVGPathElement },
555 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
556 : JSJitInfo::Method,
557 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
558 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
559 : false, /* isInfallible. False in setters. */
560 : false, /* isMovable. Not relevant for setters. */
561 : false, /* isEliminatable. Not relevant for setters. */
562 : false, /* isAlwaysInSlot. Only relevant for getters. */
563 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
564 : false, /* isTypedMethod. Only relevant for methods. */
565 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
566 : };
567 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
568 : static_assert(0 < 1, "There is no slot for us");
569 :
570 : static bool
571 0 : createSVGPathSegArcAbs(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
572 : {
573 0 : if (MOZ_UNLIKELY(args.length() < 7)) {
574 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegArcAbs");
575 : }
576 : float arg0;
577 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
578 0 : return false;
579 0 : } else if (!mozilla::IsFinite(arg0)) {
580 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegArcAbs");
581 0 : return false;
582 : }
583 : float arg1;
584 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[1], &arg1)) {
585 0 : return false;
586 0 : } else if (!mozilla::IsFinite(arg1)) {
587 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 2 of SVGPathElement.createSVGPathSegArcAbs");
588 0 : return false;
589 : }
590 : float arg2;
591 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[2], &arg2)) {
592 0 : return false;
593 0 : } else if (!mozilla::IsFinite(arg2)) {
594 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 3 of SVGPathElement.createSVGPathSegArcAbs");
595 0 : return false;
596 : }
597 : float arg3;
598 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[3], &arg3)) {
599 0 : return false;
600 0 : } else if (!mozilla::IsFinite(arg3)) {
601 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 4 of SVGPathElement.createSVGPathSegArcAbs");
602 0 : return false;
603 : }
604 : float arg4;
605 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[4], &arg4)) {
606 0 : return false;
607 0 : } else if (!mozilla::IsFinite(arg4)) {
608 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 5 of SVGPathElement.createSVGPathSegArcAbs");
609 0 : return false;
610 : }
611 : bool arg5;
612 0 : if (!ValueToPrimitive<bool, eDefault>(cx, args[5], &arg5)) {
613 0 : return false;
614 : }
615 : bool arg6;
616 0 : if (!ValueToPrimitive<bool, eDefault>(cx, args[6], &arg6)) {
617 0 : return false;
618 : }
619 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegArcAbs>(self->CreateSVGPathSegArcAbs(arg0, arg1, arg2, arg3, arg4, arg5, arg6)));
620 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
621 : static_assert(!IsPointer<decltype(result)>::value,
622 : "NewObject implies that we need to keep the object alive with a strong reference.");
623 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
624 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
625 0 : return false;
626 : }
627 0 : return true;
628 : }
629 :
630 : static const JSJitInfo createSVGPathSegArcAbs_methodinfo = {
631 : { (JSJitGetterOp)createSVGPathSegArcAbs },
632 : { prototypes::id::SVGPathElement },
633 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
634 : JSJitInfo::Method,
635 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
636 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
637 : false, /* isInfallible. False in setters. */
638 : false, /* isMovable. Not relevant for setters. */
639 : false, /* isEliminatable. Not relevant for setters. */
640 : false, /* isAlwaysInSlot. Only relevant for getters. */
641 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
642 : false, /* isTypedMethod. Only relevant for methods. */
643 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
644 : };
645 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
646 : static_assert(0 < 1, "There is no slot for us");
647 :
648 : static bool
649 0 : createSVGPathSegArcRel(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
650 : {
651 0 : if (MOZ_UNLIKELY(args.length() < 7)) {
652 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegArcRel");
653 : }
654 : float arg0;
655 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
656 0 : return false;
657 0 : } else if (!mozilla::IsFinite(arg0)) {
658 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegArcRel");
659 0 : return false;
660 : }
661 : float arg1;
662 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[1], &arg1)) {
663 0 : return false;
664 0 : } else if (!mozilla::IsFinite(arg1)) {
665 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 2 of SVGPathElement.createSVGPathSegArcRel");
666 0 : return false;
667 : }
668 : float arg2;
669 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[2], &arg2)) {
670 0 : return false;
671 0 : } else if (!mozilla::IsFinite(arg2)) {
672 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 3 of SVGPathElement.createSVGPathSegArcRel");
673 0 : return false;
674 : }
675 : float arg3;
676 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[3], &arg3)) {
677 0 : return false;
678 0 : } else if (!mozilla::IsFinite(arg3)) {
679 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 4 of SVGPathElement.createSVGPathSegArcRel");
680 0 : return false;
681 : }
682 : float arg4;
683 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[4], &arg4)) {
684 0 : return false;
685 0 : } else if (!mozilla::IsFinite(arg4)) {
686 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 5 of SVGPathElement.createSVGPathSegArcRel");
687 0 : return false;
688 : }
689 : bool arg5;
690 0 : if (!ValueToPrimitive<bool, eDefault>(cx, args[5], &arg5)) {
691 0 : return false;
692 : }
693 : bool arg6;
694 0 : if (!ValueToPrimitive<bool, eDefault>(cx, args[6], &arg6)) {
695 0 : return false;
696 : }
697 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegArcRel>(self->CreateSVGPathSegArcRel(arg0, arg1, arg2, arg3, arg4, arg5, arg6)));
698 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
699 : static_assert(!IsPointer<decltype(result)>::value,
700 : "NewObject implies that we need to keep the object alive with a strong reference.");
701 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
702 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
703 0 : return false;
704 : }
705 0 : return true;
706 : }
707 :
708 : static const JSJitInfo createSVGPathSegArcRel_methodinfo = {
709 : { (JSJitGetterOp)createSVGPathSegArcRel },
710 : { prototypes::id::SVGPathElement },
711 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
712 : JSJitInfo::Method,
713 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
714 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
715 : false, /* isInfallible. False in setters. */
716 : false, /* isMovable. Not relevant for setters. */
717 : false, /* isEliminatable. Not relevant for setters. */
718 : false, /* isAlwaysInSlot. Only relevant for getters. */
719 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
720 : false, /* isTypedMethod. Only relevant for methods. */
721 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
722 : };
723 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
724 : static_assert(0 < 1, "There is no slot for us");
725 :
726 : static bool
727 0 : createSVGPathSegLinetoHorizontalAbs(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
728 : {
729 0 : if (MOZ_UNLIKELY(args.length() < 1)) {
730 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegLinetoHorizontalAbs");
731 : }
732 : float arg0;
733 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
734 0 : return false;
735 0 : } else if (!mozilla::IsFinite(arg0)) {
736 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegLinetoHorizontalAbs");
737 0 : return false;
738 : }
739 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegLinetoHorizontalAbs>(self->CreateSVGPathSegLinetoHorizontalAbs(arg0)));
740 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
741 : static_assert(!IsPointer<decltype(result)>::value,
742 : "NewObject implies that we need to keep the object alive with a strong reference.");
743 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
744 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
745 0 : return false;
746 : }
747 0 : return true;
748 : }
749 :
750 : static const JSJitInfo createSVGPathSegLinetoHorizontalAbs_methodinfo = {
751 : { (JSJitGetterOp)createSVGPathSegLinetoHorizontalAbs },
752 : { prototypes::id::SVGPathElement },
753 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
754 : JSJitInfo::Method,
755 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
756 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
757 : false, /* isInfallible. False in setters. */
758 : false, /* isMovable. Not relevant for setters. */
759 : false, /* isEliminatable. Not relevant for setters. */
760 : false, /* isAlwaysInSlot. Only relevant for getters. */
761 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
762 : false, /* isTypedMethod. Only relevant for methods. */
763 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
764 : };
765 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
766 : static_assert(0 < 1, "There is no slot for us");
767 :
768 : static bool
769 0 : createSVGPathSegLinetoHorizontalRel(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
770 : {
771 0 : if (MOZ_UNLIKELY(args.length() < 1)) {
772 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegLinetoHorizontalRel");
773 : }
774 : float arg0;
775 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
776 0 : return false;
777 0 : } else if (!mozilla::IsFinite(arg0)) {
778 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegLinetoHorizontalRel");
779 0 : return false;
780 : }
781 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegLinetoHorizontalRel>(self->CreateSVGPathSegLinetoHorizontalRel(arg0)));
782 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
783 : static_assert(!IsPointer<decltype(result)>::value,
784 : "NewObject implies that we need to keep the object alive with a strong reference.");
785 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
786 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
787 0 : return false;
788 : }
789 0 : return true;
790 : }
791 :
792 : static const JSJitInfo createSVGPathSegLinetoHorizontalRel_methodinfo = {
793 : { (JSJitGetterOp)createSVGPathSegLinetoHorizontalRel },
794 : { prototypes::id::SVGPathElement },
795 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
796 : JSJitInfo::Method,
797 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
798 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
799 : false, /* isInfallible. False in setters. */
800 : false, /* isMovable. Not relevant for setters. */
801 : false, /* isEliminatable. Not relevant for setters. */
802 : false, /* isAlwaysInSlot. Only relevant for getters. */
803 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
804 : false, /* isTypedMethod. Only relevant for methods. */
805 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
806 : };
807 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
808 : static_assert(0 < 1, "There is no slot for us");
809 :
810 : static bool
811 0 : createSVGPathSegLinetoVerticalAbs(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
812 : {
813 0 : if (MOZ_UNLIKELY(args.length() < 1)) {
814 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegLinetoVerticalAbs");
815 : }
816 : float arg0;
817 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
818 0 : return false;
819 0 : } else if (!mozilla::IsFinite(arg0)) {
820 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegLinetoVerticalAbs");
821 0 : return false;
822 : }
823 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegLinetoVerticalAbs>(self->CreateSVGPathSegLinetoVerticalAbs(arg0)));
824 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
825 : static_assert(!IsPointer<decltype(result)>::value,
826 : "NewObject implies that we need to keep the object alive with a strong reference.");
827 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
828 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
829 0 : return false;
830 : }
831 0 : return true;
832 : }
833 :
834 : static const JSJitInfo createSVGPathSegLinetoVerticalAbs_methodinfo = {
835 : { (JSJitGetterOp)createSVGPathSegLinetoVerticalAbs },
836 : { prototypes::id::SVGPathElement },
837 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
838 : JSJitInfo::Method,
839 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
840 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
841 : false, /* isInfallible. False in setters. */
842 : false, /* isMovable. Not relevant for setters. */
843 : false, /* isEliminatable. Not relevant for setters. */
844 : false, /* isAlwaysInSlot. Only relevant for getters. */
845 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
846 : false, /* isTypedMethod. Only relevant for methods. */
847 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
848 : };
849 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
850 : static_assert(0 < 1, "There is no slot for us");
851 :
852 : static bool
853 0 : createSVGPathSegLinetoVerticalRel(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
854 : {
855 0 : if (MOZ_UNLIKELY(args.length() < 1)) {
856 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegLinetoVerticalRel");
857 : }
858 : float arg0;
859 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
860 0 : return false;
861 0 : } else if (!mozilla::IsFinite(arg0)) {
862 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegLinetoVerticalRel");
863 0 : return false;
864 : }
865 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegLinetoVerticalRel>(self->CreateSVGPathSegLinetoVerticalRel(arg0)));
866 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
867 : static_assert(!IsPointer<decltype(result)>::value,
868 : "NewObject implies that we need to keep the object alive with a strong reference.");
869 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
870 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
871 0 : return false;
872 : }
873 0 : return true;
874 : }
875 :
876 : static const JSJitInfo createSVGPathSegLinetoVerticalRel_methodinfo = {
877 : { (JSJitGetterOp)createSVGPathSegLinetoVerticalRel },
878 : { prototypes::id::SVGPathElement },
879 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
880 : JSJitInfo::Method,
881 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
882 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
883 : false, /* isInfallible. False in setters. */
884 : false, /* isMovable. Not relevant for setters. */
885 : false, /* isEliminatable. Not relevant for setters. */
886 : false, /* isAlwaysInSlot. Only relevant for getters. */
887 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
888 : false, /* isTypedMethod. Only relevant for methods. */
889 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
890 : };
891 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
892 : static_assert(0 < 1, "There is no slot for us");
893 :
894 : static bool
895 0 : createSVGPathSegCurvetoCubicSmoothAbs(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
896 : {
897 0 : if (MOZ_UNLIKELY(args.length() < 4)) {
898 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs");
899 : }
900 : float arg0;
901 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
902 0 : return false;
903 0 : } else if (!mozilla::IsFinite(arg0)) {
904 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs");
905 0 : return false;
906 : }
907 : float arg1;
908 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[1], &arg1)) {
909 0 : return false;
910 0 : } else if (!mozilla::IsFinite(arg1)) {
911 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 2 of SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs");
912 0 : return false;
913 : }
914 : float arg2;
915 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[2], &arg2)) {
916 0 : return false;
917 0 : } else if (!mozilla::IsFinite(arg2)) {
918 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 3 of SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs");
919 0 : return false;
920 : }
921 : float arg3;
922 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[3], &arg3)) {
923 0 : return false;
924 0 : } else if (!mozilla::IsFinite(arg3)) {
925 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 4 of SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs");
926 0 : return false;
927 : }
928 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs>(self->CreateSVGPathSegCurvetoCubicSmoothAbs(arg0, arg1, arg2, arg3)));
929 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
930 : static_assert(!IsPointer<decltype(result)>::value,
931 : "NewObject implies that we need to keep the object alive with a strong reference.");
932 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
933 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
934 0 : return false;
935 : }
936 0 : return true;
937 : }
938 :
939 : static const JSJitInfo createSVGPathSegCurvetoCubicSmoothAbs_methodinfo = {
940 : { (JSJitGetterOp)createSVGPathSegCurvetoCubicSmoothAbs },
941 : { prototypes::id::SVGPathElement },
942 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
943 : JSJitInfo::Method,
944 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
945 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
946 : false, /* isInfallible. False in setters. */
947 : false, /* isMovable. Not relevant for setters. */
948 : false, /* isEliminatable. Not relevant for setters. */
949 : false, /* isAlwaysInSlot. Only relevant for getters. */
950 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
951 : false, /* isTypedMethod. Only relevant for methods. */
952 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
953 : };
954 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
955 : static_assert(0 < 1, "There is no slot for us");
956 :
957 : static bool
958 0 : createSVGPathSegCurvetoCubicSmoothRel(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
959 : {
960 0 : if (MOZ_UNLIKELY(args.length() < 4)) {
961 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel");
962 : }
963 : float arg0;
964 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
965 0 : return false;
966 0 : } else if (!mozilla::IsFinite(arg0)) {
967 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel");
968 0 : return false;
969 : }
970 : float arg1;
971 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[1], &arg1)) {
972 0 : return false;
973 0 : } else if (!mozilla::IsFinite(arg1)) {
974 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 2 of SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel");
975 0 : return false;
976 : }
977 : float arg2;
978 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[2], &arg2)) {
979 0 : return false;
980 0 : } else if (!mozilla::IsFinite(arg2)) {
981 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 3 of SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel");
982 0 : return false;
983 : }
984 : float arg3;
985 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[3], &arg3)) {
986 0 : return false;
987 0 : } else if (!mozilla::IsFinite(arg3)) {
988 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 4 of SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel");
989 0 : return false;
990 : }
991 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegCurvetoCubicSmoothRel>(self->CreateSVGPathSegCurvetoCubicSmoothRel(arg0, arg1, arg2, arg3)));
992 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
993 : static_assert(!IsPointer<decltype(result)>::value,
994 : "NewObject implies that we need to keep the object alive with a strong reference.");
995 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
996 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
997 0 : return false;
998 : }
999 0 : return true;
1000 : }
1001 :
1002 : static const JSJitInfo createSVGPathSegCurvetoCubicSmoothRel_methodinfo = {
1003 : { (JSJitGetterOp)createSVGPathSegCurvetoCubicSmoothRel },
1004 : { prototypes::id::SVGPathElement },
1005 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
1006 : JSJitInfo::Method,
1007 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1008 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
1009 : false, /* isInfallible. False in setters. */
1010 : false, /* isMovable. Not relevant for setters. */
1011 : false, /* isEliminatable. Not relevant for setters. */
1012 : false, /* isAlwaysInSlot. Only relevant for getters. */
1013 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1014 : false, /* isTypedMethod. Only relevant for methods. */
1015 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1016 : };
1017 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1018 : static_assert(0 < 1, "There is no slot for us");
1019 :
1020 : static bool
1021 0 : createSVGPathSegCurvetoQuadraticSmoothAbs(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
1022 : {
1023 0 : if (MOZ_UNLIKELY(args.length() < 2)) {
1024 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothAbs");
1025 : }
1026 : float arg0;
1027 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
1028 0 : return false;
1029 0 : } else if (!mozilla::IsFinite(arg0)) {
1030 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothAbs");
1031 0 : return false;
1032 : }
1033 : float arg1;
1034 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[1], &arg1)) {
1035 0 : return false;
1036 0 : } else if (!mozilla::IsFinite(arg1)) {
1037 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 2 of SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothAbs");
1038 0 : return false;
1039 : }
1040 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs>(self->CreateSVGPathSegCurvetoQuadraticSmoothAbs(arg0, arg1)));
1041 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1042 : static_assert(!IsPointer<decltype(result)>::value,
1043 : "NewObject implies that we need to keep the object alive with a strong reference.");
1044 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
1045 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
1046 0 : return false;
1047 : }
1048 0 : return true;
1049 : }
1050 :
1051 : static const JSJitInfo createSVGPathSegCurvetoQuadraticSmoothAbs_methodinfo = {
1052 : { (JSJitGetterOp)createSVGPathSegCurvetoQuadraticSmoothAbs },
1053 : { prototypes::id::SVGPathElement },
1054 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
1055 : JSJitInfo::Method,
1056 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1057 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
1058 : false, /* isInfallible. False in setters. */
1059 : false, /* isMovable. Not relevant for setters. */
1060 : false, /* isEliminatable. Not relevant for setters. */
1061 : false, /* isAlwaysInSlot. Only relevant for getters. */
1062 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1063 : false, /* isTypedMethod. Only relevant for methods. */
1064 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1065 : };
1066 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1067 : static_assert(0 < 1, "There is no slot for us");
1068 :
1069 : static bool
1070 0 : createSVGPathSegCurvetoQuadraticSmoothRel(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, const JSJitMethodCallArgs& args)
1071 : {
1072 0 : if (MOZ_UNLIKELY(args.length() < 2)) {
1073 0 : return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothRel");
1074 : }
1075 : float arg0;
1076 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
1077 0 : return false;
1078 0 : } else if (!mozilla::IsFinite(arg0)) {
1079 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 1 of SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothRel");
1080 0 : return false;
1081 : }
1082 : float arg1;
1083 0 : if (!ValueToPrimitive<float, eDefault>(cx, args[1], &arg1)) {
1084 0 : return false;
1085 0 : } else if (!mozilla::IsFinite(arg1)) {
1086 0 : ThrowErrorMessage(cx, MSG_NOT_FINITE, "Argument 2 of SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothRel");
1087 0 : return false;
1088 : }
1089 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel>(self->CreateSVGPathSegCurvetoQuadraticSmoothRel(arg0, arg1)));
1090 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1091 : static_assert(!IsPointer<decltype(result)>::value,
1092 : "NewObject implies that we need to keep the object alive with a strong reference.");
1093 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
1094 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
1095 0 : return false;
1096 : }
1097 0 : return true;
1098 : }
1099 :
1100 : static const JSJitInfo createSVGPathSegCurvetoQuadraticSmoothRel_methodinfo = {
1101 : { (JSJitGetterOp)createSVGPathSegCurvetoQuadraticSmoothRel },
1102 : { prototypes::id::SVGPathElement },
1103 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
1104 : JSJitInfo::Method,
1105 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1106 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
1107 : false, /* isInfallible. False in setters. */
1108 : false, /* isMovable. Not relevant for setters. */
1109 : false, /* isEliminatable. Not relevant for setters. */
1110 : false, /* isAlwaysInSlot. Only relevant for getters. */
1111 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1112 : false, /* isTypedMethod. Only relevant for methods. */
1113 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1114 : };
1115 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1116 : static_assert(0 < 1, "There is no slot for us");
1117 :
1118 : static bool
1119 0 : get_pathSegList(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, JSJitGetterCallArgs args)
1120 : {
1121 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegList>(self->PathSegList()));
1122 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1123 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
1124 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
1125 0 : return false;
1126 : }
1127 0 : return true;
1128 : }
1129 :
1130 : static const JSJitInfo pathSegList_getterinfo = {
1131 : { (JSJitGetterOp)get_pathSegList },
1132 : { prototypes::id::SVGPathElement },
1133 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
1134 : JSJitInfo::Getter,
1135 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1136 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
1137 : false, /* isInfallible. False in setters. */
1138 : false, /* isMovable. Not relevant for setters. */
1139 : false, /* isEliminatable. Not relevant for setters. */
1140 : false, /* isAlwaysInSlot. Only relevant for getters. */
1141 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1142 : false, /* isTypedMethod. Only relevant for methods. */
1143 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1144 : };
1145 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1146 : static_assert(0 < 1, "There is no slot for us");
1147 :
1148 : static bool
1149 0 : get_animatedPathSegList(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGPathElement* self, JSJitGetterCallArgs args)
1150 : {
1151 0 : auto result(StrongOrRawPtr<mozilla::DOMSVGPathSegList>(self->AnimatedPathSegList()));
1152 0 : MOZ_ASSERT(!JS_IsExceptionPending(cx));
1153 0 : if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
1154 0 : MOZ_ASSERT(true || JS_IsExceptionPending(cx));
1155 0 : return false;
1156 : }
1157 0 : return true;
1158 : }
1159 :
1160 : static const JSJitInfo animatedPathSegList_getterinfo = {
1161 : { (JSJitGetterOp)get_animatedPathSegList },
1162 : { prototypes::id::SVGPathElement },
1163 : { PrototypeTraits<prototypes::id::SVGPathElement>::Depth },
1164 : JSJitInfo::Getter,
1165 : JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1166 : JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
1167 : false, /* isInfallible. False in setters. */
1168 : false, /* isMovable. Not relevant for setters. */
1169 : false, /* isEliminatable. Not relevant for setters. */
1170 : false, /* isAlwaysInSlot. Only relevant for getters. */
1171 : false, /* isLazilyCachedInSlot. Only relevant for getters. */
1172 : false, /* isTypedMethod. Only relevant for methods. */
1173 : 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1174 : };
1175 : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
1176 : static_assert(0 < 1, "There is no slot for us");
1177 :
1178 : static bool
1179 0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
1180 : {
1181 0 : mozilla::dom::SVGPathElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::SVGPathElement>(obj);
1182 : // We don't want to preserve if we don't have a wrapper, and we
1183 : // obviously can't preserve if we're not initialized.
1184 0 : if (self && self->GetWrapperPreserveColor()) {
1185 0 : PreserveWrapper(self);
1186 : }
1187 0 : return true;
1188 : }
1189 :
1190 : static void
1191 0 : _finalize(js::FreeOp* fop, JSObject* obj)
1192 : {
1193 0 : mozilla::dom::SVGPathElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::SVGPathElement>(obj);
1194 0 : if (self) {
1195 0 : ClearWrapper(self, self, obj);
1196 0 : AddForDeferredFinalization<mozilla::dom::SVGPathElement>(self);
1197 : }
1198 0 : }
1199 :
1200 : static void
1201 0 : _objectMoved(JSObject* obj, const JSObject* old)
1202 : {
1203 0 : mozilla::dom::SVGPathElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::SVGPathElement>(obj);
1204 0 : if (self) {
1205 0 : UpdateWrapper(self, self, obj, old);
1206 : }
1207 0 : }
1208 :
1209 : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
1210 : #if defined(__clang__)
1211 : #pragma clang diagnostic push
1212 : #pragma clang diagnostic ignored "-Wmissing-braces"
1213 : #endif
1214 : static const JSFunctionSpec sMethods_specs[] = {
1215 : JS_FNSPEC("getPathSegAtLength", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getPathSegAtLength_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
1216 : JS_FNSPEC("createSVGPathSegClosePath", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegClosePath_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
1217 : JS_FNSPEC("createSVGPathSegMovetoAbs", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegMovetoAbs_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
1218 : JS_FNSPEC("createSVGPathSegMovetoRel", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegMovetoRel_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
1219 : JS_FNSPEC("createSVGPathSegLinetoAbs", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegLinetoAbs_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
1220 : JS_FNSPEC("createSVGPathSegLinetoRel", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegLinetoRel_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
1221 : JS_FNSPEC("createSVGPathSegCurvetoCubicAbs", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegCurvetoCubicAbs_methodinfo), 6, JSPROP_ENUMERATE, nullptr),
1222 : JS_FNSPEC("createSVGPathSegCurvetoCubicRel", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegCurvetoCubicRel_methodinfo), 6, JSPROP_ENUMERATE, nullptr),
1223 : JS_FNSPEC("createSVGPathSegCurvetoQuadraticAbs", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegCurvetoQuadraticAbs_methodinfo), 4, JSPROP_ENUMERATE, nullptr),
1224 : JS_FNSPEC("createSVGPathSegCurvetoQuadraticRel", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegCurvetoQuadraticRel_methodinfo), 4, JSPROP_ENUMERATE, nullptr),
1225 : JS_FNSPEC("createSVGPathSegArcAbs", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegArcAbs_methodinfo), 7, JSPROP_ENUMERATE, nullptr),
1226 : JS_FNSPEC("createSVGPathSegArcRel", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegArcRel_methodinfo), 7, JSPROP_ENUMERATE, nullptr),
1227 : JS_FNSPEC("createSVGPathSegLinetoHorizontalAbs", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegLinetoHorizontalAbs_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
1228 : JS_FNSPEC("createSVGPathSegLinetoHorizontalRel", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegLinetoHorizontalRel_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
1229 : JS_FNSPEC("createSVGPathSegLinetoVerticalAbs", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegLinetoVerticalAbs_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
1230 : JS_FNSPEC("createSVGPathSegLinetoVerticalRel", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegLinetoVerticalRel_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
1231 : JS_FNSPEC("createSVGPathSegCurvetoCubicSmoothAbs", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegCurvetoCubicSmoothAbs_methodinfo), 4, JSPROP_ENUMERATE, nullptr),
1232 : JS_FNSPEC("createSVGPathSegCurvetoCubicSmoothRel", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegCurvetoCubicSmoothRel_methodinfo), 4, JSPROP_ENUMERATE, nullptr),
1233 : JS_FNSPEC("createSVGPathSegCurvetoQuadraticSmoothAbs", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegCurvetoQuadraticSmoothAbs_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
1234 : JS_FNSPEC("createSVGPathSegCurvetoQuadraticSmoothRel", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&createSVGPathSegCurvetoQuadraticSmoothRel_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
1235 : JS_FS_END
1236 : };
1237 : #if defined(__clang__)
1238 : #pragma clang diagnostic pop
1239 : #endif
1240 :
1241 :
1242 : // Can't be const because the pref-enabled boolean needs to be writable
1243 : static Prefable<const JSFunctionSpec> sMethods[] = {
1244 : { nullptr, &sMethods_specs[0] },
1245 : { nullptr, nullptr }
1246 : };
1247 :
1248 : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
1249 : "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
1250 : static_assert(20 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
1251 : "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
1252 :
1253 : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
1254 : #if defined(__clang__)
1255 : #pragma clang diagnostic push
1256 : #pragma clang diagnostic ignored "-Wmissing-braces"
1257 : #endif
1258 : static const JSPropertySpec sAttributes_specs[] = {
1259 : { "pathSegList", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &pathSegList_getterinfo, nullptr, nullptr },
1260 : { "animatedPathSegList", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &animatedPathSegList_getterinfo, nullptr, nullptr },
1261 : { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
1262 : };
1263 : #if defined(__clang__)
1264 : #pragma clang diagnostic pop
1265 : #endif
1266 :
1267 :
1268 : // Can't be const because the pref-enabled boolean needs to be writable
1269 : static Prefable<const JSPropertySpec> sAttributes[] = {
1270 : { nullptr, &sAttributes_specs[0] },
1271 : { nullptr, nullptr }
1272 : };
1273 :
1274 : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
1275 : "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
1276 : static_assert(2 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
1277 : "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
1278 :
1279 :
1280 : static uint16_t sNativeProperties_sortedPropertyIndices[22];
1281 : static PropertyInfo sNativeProperties_propertyInfos[22];
1282 :
1283 : static const NativePropertiesN<2> sNativeProperties = {
1284 : false, 0,
1285 : false, 0,
1286 : true, 0 /* sMethods */,
1287 : true, 1 /* sAttributes */,
1288 : false, 0,
1289 : false, 0,
1290 : false, 0,
1291 : -1,
1292 : 22,
1293 : sNativeProperties_sortedPropertyIndices,
1294 : {
1295 : { sMethods, &sNativeProperties_propertyInfos[0] },
1296 : { sAttributes, &sNativeProperties_propertyInfos[20] }
1297 : }
1298 : };
1299 : static_assert(22 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
1300 : "We have a property info count that is oversized");
1301 :
1302 : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
1303 : {
1304 : "Function",
1305 : JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
1306 : &sBoringInterfaceObjectClassClassOps,
1307 : JS_NULL_CLASS_SPEC,
1308 : JS_NULL_CLASS_EXT,
1309 : &sInterfaceObjectClassObjectOps
1310 : },
1311 : eInterface,
1312 : true,
1313 : prototypes::id::SVGPathElement,
1314 : PrototypeTraits<prototypes::id::SVGPathElement>::Depth,
1315 : sNativePropertyHooks,
1316 : "function SVGPathElement() {\n [native code]\n}",
1317 : SVGGeometryElementBinding::GetConstructorObject
1318 : };
1319 :
1320 : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
1321 : {
1322 : "SVGPathElementPrototype",
1323 : JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
1324 : JS_NULL_CLASS_OPS,
1325 : JS_NULL_CLASS_SPEC,
1326 : JS_NULL_CLASS_EXT,
1327 : JS_NULL_OBJECT_OPS
1328 : },
1329 : eInterfacePrototype,
1330 : false,
1331 : prototypes::id::SVGPathElement,
1332 : PrototypeTraits<prototypes::id::SVGPathElement>::Depth,
1333 : sNativePropertyHooks,
1334 : "[object SVGPathElementPrototype]",
1335 : SVGGeometryElementBinding::GetProtoObject
1336 : };
1337 :
1338 : JSObject*
1339 0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
1340 : {
1341 0 : return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
1342 : }
1343 :
1344 : static const js::ClassOps sClassOps = {
1345 : _addProperty, /* addProperty */
1346 : nullptr, /* delProperty */
1347 : nullptr, /* getProperty */
1348 : nullptr, /* setProperty */
1349 : nullptr, /* enumerate */
1350 : nullptr, /* newEnumerate */
1351 : nullptr, /* resolve */
1352 : nullptr, /* mayResolve */
1353 : _finalize, /* finalize */
1354 : nullptr, /* call */
1355 : nullptr, /* hasInstance */
1356 : nullptr, /* construct */
1357 : nullptr, /* trace */
1358 : };
1359 :
1360 : static const js::ClassExtension sClassExtension = {
1361 : nullptr, /* weakmapKeyDelegateOp */
1362 : _objectMoved /* objectMovedOp */
1363 : };
1364 :
1365 : static const DOMJSClass sClass = {
1366 : { "SVGPathElement",
1367 : JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
1368 : &sClassOps,
1369 : JS_NULL_CLASS_SPEC,
1370 : &sClassExtension,
1371 : JS_NULL_OBJECT_OPS
1372 : },
1373 : { prototypes::id::EventTarget, prototypes::id::Node, prototypes::id::Element, prototypes::id::SVGElement, prototypes::id::SVGGraphicsElement, prototypes::id::SVGGeometryElement, prototypes::id::SVGPathElement, prototypes::id::_ID_Count },
1374 : IsBaseOf<nsISupports, mozilla::dom::SVGPathElement >::value,
1375 : sNativePropertyHooks,
1376 : FindAssociatedGlobalForNative<mozilla::dom::SVGPathElement>::Get,
1377 : GetProtoObjectHandle,
1378 : GetCCParticipant<mozilla::dom::SVGPathElement>::Get()
1379 : };
1380 : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
1381 : "Must have the right minimal number of reserved slots.");
1382 : static_assert(1 >= 1,
1383 : "Must have enough reserved slots.");
1384 :
1385 : const JSClass*
1386 0 : GetJSClass()
1387 : {
1388 0 : return sClass.ToJSClass();
1389 : }
1390 :
1391 : bool
1392 0 : Wrap(JSContext* aCx, mozilla::dom::SVGPathElement* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
1393 : {
1394 : MOZ_ASSERT(static_cast<mozilla::dom::SVGPathElement*>(aObject) ==
1395 : reinterpret_cast<mozilla::dom::SVGPathElement*>(aObject),
1396 : "Multiple inheritance for mozilla::dom::SVGPathElement is broken.");
1397 : MOZ_ASSERT(static_cast<mozilla::dom::SVGGeometryElement*>(aObject) ==
1398 : reinterpret_cast<mozilla::dom::SVGGeometryElement*>(aObject),
1399 : "Multiple inheritance for mozilla::dom::SVGGeometryElement is broken.");
1400 : MOZ_ASSERT(static_cast<mozilla::dom::SVGGraphicsElement*>(aObject) ==
1401 : reinterpret_cast<mozilla::dom::SVGGraphicsElement*>(aObject),
1402 : "Multiple inheritance for mozilla::dom::SVGGraphicsElement is broken.");
1403 : MOZ_ASSERT(static_cast<nsSVGElement*>(aObject) ==
1404 : reinterpret_cast<nsSVGElement*>(aObject),
1405 : "Multiple inheritance for nsSVGElement is broken.");
1406 : MOZ_ASSERT(static_cast<mozilla::dom::Element*>(aObject) ==
1407 : reinterpret_cast<mozilla::dom::Element*>(aObject),
1408 : "Multiple inheritance for mozilla::dom::Element is broken.");
1409 : MOZ_ASSERT(static_cast<nsINode*>(aObject) ==
1410 : reinterpret_cast<nsINode*>(aObject),
1411 : "Multiple inheritance for nsINode is broken.");
1412 : MOZ_ASSERT(static_cast<mozilla::dom::EventTarget*>(aObject) ==
1413 : reinterpret_cast<mozilla::dom::EventTarget*>(aObject),
1414 : "Multiple inheritance for mozilla::dom::EventTarget is broken.");
1415 0 : MOZ_ASSERT(ToSupportsIsCorrect(aObject));
1416 0 : MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
1417 0 : MOZ_ASSERT(!aCache->GetWrapper(),
1418 : "You should probably not be using Wrap() directly; use "
1419 : "GetOrCreateDOMReflector instead");
1420 :
1421 0 : MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
1422 : "nsISupports must be on our primary inheritance chain");
1423 :
1424 0 : JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
1425 0 : if (!global) {
1426 0 : return false;
1427 : }
1428 0 : MOZ_ASSERT(JS_IsGlobalObject(global));
1429 0 : MOZ_ASSERT(JS::ObjectIsNotGray(global));
1430 :
1431 : // That might have ended up wrapping us already, due to the wonders
1432 : // of XBL. Check for that, and bail out as needed.
1433 0 : aReflector.set(aCache->GetWrapper());
1434 0 : if (aReflector) {
1435 : #ifdef DEBUG
1436 0 : binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
1437 : #endif // DEBUG
1438 0 : return true;
1439 : }
1440 :
1441 0 : JSAutoCompartment ac(aCx, global);
1442 0 : JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
1443 0 : if (!canonicalProto) {
1444 0 : return false;
1445 : }
1446 0 : JS::Rooted<JSObject*> proto(aCx);
1447 0 : if (aGivenProto) {
1448 0 : proto = aGivenProto;
1449 : // Unfortunately, while aGivenProto was in the compartment of aCx
1450 : // coming in, we changed compartments to that of "parent" so may need
1451 : // to wrap the proto here.
1452 0 : if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
1453 0 : if (!JS_WrapObject(aCx, &proto)) {
1454 0 : return false;
1455 : }
1456 : }
1457 : } else {
1458 0 : proto = canonicalProto;
1459 : }
1460 :
1461 0 : BindingJSObjectCreator<mozilla::dom::SVGPathElement> creator(aCx);
1462 0 : creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
1463 0 : if (!aReflector) {
1464 0 : return false;
1465 : }
1466 :
1467 0 : aCache->SetWrapper(aReflector);
1468 0 : creator.InitializationSucceeded();
1469 :
1470 0 : MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
1471 : aCache->GetWrapperPreserveColor() == aReflector);
1472 : // If proto != canonicalProto, we have to preserve our wrapper;
1473 : // otherwise we won't be able to properly recreate it later, since
1474 : // we won't know what proto to use. Note that we don't check
1475 : // aGivenProto here, since it's entirely possible (and even
1476 : // somewhat common) to have a non-null aGivenProto which is the
1477 : // same as canonicalProto.
1478 0 : if (proto != canonicalProto) {
1479 0 : PreserveWrapper(aObject);
1480 : }
1481 :
1482 0 : return true;
1483 : }
1484 :
1485 : const NativePropertyHooks sNativePropertyHooks[] = { {
1486 : nullptr,
1487 : nullptr,
1488 : nullptr,
1489 : { sNativeProperties.Upcast(), nullptr },
1490 : prototypes::id::SVGPathElement,
1491 : constructors::id::SVGPathElement,
1492 : SVGGeometryElementBinding::sNativePropertyHooks,
1493 : &DefaultXrayExpandoObjectClass
1494 : } };
1495 :
1496 : void
1497 0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
1498 : {
1499 0 : JS::Handle<JSObject*> parentProto(SVGGeometryElementBinding::GetProtoObjectHandle(aCx));
1500 0 : if (!parentProto) {
1501 0 : return;
1502 : }
1503 :
1504 0 : JS::Handle<JSObject*> constructorProto(SVGGeometryElementBinding::GetConstructorObjectHandle(aCx));
1505 0 : if (!constructorProto) {
1506 0 : return;
1507 : }
1508 :
1509 : static bool sIdsInited = false;
1510 0 : if (!sIdsInited && NS_IsMainThread()) {
1511 0 : if (!InitIds(aCx, sNativeProperties.Upcast())) {
1512 0 : return;
1513 : }
1514 0 : sIdsInited = true;
1515 : }
1516 :
1517 0 : JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathElement);
1518 0 : JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathElement);
1519 0 : dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
1520 : &sPrototypeClass.mBase, protoCache,
1521 : constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
1522 : interfaceCache,
1523 : sNativeProperties.Upcast(),
1524 : nullptr,
1525 : "SVGPathElement", aDefineOnGlobal,
1526 : nullptr,
1527 0 : false);
1528 : }
1529 :
1530 : JS::Handle<JSObject*>
1531 0 : GetProtoObjectHandle(JSContext* aCx)
1532 : {
1533 : /* Get the interface prototype object for this class. This will create the
1534 : object as needed. */
1535 0 : bool aDefineOnGlobal = true;
1536 :
1537 : /* Make sure our global is sane. Hopefully we can remove this sometime */
1538 0 : JSObject* global = JS::CurrentGlobalOrNull(aCx);
1539 0 : if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
1540 0 : return nullptr;
1541 : }
1542 :
1543 : /* Check to see whether the interface objects are already installed */
1544 0 : ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
1545 0 : if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathElement)) {
1546 0 : JS::Rooted<JSObject*> rootedGlobal(aCx, global);
1547 0 : CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
1548 : }
1549 :
1550 : /*
1551 : * The object might _still_ be null, but that's OK.
1552 : *
1553 : * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
1554 : * traced by TraceProtoAndIfaceCache() and its contents are never
1555 : * changed after they have been set.
1556 : *
1557 : * Calling address() avoids the read read barrier that does gray
1558 : * unmarking, but it's not possible for the object to be gray here.
1559 : */
1560 :
1561 0 : const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathElement);
1562 0 : MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
1563 0 : return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
1564 : }
1565 :
1566 : JS::Handle<JSObject*>
1567 0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
1568 : {
1569 : /* Get the interface object for this class. This will create the object as
1570 : needed. */
1571 :
1572 : /* Make sure our global is sane. Hopefully we can remove this sometime */
1573 0 : JSObject* global = JS::CurrentGlobalOrNull(aCx);
1574 0 : if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
1575 0 : return nullptr;
1576 : }
1577 :
1578 : /* Check to see whether the interface objects are already installed */
1579 0 : ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
1580 0 : if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathElement)) {
1581 0 : JS::Rooted<JSObject*> rootedGlobal(aCx, global);
1582 0 : CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
1583 : }
1584 :
1585 : /*
1586 : * The object might _still_ be null, but that's OK.
1587 : *
1588 : * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
1589 : * traced by TraceProtoAndIfaceCache() and its contents are never
1590 : * changed after they have been set.
1591 : *
1592 : * Calling address() avoids the read read barrier that does gray
1593 : * unmarking, but it's not possible for the object to be gray here.
1594 : */
1595 :
1596 0 : const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathElement);
1597 0 : MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
1598 0 : return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
1599 : }
1600 :
1601 : JSObject*
1602 0 : GetConstructorObject(JSContext* aCx)
1603 : {
1604 0 : return GetConstructorObjectHandle(aCx);
1605 : }
1606 :
1607 : } // namespace SVGPathElementBinding
1608 :
1609 :
1610 :
1611 : } // namespace dom
1612 : } // namespace mozilla
|