/work/obj-fuzz/dom/bindings/SVGElementBinding.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM SVGElement.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #include "ElementBinding.h" |
4 | | #include "EventHandlerBinding.h" |
5 | | #include "SVGElementBinding.h" |
6 | | #include "WrapperFactory.h" |
7 | | #include "mozilla/OwningNonNull.h" |
8 | | #include "mozilla/Preferences.h" |
9 | | #include "mozilla/dom/BindingUtils.h" |
10 | | #include "mozilla/dom/DOMJSClass.h" |
11 | | #include "mozilla/dom/NonRefcountedDOMObject.h" |
12 | | #include "mozilla/dom/Nullable.h" |
13 | | #include "mozilla/dom/PrimitiveConversions.h" |
14 | | #include "mozilla/dom/SVGAnimatedString.h" |
15 | | #include "mozilla/dom/SVGSVGElement.h" |
16 | | #include "mozilla/dom/XrayExpandoClass.h" |
17 | | #include "nsDOMStringMap.h" |
18 | | #include "nsGenericHTMLElement.h" |
19 | | #include "nsICSSDeclaration.h" |
20 | | #include "nsSVGElement.h" |
21 | | |
22 | | namespace mozilla { |
23 | | namespace dom { |
24 | | |
25 | | namespace binding_detail {}; // Just to make sure it's known as a namespace |
26 | | using namespace mozilla::dom::binding_detail; |
27 | | |
28 | | |
29 | | namespace SVGElement_Binding { |
30 | | |
31 | | static_assert(IsRefcounted<NativeType>::value == IsRefcounted<Element_Binding::NativeType>::value, |
32 | | "Can't inherit from an interface with a different ownership model."); |
33 | | |
34 | | MOZ_CAN_RUN_SCRIPT static bool |
35 | | get_id(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
36 | 0 | { |
37 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.id", DOM, cx); |
38 | 0 |
|
39 | 0 | DOMString result; |
40 | 0 | self->GetId(result); |
41 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
42 | 0 | if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) { |
43 | 0 | return false; |
44 | 0 | } |
45 | 0 | return true; |
46 | 0 | } |
47 | | |
48 | | MOZ_CAN_RUN_SCRIPT static bool |
49 | | set_id(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
50 | 0 | { |
51 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.id", DOM, cx); |
52 | 0 |
|
53 | 0 | binding_detail::FakeString arg0; |
54 | 0 | if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) { |
55 | 0 | return false; |
56 | 0 | } |
57 | 0 | self->SetId(NonNullHelper(Constify(arg0))); |
58 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
59 | 0 |
|
60 | 0 | return true; |
61 | 0 | } |
62 | | |
63 | | static const JSJitInfo id_getterinfo = { |
64 | | { (JSJitGetterOp)get_id }, |
65 | | { prototypes::id::SVGElement }, |
66 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
67 | | JSJitInfo::Getter, |
68 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
69 | | JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */ |
70 | | false, /* isInfallible. False in setters. */ |
71 | | false, /* isMovable. Not relevant for setters. */ |
72 | | false, /* isEliminatable. Not relevant for setters. */ |
73 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
74 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
75 | | false, /* isTypedMethod. Only relevant for methods. */ |
76 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
77 | | }; |
78 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
79 | | static_assert(0 < 1, "There is no slot for us"); |
80 | | static const JSJitInfo id_setterinfo = { |
81 | | { (JSJitGetterOp)set_id }, |
82 | | { prototypes::id::SVGElement }, |
83 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
84 | | JSJitInfo::Setter, |
85 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
86 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
87 | | false, /* isInfallible. False in setters. */ |
88 | | false, /* isMovable. Not relevant for setters. */ |
89 | | false, /* isEliminatable. Not relevant for setters. */ |
90 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
91 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
92 | | false, /* isTypedMethod. Only relevant for methods. */ |
93 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
94 | | }; |
95 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
96 | | static_assert(0 < 1, "There is no slot for us"); |
97 | | |
98 | | MOZ_CAN_RUN_SCRIPT static bool |
99 | | get_className(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
100 | 0 | { |
101 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.className", DOM, cx); |
102 | 0 |
|
103 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedString>(self->ClassName())); |
104 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
105 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
106 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
107 | 0 | return false; |
108 | 0 | } |
109 | 0 | return true; |
110 | 0 | } |
111 | | |
112 | | static const JSJitInfo className_getterinfo = { |
113 | | { (JSJitGetterOp)get_className }, |
114 | | { prototypes::id::SVGElement }, |
115 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
116 | | JSJitInfo::Getter, |
117 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
118 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
119 | | false, /* isInfallible. False in setters. */ |
120 | | true, /* isMovable. Not relevant for setters. */ |
121 | | true, /* isEliminatable. Not relevant for setters. */ |
122 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
123 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
124 | | false, /* isTypedMethod. Only relevant for methods. */ |
125 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
126 | | }; |
127 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
128 | | static_assert(0 < 1, "There is no slot for us"); |
129 | | |
130 | | MOZ_CAN_RUN_SCRIPT static bool |
131 | | get_dataset(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
132 | 0 | { |
133 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.dataset", DOM, cx); |
134 | 0 |
|
135 | 0 | auto result(StrongOrRawPtr<nsDOMStringMap>(self->Dataset())); |
136 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
137 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
138 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
139 | 0 | return false; |
140 | 0 | } |
141 | 0 | return true; |
142 | 0 | } |
143 | | |
144 | | static const JSJitInfo dataset_getterinfo = { |
145 | | { (JSJitGetterOp)get_dataset }, |
146 | | { prototypes::id::SVGElement }, |
147 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
148 | | JSJitInfo::Getter, |
149 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
150 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
151 | | false, /* isInfallible. False in setters. */ |
152 | | true, /* isMovable. Not relevant for setters. */ |
153 | | true, /* isEliminatable. Not relevant for setters. */ |
154 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
155 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
156 | | false, /* isTypedMethod. Only relevant for methods. */ |
157 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
158 | | }; |
159 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
160 | | static_assert(0 < 1, "There is no slot for us"); |
161 | | |
162 | | MOZ_CAN_RUN_SCRIPT static bool |
163 | | get_style(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
164 | 0 | { |
165 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.style", DOM, cx); |
166 | 0 |
|
167 | 0 | auto result(StrongOrRawPtr<nsICSSDeclaration>(self->Style())); |
168 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
169 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
170 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
171 | 0 | return false; |
172 | 0 | } |
173 | 0 | return true; |
174 | 0 | } |
175 | | |
176 | | MOZ_CAN_RUN_SCRIPT static bool |
177 | | set_style(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
178 | 0 | { |
179 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.style", DOM, cx); |
180 | 0 |
|
181 | 0 | JS::Rooted<JS::Value> v(cx); |
182 | 0 | if (!JS_GetProperty(cx, obj, "style", &v)) { |
183 | 0 | return false; |
184 | 0 | } |
185 | 0 | |
186 | 0 | if (!v.isObject()) { |
187 | 0 | return ThrowErrorMessage(cx, MSG_NOT_OBJECT, "SVGElement.style"); |
188 | 0 | } |
189 | 0 | |
190 | 0 | JS::Rooted<JSObject*> targetObj(cx, &v.toObject()); |
191 | 0 | return JS_SetProperty(cx, targetObj, "cssText", args[0]); |
192 | 0 | } |
193 | | |
194 | | static const JSJitInfo style_getterinfo = { |
195 | | { (JSJitGetterOp)get_style }, |
196 | | { prototypes::id::SVGElement }, |
197 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
198 | | JSJitInfo::Getter, |
199 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
200 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
201 | | false, /* isInfallible. False in setters. */ |
202 | | true, /* isMovable. Not relevant for setters. */ |
203 | | true, /* isEliminatable. Not relevant for setters. */ |
204 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
205 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
206 | | false, /* isTypedMethod. Only relevant for methods. */ |
207 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
208 | | }; |
209 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
210 | | static_assert(0 < 1, "There is no slot for us"); |
211 | | static const JSJitInfo style_setterinfo = { |
212 | | { (JSJitGetterOp)set_style }, |
213 | | { prototypes::id::SVGElement }, |
214 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
215 | | JSJitInfo::Setter, |
216 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
217 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
218 | | false, /* isInfallible. False in setters. */ |
219 | | false, /* isMovable. Not relevant for setters. */ |
220 | | false, /* isEliminatable. Not relevant for setters. */ |
221 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
222 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
223 | | false, /* isTypedMethod. Only relevant for methods. */ |
224 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
225 | | }; |
226 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
227 | | static_assert(0 < 1, "There is no slot for us"); |
228 | | |
229 | | MOZ_CAN_RUN_SCRIPT static bool |
230 | | get_ownerSVGElement(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
231 | 0 | { |
232 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ownerSVGElement", DOM, cx); |
233 | 0 |
|
234 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGSVGElement>(self->GetOwnerSVGElement())); |
235 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
236 | 0 | if (!result) { |
237 | 0 | args.rval().setNull(); |
238 | 0 | return true; |
239 | 0 | } |
240 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
241 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
242 | 0 | return false; |
243 | 0 | } |
244 | 0 | return true; |
245 | 0 | } |
246 | | |
247 | | static const JSJitInfo ownerSVGElement_getterinfo = { |
248 | | { (JSJitGetterOp)get_ownerSVGElement }, |
249 | | { prototypes::id::SVGElement }, |
250 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
251 | | JSJitInfo::Getter, |
252 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
253 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
254 | | false, /* isInfallible. False in setters. */ |
255 | | false, /* isMovable. Not relevant for setters. */ |
256 | | false, /* isEliminatable. Not relevant for setters. */ |
257 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
258 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
259 | | false, /* isTypedMethod. Only relevant for methods. */ |
260 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
261 | | }; |
262 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
263 | | static_assert(0 < 1, "There is no slot for us"); |
264 | | |
265 | | MOZ_CAN_RUN_SCRIPT static bool |
266 | | get_viewportElement(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
267 | 0 | { |
268 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.viewportElement", DOM, cx); |
269 | 0 |
|
270 | 0 | auto result(StrongOrRawPtr<nsSVGElement>(self->GetViewportElement())); |
271 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
272 | 0 | if (!result) { |
273 | 0 | args.rval().setNull(); |
274 | 0 | return true; |
275 | 0 | } |
276 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
277 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
278 | 0 | return false; |
279 | 0 | } |
280 | 0 | return true; |
281 | 0 | } |
282 | | |
283 | | static const JSJitInfo viewportElement_getterinfo = { |
284 | | { (JSJitGetterOp)get_viewportElement }, |
285 | | { prototypes::id::SVGElement }, |
286 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
287 | | JSJitInfo::Getter, |
288 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
289 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
290 | | false, /* isInfallible. False in setters. */ |
291 | | false, /* isMovable. Not relevant for setters. */ |
292 | | false, /* isEliminatable. Not relevant for setters. */ |
293 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
294 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
295 | | false, /* isTypedMethod. Only relevant for methods. */ |
296 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
297 | | }; |
298 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
299 | | static_assert(0 < 1, "There is no slot for us"); |
300 | | |
301 | | MOZ_CAN_RUN_SCRIPT static bool |
302 | | get_tabIndex(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
303 | 0 | { |
304 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.tabIndex", DOM, cx); |
305 | 0 |
|
306 | 0 | int32_t result(self->TabIndex()); |
307 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
308 | 0 | args.rval().setInt32(int32_t(result)); |
309 | 0 | return true; |
310 | 0 | } |
311 | | |
312 | | MOZ_CAN_RUN_SCRIPT static bool |
313 | | set_tabIndex(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
314 | 0 | { |
315 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.tabIndex", DOM, cx); |
316 | 0 |
|
317 | 0 | int32_t arg0; |
318 | 0 | if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) { |
319 | 0 | return false; |
320 | 0 | } |
321 | 0 | FastErrorResult rv; |
322 | 0 | self->SetTabIndex(arg0, rv); |
323 | 0 | if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) { |
324 | 0 | return false; |
325 | 0 | } |
326 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
327 | 0 |
|
328 | 0 | return true; |
329 | 0 | } |
330 | | |
331 | | static const JSJitInfo tabIndex_getterinfo = { |
332 | | { (JSJitGetterOp)get_tabIndex }, |
333 | | { prototypes::id::SVGElement }, |
334 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
335 | | JSJitInfo::Getter, |
336 | | JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */ |
337 | | JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */ |
338 | | true, /* isInfallible. False in setters. */ |
339 | | true, /* isMovable. Not relevant for setters. */ |
340 | | true, /* isEliminatable. Not relevant for setters. */ |
341 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
342 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
343 | | false, /* isTypedMethod. Only relevant for methods. */ |
344 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
345 | | }; |
346 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
347 | | static_assert(0 < 1, "There is no slot for us"); |
348 | | static const JSJitInfo tabIndex_setterinfo = { |
349 | | { (JSJitGetterOp)set_tabIndex }, |
350 | | { prototypes::id::SVGElement }, |
351 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
352 | | JSJitInfo::Setter, |
353 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
354 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
355 | | false, /* isInfallible. False in setters. */ |
356 | | false, /* isMovable. Not relevant for setters. */ |
357 | | false, /* isEliminatable. Not relevant for setters. */ |
358 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
359 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
360 | | false, /* isTypedMethod. Only relevant for methods. */ |
361 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
362 | | }; |
363 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
364 | | static_assert(0 < 1, "There is no slot for us"); |
365 | | |
366 | | MOZ_CAN_RUN_SCRIPT static bool |
367 | | focus(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, const JSJitMethodCallArgs& args) |
368 | 0 | { |
369 | 0 | AUTO_PROFILER_LABEL_FAST("SVGElement.focus", DOM, cx); |
370 | 0 |
|
371 | 0 | FastErrorResult rv; |
372 | 0 | self->Focus(rv); |
373 | 0 | if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) { |
374 | 0 | return false; |
375 | 0 | } |
376 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
377 | 0 | args.rval().setUndefined(); |
378 | 0 | return true; |
379 | 0 | } |
380 | | |
381 | | static const JSJitInfo focus_methodinfo = { |
382 | | { (JSJitGetterOp)focus }, |
383 | | { prototypes::id::SVGElement }, |
384 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
385 | | JSJitInfo::Method, |
386 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
387 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
388 | | false, /* isInfallible. False in setters. */ |
389 | | false, /* isMovable. Not relevant for setters. */ |
390 | | false, /* isEliminatable. Not relevant for setters. */ |
391 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
392 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
393 | | false, /* isTypedMethod. Only relevant for methods. */ |
394 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
395 | | }; |
396 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
397 | | static_assert(0 < 1, "There is no slot for us"); |
398 | | |
399 | | MOZ_CAN_RUN_SCRIPT static bool |
400 | | blur(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, const JSJitMethodCallArgs& args) |
401 | 0 | { |
402 | 0 | AUTO_PROFILER_LABEL_FAST("SVGElement.blur", DOM, cx); |
403 | 0 |
|
404 | 0 | FastErrorResult rv; |
405 | 0 | self->Blur(rv); |
406 | 0 | if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) { |
407 | 0 | return false; |
408 | 0 | } |
409 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
410 | 0 | args.rval().setUndefined(); |
411 | 0 | return true; |
412 | 0 | } |
413 | | |
414 | | static const JSJitInfo blur_methodinfo = { |
415 | | { (JSJitGetterOp)blur }, |
416 | | { prototypes::id::SVGElement }, |
417 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
418 | | JSJitInfo::Method, |
419 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
420 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
421 | | false, /* isInfallible. False in setters. */ |
422 | | false, /* isMovable. Not relevant for setters. */ |
423 | | false, /* isEliminatable. Not relevant for setters. */ |
424 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
425 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
426 | | false, /* isTypedMethod. Only relevant for methods. */ |
427 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
428 | | }; |
429 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
430 | | static_assert(0 < 1, "There is no slot for us"); |
431 | | |
432 | | MOZ_CAN_RUN_SCRIPT static bool |
433 | | get_oncopy(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
434 | 0 | { |
435 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.oncopy", DOM, cx); |
436 | 0 |
|
437 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOncopy()); |
438 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
439 | 0 | if (result) { |
440 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
441 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
442 | 0 | return false; |
443 | 0 | } |
444 | 0 | return true; |
445 | 0 | } else { |
446 | 0 | args.rval().setNull(); |
447 | 0 | return true; |
448 | 0 | } |
449 | 0 | } |
450 | | |
451 | | MOZ_CAN_RUN_SCRIPT static bool |
452 | | set_oncopy(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
453 | 0 | { |
454 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.oncopy", DOM, cx); |
455 | 0 |
|
456 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
457 | 0 | if (args[0].isObject()) { |
458 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
459 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
460 | 0 | } |
461 | 0 | } else { |
462 | 0 | arg0 = nullptr; |
463 | 0 | } |
464 | 0 | self->SetOncopy(Constify(arg0)); |
465 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
466 | 0 |
|
467 | 0 | return true; |
468 | 0 | } |
469 | | |
470 | | static const JSJitInfo oncopy_getterinfo = { |
471 | | { (JSJitGetterOp)get_oncopy }, |
472 | | { prototypes::id::SVGElement }, |
473 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
474 | | JSJitInfo::Getter, |
475 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
476 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
477 | | false, /* isInfallible. False in setters. */ |
478 | | false, /* isMovable. Not relevant for setters. */ |
479 | | false, /* isEliminatable. Not relevant for setters. */ |
480 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
481 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
482 | | false, /* isTypedMethod. Only relevant for methods. */ |
483 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
484 | | }; |
485 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
486 | | static_assert(0 < 1, "There is no slot for us"); |
487 | | static const JSJitInfo oncopy_setterinfo = { |
488 | | { (JSJitGetterOp)set_oncopy }, |
489 | | { prototypes::id::SVGElement }, |
490 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
491 | | JSJitInfo::Setter, |
492 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
493 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
494 | | false, /* isInfallible. False in setters. */ |
495 | | false, /* isMovable. Not relevant for setters. */ |
496 | | false, /* isEliminatable. Not relevant for setters. */ |
497 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
498 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
499 | | false, /* isTypedMethod. Only relevant for methods. */ |
500 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
501 | | }; |
502 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
503 | | static_assert(0 < 1, "There is no slot for us"); |
504 | | |
505 | | MOZ_CAN_RUN_SCRIPT static bool |
506 | | get_oncut(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
507 | 0 | { |
508 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.oncut", DOM, cx); |
509 | 0 |
|
510 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOncut()); |
511 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
512 | 0 | if (result) { |
513 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
514 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
515 | 0 | return false; |
516 | 0 | } |
517 | 0 | return true; |
518 | 0 | } else { |
519 | 0 | args.rval().setNull(); |
520 | 0 | return true; |
521 | 0 | } |
522 | 0 | } |
523 | | |
524 | | MOZ_CAN_RUN_SCRIPT static bool |
525 | | set_oncut(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
526 | 0 | { |
527 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.oncut", DOM, cx); |
528 | 0 |
|
529 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
530 | 0 | if (args[0].isObject()) { |
531 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
532 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
533 | 0 | } |
534 | 0 | } else { |
535 | 0 | arg0 = nullptr; |
536 | 0 | } |
537 | 0 | self->SetOncut(Constify(arg0)); |
538 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
539 | 0 |
|
540 | 0 | return true; |
541 | 0 | } |
542 | | |
543 | | static const JSJitInfo oncut_getterinfo = { |
544 | | { (JSJitGetterOp)get_oncut }, |
545 | | { prototypes::id::SVGElement }, |
546 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
547 | | JSJitInfo::Getter, |
548 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
549 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
550 | | false, /* isInfallible. False in setters. */ |
551 | | false, /* isMovable. Not relevant for setters. */ |
552 | | false, /* isEliminatable. Not relevant for setters. */ |
553 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
554 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
555 | | false, /* isTypedMethod. Only relevant for methods. */ |
556 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
557 | | }; |
558 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
559 | | static_assert(0 < 1, "There is no slot for us"); |
560 | | static const JSJitInfo oncut_setterinfo = { |
561 | | { (JSJitGetterOp)set_oncut }, |
562 | | { prototypes::id::SVGElement }, |
563 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
564 | | JSJitInfo::Setter, |
565 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
566 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
567 | | false, /* isInfallible. False in setters. */ |
568 | | false, /* isMovable. Not relevant for setters. */ |
569 | | false, /* isEliminatable. Not relevant for setters. */ |
570 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
571 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
572 | | false, /* isTypedMethod. Only relevant for methods. */ |
573 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
574 | | }; |
575 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
576 | | static_assert(0 < 1, "There is no slot for us"); |
577 | | |
578 | | MOZ_CAN_RUN_SCRIPT static bool |
579 | | get_onpaste(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
580 | 0 | { |
581 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onpaste", DOM, cx); |
582 | 0 |
|
583 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnpaste()); |
584 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
585 | 0 | if (result) { |
586 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
587 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
588 | 0 | return false; |
589 | 0 | } |
590 | 0 | return true; |
591 | 0 | } else { |
592 | 0 | args.rval().setNull(); |
593 | 0 | return true; |
594 | 0 | } |
595 | 0 | } |
596 | | |
597 | | MOZ_CAN_RUN_SCRIPT static bool |
598 | | set_onpaste(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
599 | 0 | { |
600 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onpaste", DOM, cx); |
601 | 0 |
|
602 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
603 | 0 | if (args[0].isObject()) { |
604 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
605 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
606 | 0 | } |
607 | 0 | } else { |
608 | 0 | arg0 = nullptr; |
609 | 0 | } |
610 | 0 | self->SetOnpaste(Constify(arg0)); |
611 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
612 | 0 |
|
613 | 0 | return true; |
614 | 0 | } |
615 | | |
616 | | static const JSJitInfo onpaste_getterinfo = { |
617 | | { (JSJitGetterOp)get_onpaste }, |
618 | | { prototypes::id::SVGElement }, |
619 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
620 | | JSJitInfo::Getter, |
621 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
622 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
623 | | false, /* isInfallible. False in setters. */ |
624 | | false, /* isMovable. Not relevant for setters. */ |
625 | | false, /* isEliminatable. Not relevant for setters. */ |
626 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
627 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
628 | | false, /* isTypedMethod. Only relevant for methods. */ |
629 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
630 | | }; |
631 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
632 | | static_assert(0 < 1, "There is no slot for us"); |
633 | | static const JSJitInfo onpaste_setterinfo = { |
634 | | { (JSJitGetterOp)set_onpaste }, |
635 | | { prototypes::id::SVGElement }, |
636 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
637 | | JSJitInfo::Setter, |
638 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
639 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
640 | | false, /* isInfallible. False in setters. */ |
641 | | false, /* isMovable. Not relevant for setters. */ |
642 | | false, /* isEliminatable. Not relevant for setters. */ |
643 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
644 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
645 | | false, /* isTypedMethod. Only relevant for methods. */ |
646 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
647 | | }; |
648 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
649 | | static_assert(0 < 1, "There is no slot for us"); |
650 | | |
651 | | MOZ_CAN_RUN_SCRIPT static bool |
652 | | get_onabort(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
653 | 0 | { |
654 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onabort", DOM, cx); |
655 | 0 |
|
656 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnabort()); |
657 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
658 | 0 | if (result) { |
659 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
660 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
661 | 0 | return false; |
662 | 0 | } |
663 | 0 | return true; |
664 | 0 | } else { |
665 | 0 | args.rval().setNull(); |
666 | 0 | return true; |
667 | 0 | } |
668 | 0 | } |
669 | | |
670 | | MOZ_CAN_RUN_SCRIPT static bool |
671 | | set_onabort(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
672 | 0 | { |
673 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onabort", DOM, cx); |
674 | 0 |
|
675 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
676 | 0 | if (args[0].isObject()) { |
677 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
678 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
679 | 0 | } |
680 | 0 | } else { |
681 | 0 | arg0 = nullptr; |
682 | 0 | } |
683 | 0 | self->SetOnabort(Constify(arg0)); |
684 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
685 | 0 |
|
686 | 0 | return true; |
687 | 0 | } |
688 | | |
689 | | static const JSJitInfo onabort_getterinfo = { |
690 | | { (JSJitGetterOp)get_onabort }, |
691 | | { prototypes::id::SVGElement }, |
692 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
693 | | JSJitInfo::Getter, |
694 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
695 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
696 | | false, /* isInfallible. False in setters. */ |
697 | | false, /* isMovable. Not relevant for setters. */ |
698 | | false, /* isEliminatable. Not relevant for setters. */ |
699 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
700 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
701 | | false, /* isTypedMethod. Only relevant for methods. */ |
702 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
703 | | }; |
704 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
705 | | static_assert(0 < 1, "There is no slot for us"); |
706 | | static const JSJitInfo onabort_setterinfo = { |
707 | | { (JSJitGetterOp)set_onabort }, |
708 | | { prototypes::id::SVGElement }, |
709 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
710 | | JSJitInfo::Setter, |
711 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
712 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
713 | | false, /* isInfallible. False in setters. */ |
714 | | false, /* isMovable. Not relevant for setters. */ |
715 | | false, /* isEliminatable. Not relevant for setters. */ |
716 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
717 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
718 | | false, /* isTypedMethod. Only relevant for methods. */ |
719 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
720 | | }; |
721 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
722 | | static_assert(0 < 1, "There is no slot for us"); |
723 | | |
724 | | MOZ_CAN_RUN_SCRIPT static bool |
725 | | get_onblur(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
726 | 0 | { |
727 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onblur", DOM, cx); |
728 | 0 |
|
729 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnblur()); |
730 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
731 | 0 | if (result) { |
732 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
733 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
734 | 0 | return false; |
735 | 0 | } |
736 | 0 | return true; |
737 | 0 | } else { |
738 | 0 | args.rval().setNull(); |
739 | 0 | return true; |
740 | 0 | } |
741 | 0 | } |
742 | | |
743 | | MOZ_CAN_RUN_SCRIPT static bool |
744 | | set_onblur(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
745 | 0 | { |
746 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onblur", DOM, cx); |
747 | 0 |
|
748 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
749 | 0 | if (args[0].isObject()) { |
750 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
751 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
752 | 0 | } |
753 | 0 | } else { |
754 | 0 | arg0 = nullptr; |
755 | 0 | } |
756 | 0 | self->SetOnblur(Constify(arg0)); |
757 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
758 | 0 |
|
759 | 0 | return true; |
760 | 0 | } |
761 | | |
762 | | static const JSJitInfo onblur_getterinfo = { |
763 | | { (JSJitGetterOp)get_onblur }, |
764 | | { prototypes::id::SVGElement }, |
765 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
766 | | JSJitInfo::Getter, |
767 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
768 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
769 | | false, /* isInfallible. False in setters. */ |
770 | | false, /* isMovable. Not relevant for setters. */ |
771 | | false, /* isEliminatable. Not relevant for setters. */ |
772 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
773 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
774 | | false, /* isTypedMethod. Only relevant for methods. */ |
775 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
776 | | }; |
777 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
778 | | static_assert(0 < 1, "There is no slot for us"); |
779 | | static const JSJitInfo onblur_setterinfo = { |
780 | | { (JSJitGetterOp)set_onblur }, |
781 | | { prototypes::id::SVGElement }, |
782 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
783 | | JSJitInfo::Setter, |
784 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
785 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
786 | | false, /* isInfallible. False in setters. */ |
787 | | false, /* isMovable. Not relevant for setters. */ |
788 | | false, /* isEliminatable. Not relevant for setters. */ |
789 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
790 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
791 | | false, /* isTypedMethod. Only relevant for methods. */ |
792 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
793 | | }; |
794 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
795 | | static_assert(0 < 1, "There is no slot for us"); |
796 | | |
797 | | MOZ_CAN_RUN_SCRIPT static bool |
798 | | get_onfocus(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
799 | 0 | { |
800 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onfocus", DOM, cx); |
801 | 0 |
|
802 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnfocus()); |
803 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
804 | 0 | if (result) { |
805 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
806 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
807 | 0 | return false; |
808 | 0 | } |
809 | 0 | return true; |
810 | 0 | } else { |
811 | 0 | args.rval().setNull(); |
812 | 0 | return true; |
813 | 0 | } |
814 | 0 | } |
815 | | |
816 | | MOZ_CAN_RUN_SCRIPT static bool |
817 | | set_onfocus(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
818 | 0 | { |
819 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onfocus", DOM, cx); |
820 | 0 |
|
821 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
822 | 0 | if (args[0].isObject()) { |
823 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
824 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
825 | 0 | } |
826 | 0 | } else { |
827 | 0 | arg0 = nullptr; |
828 | 0 | } |
829 | 0 | self->SetOnfocus(Constify(arg0)); |
830 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
831 | 0 |
|
832 | 0 | return true; |
833 | 0 | } |
834 | | |
835 | | static const JSJitInfo onfocus_getterinfo = { |
836 | | { (JSJitGetterOp)get_onfocus }, |
837 | | { prototypes::id::SVGElement }, |
838 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
839 | | JSJitInfo::Getter, |
840 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
841 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
842 | | false, /* isInfallible. False in setters. */ |
843 | | false, /* isMovable. Not relevant for setters. */ |
844 | | false, /* isEliminatable. Not relevant for setters. */ |
845 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
846 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
847 | | false, /* isTypedMethod. Only relevant for methods. */ |
848 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
849 | | }; |
850 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
851 | | static_assert(0 < 1, "There is no slot for us"); |
852 | | static const JSJitInfo onfocus_setterinfo = { |
853 | | { (JSJitGetterOp)set_onfocus }, |
854 | | { prototypes::id::SVGElement }, |
855 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
856 | | JSJitInfo::Setter, |
857 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
858 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
859 | | false, /* isInfallible. False in setters. */ |
860 | | false, /* isMovable. Not relevant for setters. */ |
861 | | false, /* isEliminatable. Not relevant for setters. */ |
862 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
863 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
864 | | false, /* isTypedMethod. Only relevant for methods. */ |
865 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
866 | | }; |
867 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
868 | | static_assert(0 < 1, "There is no slot for us"); |
869 | | |
870 | | MOZ_CAN_RUN_SCRIPT static bool |
871 | | get_onauxclick(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
872 | 0 | { |
873 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onauxclick", DOM, cx); |
874 | 0 |
|
875 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnauxclick()); |
876 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
877 | 0 | if (result) { |
878 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
879 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
880 | 0 | return false; |
881 | 0 | } |
882 | 0 | return true; |
883 | 0 | } else { |
884 | 0 | args.rval().setNull(); |
885 | 0 | return true; |
886 | 0 | } |
887 | 0 | } |
888 | | |
889 | | MOZ_CAN_RUN_SCRIPT static bool |
890 | | set_onauxclick(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
891 | 0 | { |
892 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onauxclick", DOM, cx); |
893 | 0 |
|
894 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
895 | 0 | if (args[0].isObject()) { |
896 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
897 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
898 | 0 | } |
899 | 0 | } else { |
900 | 0 | arg0 = nullptr; |
901 | 0 | } |
902 | 0 | self->SetOnauxclick(Constify(arg0)); |
903 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
904 | 0 |
|
905 | 0 | return true; |
906 | 0 | } |
907 | | |
908 | | static const JSJitInfo onauxclick_getterinfo = { |
909 | | { (JSJitGetterOp)get_onauxclick }, |
910 | | { prototypes::id::SVGElement }, |
911 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
912 | | JSJitInfo::Getter, |
913 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
914 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
915 | | false, /* isInfallible. False in setters. */ |
916 | | false, /* isMovable. Not relevant for setters. */ |
917 | | false, /* isEliminatable. Not relevant for setters. */ |
918 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
919 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
920 | | false, /* isTypedMethod. Only relevant for methods. */ |
921 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
922 | | }; |
923 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
924 | | static_assert(0 < 1, "There is no slot for us"); |
925 | | static const JSJitInfo onauxclick_setterinfo = { |
926 | | { (JSJitGetterOp)set_onauxclick }, |
927 | | { prototypes::id::SVGElement }, |
928 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
929 | | JSJitInfo::Setter, |
930 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
931 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
932 | | false, /* isInfallible. False in setters. */ |
933 | | false, /* isMovable. Not relevant for setters. */ |
934 | | false, /* isEliminatable. Not relevant for setters. */ |
935 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
936 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
937 | | false, /* isTypedMethod. Only relevant for methods. */ |
938 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
939 | | }; |
940 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
941 | | static_assert(0 < 1, "There is no slot for us"); |
942 | | |
943 | | MOZ_CAN_RUN_SCRIPT static bool |
944 | | get_oncanplay(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
945 | 0 | { |
946 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.oncanplay", DOM, cx); |
947 | 0 |
|
948 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOncanplay()); |
949 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
950 | 0 | if (result) { |
951 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
952 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
953 | 0 | return false; |
954 | 0 | } |
955 | 0 | return true; |
956 | 0 | } else { |
957 | 0 | args.rval().setNull(); |
958 | 0 | return true; |
959 | 0 | } |
960 | 0 | } |
961 | | |
962 | | MOZ_CAN_RUN_SCRIPT static bool |
963 | | set_oncanplay(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
964 | 0 | { |
965 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.oncanplay", DOM, cx); |
966 | 0 |
|
967 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
968 | 0 | if (args[0].isObject()) { |
969 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
970 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
971 | 0 | } |
972 | 0 | } else { |
973 | 0 | arg0 = nullptr; |
974 | 0 | } |
975 | 0 | self->SetOncanplay(Constify(arg0)); |
976 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
977 | 0 |
|
978 | 0 | return true; |
979 | 0 | } |
980 | | |
981 | | static const JSJitInfo oncanplay_getterinfo = { |
982 | | { (JSJitGetterOp)get_oncanplay }, |
983 | | { prototypes::id::SVGElement }, |
984 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
985 | | JSJitInfo::Getter, |
986 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
987 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
988 | | false, /* isInfallible. False in setters. */ |
989 | | false, /* isMovable. Not relevant for setters. */ |
990 | | false, /* isEliminatable. Not relevant for setters. */ |
991 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
992 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
993 | | false, /* isTypedMethod. Only relevant for methods. */ |
994 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
995 | | }; |
996 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
997 | | static_assert(0 < 1, "There is no slot for us"); |
998 | | static const JSJitInfo oncanplay_setterinfo = { |
999 | | { (JSJitGetterOp)set_oncanplay }, |
1000 | | { prototypes::id::SVGElement }, |
1001 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1002 | | JSJitInfo::Setter, |
1003 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1004 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1005 | | false, /* isInfallible. False in setters. */ |
1006 | | false, /* isMovable. Not relevant for setters. */ |
1007 | | false, /* isEliminatable. Not relevant for setters. */ |
1008 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1009 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1010 | | false, /* isTypedMethod. Only relevant for methods. */ |
1011 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1012 | | }; |
1013 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1014 | | static_assert(0 < 1, "There is no slot for us"); |
1015 | | |
1016 | | MOZ_CAN_RUN_SCRIPT static bool |
1017 | | get_oncanplaythrough(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
1018 | 0 | { |
1019 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.oncanplaythrough", DOM, cx); |
1020 | 0 |
|
1021 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOncanplaythrough()); |
1022 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1023 | 0 | if (result) { |
1024 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
1025 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
1026 | 0 | return false; |
1027 | 0 | } |
1028 | 0 | return true; |
1029 | 0 | } else { |
1030 | 0 | args.rval().setNull(); |
1031 | 0 | return true; |
1032 | 0 | } |
1033 | 0 | } |
1034 | | |
1035 | | MOZ_CAN_RUN_SCRIPT static bool |
1036 | | set_oncanplaythrough(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
1037 | 0 | { |
1038 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.oncanplaythrough", DOM, cx); |
1039 | 0 |
|
1040 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
1041 | 0 | if (args[0].isObject()) { |
1042 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
1043 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
1044 | 0 | } |
1045 | 0 | } else { |
1046 | 0 | arg0 = nullptr; |
1047 | 0 | } |
1048 | 0 | self->SetOncanplaythrough(Constify(arg0)); |
1049 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1050 | 0 |
|
1051 | 0 | return true; |
1052 | 0 | } |
1053 | | |
1054 | | static const JSJitInfo oncanplaythrough_getterinfo = { |
1055 | | { (JSJitGetterOp)get_oncanplaythrough }, |
1056 | | { prototypes::id::SVGElement }, |
1057 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1058 | | JSJitInfo::Getter, |
1059 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1060 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
1061 | | false, /* isInfallible. False in setters. */ |
1062 | | false, /* isMovable. Not relevant for setters. */ |
1063 | | false, /* isEliminatable. Not relevant for setters. */ |
1064 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1065 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1066 | | false, /* isTypedMethod. Only relevant for methods. */ |
1067 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1068 | | }; |
1069 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1070 | | static_assert(0 < 1, "There is no slot for us"); |
1071 | | static const JSJitInfo oncanplaythrough_setterinfo = { |
1072 | | { (JSJitGetterOp)set_oncanplaythrough }, |
1073 | | { prototypes::id::SVGElement }, |
1074 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1075 | | JSJitInfo::Setter, |
1076 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1077 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1078 | | false, /* isInfallible. False in setters. */ |
1079 | | false, /* isMovable. Not relevant for setters. */ |
1080 | | false, /* isEliminatable. Not relevant for setters. */ |
1081 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1082 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1083 | | false, /* isTypedMethod. Only relevant for methods. */ |
1084 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1085 | | }; |
1086 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1087 | | static_assert(0 < 1, "There is no slot for us"); |
1088 | | |
1089 | | MOZ_CAN_RUN_SCRIPT static bool |
1090 | | get_onchange(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
1091 | 0 | { |
1092 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onchange", DOM, cx); |
1093 | 0 |
|
1094 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnchange()); |
1095 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1096 | 0 | if (result) { |
1097 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
1098 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
1099 | 0 | return false; |
1100 | 0 | } |
1101 | 0 | return true; |
1102 | 0 | } else { |
1103 | 0 | args.rval().setNull(); |
1104 | 0 | return true; |
1105 | 0 | } |
1106 | 0 | } |
1107 | | |
1108 | | MOZ_CAN_RUN_SCRIPT static bool |
1109 | | set_onchange(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
1110 | 0 | { |
1111 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onchange", DOM, cx); |
1112 | 0 |
|
1113 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
1114 | 0 | if (args[0].isObject()) { |
1115 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
1116 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
1117 | 0 | } |
1118 | 0 | } else { |
1119 | 0 | arg0 = nullptr; |
1120 | 0 | } |
1121 | 0 | self->SetOnchange(Constify(arg0)); |
1122 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1123 | 0 |
|
1124 | 0 | return true; |
1125 | 0 | } |
1126 | | |
1127 | | static const JSJitInfo onchange_getterinfo = { |
1128 | | { (JSJitGetterOp)get_onchange }, |
1129 | | { prototypes::id::SVGElement }, |
1130 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1131 | | JSJitInfo::Getter, |
1132 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1133 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
1134 | | false, /* isInfallible. False in setters. */ |
1135 | | false, /* isMovable. Not relevant for setters. */ |
1136 | | false, /* isEliminatable. Not relevant for setters. */ |
1137 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1138 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1139 | | false, /* isTypedMethod. Only relevant for methods. */ |
1140 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1141 | | }; |
1142 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1143 | | static_assert(0 < 1, "There is no slot for us"); |
1144 | | static const JSJitInfo onchange_setterinfo = { |
1145 | | { (JSJitGetterOp)set_onchange }, |
1146 | | { prototypes::id::SVGElement }, |
1147 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1148 | | JSJitInfo::Setter, |
1149 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1150 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1151 | | false, /* isInfallible. False in setters. */ |
1152 | | false, /* isMovable. Not relevant for setters. */ |
1153 | | false, /* isEliminatable. Not relevant for setters. */ |
1154 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1155 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1156 | | false, /* isTypedMethod. Only relevant for methods. */ |
1157 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1158 | | }; |
1159 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1160 | | static_assert(0 < 1, "There is no slot for us"); |
1161 | | |
1162 | | MOZ_CAN_RUN_SCRIPT static bool |
1163 | | get_onclick(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
1164 | 0 | { |
1165 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onclick", DOM, cx); |
1166 | 0 |
|
1167 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnclick()); |
1168 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1169 | 0 | if (result) { |
1170 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
1171 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
1172 | 0 | return false; |
1173 | 0 | } |
1174 | 0 | return true; |
1175 | 0 | } else { |
1176 | 0 | args.rval().setNull(); |
1177 | 0 | return true; |
1178 | 0 | } |
1179 | 0 | } |
1180 | | |
1181 | | MOZ_CAN_RUN_SCRIPT static bool |
1182 | | set_onclick(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
1183 | 0 | { |
1184 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onclick", DOM, cx); |
1185 | 0 |
|
1186 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
1187 | 0 | if (args[0].isObject()) { |
1188 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
1189 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
1190 | 0 | } |
1191 | 0 | } else { |
1192 | 0 | arg0 = nullptr; |
1193 | 0 | } |
1194 | 0 | self->SetOnclick(Constify(arg0)); |
1195 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1196 | 0 |
|
1197 | 0 | return true; |
1198 | 0 | } |
1199 | | |
1200 | | static const JSJitInfo onclick_getterinfo = { |
1201 | | { (JSJitGetterOp)get_onclick }, |
1202 | | { prototypes::id::SVGElement }, |
1203 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1204 | | JSJitInfo::Getter, |
1205 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1206 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
1207 | | false, /* isInfallible. False in setters. */ |
1208 | | false, /* isMovable. Not relevant for setters. */ |
1209 | | false, /* isEliminatable. Not relevant for setters. */ |
1210 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1211 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1212 | | false, /* isTypedMethod. Only relevant for methods. */ |
1213 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1214 | | }; |
1215 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1216 | | static_assert(0 < 1, "There is no slot for us"); |
1217 | | static const JSJitInfo onclick_setterinfo = { |
1218 | | { (JSJitGetterOp)set_onclick }, |
1219 | | { prototypes::id::SVGElement }, |
1220 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1221 | | JSJitInfo::Setter, |
1222 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1223 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1224 | | false, /* isInfallible. False in setters. */ |
1225 | | false, /* isMovable. Not relevant for setters. */ |
1226 | | false, /* isEliminatable. Not relevant for setters. */ |
1227 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1228 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1229 | | false, /* isTypedMethod. Only relevant for methods. */ |
1230 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1231 | | }; |
1232 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1233 | | static_assert(0 < 1, "There is no slot for us"); |
1234 | | |
1235 | | MOZ_CAN_RUN_SCRIPT static bool |
1236 | | get_onclose(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
1237 | 0 | { |
1238 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onclose", DOM, cx); |
1239 | 0 |
|
1240 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnclose()); |
1241 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1242 | 0 | if (result) { |
1243 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
1244 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
1245 | 0 | return false; |
1246 | 0 | } |
1247 | 0 | return true; |
1248 | 0 | } else { |
1249 | 0 | args.rval().setNull(); |
1250 | 0 | return true; |
1251 | 0 | } |
1252 | 0 | } |
1253 | | |
1254 | | MOZ_CAN_RUN_SCRIPT static bool |
1255 | | set_onclose(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
1256 | 0 | { |
1257 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onclose", DOM, cx); |
1258 | 0 |
|
1259 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
1260 | 0 | if (args[0].isObject()) { |
1261 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
1262 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
1263 | 0 | } |
1264 | 0 | } else { |
1265 | 0 | arg0 = nullptr; |
1266 | 0 | } |
1267 | 0 | self->SetOnclose(Constify(arg0)); |
1268 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1269 | 0 |
|
1270 | 0 | return true; |
1271 | 0 | } |
1272 | | |
1273 | | static const JSJitInfo onclose_getterinfo = { |
1274 | | { (JSJitGetterOp)get_onclose }, |
1275 | | { prototypes::id::SVGElement }, |
1276 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1277 | | JSJitInfo::Getter, |
1278 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1279 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
1280 | | false, /* isInfallible. False in setters. */ |
1281 | | false, /* isMovable. Not relevant for setters. */ |
1282 | | false, /* isEliminatable. Not relevant for setters. */ |
1283 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1284 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1285 | | false, /* isTypedMethod. Only relevant for methods. */ |
1286 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1287 | | }; |
1288 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1289 | | static_assert(0 < 1, "There is no slot for us"); |
1290 | | static const JSJitInfo onclose_setterinfo = { |
1291 | | { (JSJitGetterOp)set_onclose }, |
1292 | | { prototypes::id::SVGElement }, |
1293 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1294 | | JSJitInfo::Setter, |
1295 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1296 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1297 | | false, /* isInfallible. False in setters. */ |
1298 | | false, /* isMovable. Not relevant for setters. */ |
1299 | | false, /* isEliminatable. Not relevant for setters. */ |
1300 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1301 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1302 | | false, /* isTypedMethod. Only relevant for methods. */ |
1303 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1304 | | }; |
1305 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1306 | | static_assert(0 < 1, "There is no slot for us"); |
1307 | | |
1308 | | MOZ_CAN_RUN_SCRIPT static bool |
1309 | | get_oncontextmenu(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
1310 | 0 | { |
1311 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.oncontextmenu", DOM, cx); |
1312 | 0 |
|
1313 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOncontextmenu()); |
1314 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1315 | 0 | if (result) { |
1316 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
1317 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
1318 | 0 | return false; |
1319 | 0 | } |
1320 | 0 | return true; |
1321 | 0 | } else { |
1322 | 0 | args.rval().setNull(); |
1323 | 0 | return true; |
1324 | 0 | } |
1325 | 0 | } |
1326 | | |
1327 | | MOZ_CAN_RUN_SCRIPT static bool |
1328 | | set_oncontextmenu(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
1329 | 0 | { |
1330 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.oncontextmenu", DOM, cx); |
1331 | 0 |
|
1332 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
1333 | 0 | if (args[0].isObject()) { |
1334 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
1335 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
1336 | 0 | } |
1337 | 0 | } else { |
1338 | 0 | arg0 = nullptr; |
1339 | 0 | } |
1340 | 0 | self->SetOncontextmenu(Constify(arg0)); |
1341 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1342 | 0 |
|
1343 | 0 | return true; |
1344 | 0 | } |
1345 | | |
1346 | | static const JSJitInfo oncontextmenu_getterinfo = { |
1347 | | { (JSJitGetterOp)get_oncontextmenu }, |
1348 | | { prototypes::id::SVGElement }, |
1349 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1350 | | JSJitInfo::Getter, |
1351 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1352 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
1353 | | false, /* isInfallible. False in setters. */ |
1354 | | false, /* isMovable. Not relevant for setters. */ |
1355 | | false, /* isEliminatable. Not relevant for setters. */ |
1356 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1357 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1358 | | false, /* isTypedMethod. Only relevant for methods. */ |
1359 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1360 | | }; |
1361 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1362 | | static_assert(0 < 1, "There is no slot for us"); |
1363 | | static const JSJitInfo oncontextmenu_setterinfo = { |
1364 | | { (JSJitGetterOp)set_oncontextmenu }, |
1365 | | { prototypes::id::SVGElement }, |
1366 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1367 | | JSJitInfo::Setter, |
1368 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1369 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1370 | | false, /* isInfallible. False in setters. */ |
1371 | | false, /* isMovable. Not relevant for setters. */ |
1372 | | false, /* isEliminatable. Not relevant for setters. */ |
1373 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1374 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1375 | | false, /* isTypedMethod. Only relevant for methods. */ |
1376 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1377 | | }; |
1378 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1379 | | static_assert(0 < 1, "There is no slot for us"); |
1380 | | |
1381 | | MOZ_CAN_RUN_SCRIPT static bool |
1382 | | get_ondblclick(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
1383 | 0 | { |
1384 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ondblclick", DOM, cx); |
1385 | 0 |
|
1386 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOndblclick()); |
1387 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1388 | 0 | if (result) { |
1389 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
1390 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
1391 | 0 | return false; |
1392 | 0 | } |
1393 | 0 | return true; |
1394 | 0 | } else { |
1395 | 0 | args.rval().setNull(); |
1396 | 0 | return true; |
1397 | 0 | } |
1398 | 0 | } |
1399 | | |
1400 | | MOZ_CAN_RUN_SCRIPT static bool |
1401 | | set_ondblclick(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
1402 | 0 | { |
1403 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ondblclick", DOM, cx); |
1404 | 0 |
|
1405 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
1406 | 0 | if (args[0].isObject()) { |
1407 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
1408 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
1409 | 0 | } |
1410 | 0 | } else { |
1411 | 0 | arg0 = nullptr; |
1412 | 0 | } |
1413 | 0 | self->SetOndblclick(Constify(arg0)); |
1414 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1415 | 0 |
|
1416 | 0 | return true; |
1417 | 0 | } |
1418 | | |
1419 | | static const JSJitInfo ondblclick_getterinfo = { |
1420 | | { (JSJitGetterOp)get_ondblclick }, |
1421 | | { prototypes::id::SVGElement }, |
1422 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1423 | | JSJitInfo::Getter, |
1424 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1425 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
1426 | | false, /* isInfallible. False in setters. */ |
1427 | | false, /* isMovable. Not relevant for setters. */ |
1428 | | false, /* isEliminatable. Not relevant for setters. */ |
1429 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1430 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1431 | | false, /* isTypedMethod. Only relevant for methods. */ |
1432 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1433 | | }; |
1434 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1435 | | static_assert(0 < 1, "There is no slot for us"); |
1436 | | static const JSJitInfo ondblclick_setterinfo = { |
1437 | | { (JSJitGetterOp)set_ondblclick }, |
1438 | | { prototypes::id::SVGElement }, |
1439 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1440 | | JSJitInfo::Setter, |
1441 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1442 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1443 | | false, /* isInfallible. False in setters. */ |
1444 | | false, /* isMovable. Not relevant for setters. */ |
1445 | | false, /* isEliminatable. Not relevant for setters. */ |
1446 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1447 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1448 | | false, /* isTypedMethod. Only relevant for methods. */ |
1449 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1450 | | }; |
1451 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1452 | | static_assert(0 < 1, "There is no slot for us"); |
1453 | | |
1454 | | MOZ_CAN_RUN_SCRIPT static bool |
1455 | | get_ondrag(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
1456 | 0 | { |
1457 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ondrag", DOM, cx); |
1458 | 0 |
|
1459 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOndrag()); |
1460 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1461 | 0 | if (result) { |
1462 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
1463 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
1464 | 0 | return false; |
1465 | 0 | } |
1466 | 0 | return true; |
1467 | 0 | } else { |
1468 | 0 | args.rval().setNull(); |
1469 | 0 | return true; |
1470 | 0 | } |
1471 | 0 | } |
1472 | | |
1473 | | MOZ_CAN_RUN_SCRIPT static bool |
1474 | | set_ondrag(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
1475 | 0 | { |
1476 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ondrag", DOM, cx); |
1477 | 0 |
|
1478 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
1479 | 0 | if (args[0].isObject()) { |
1480 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
1481 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
1482 | 0 | } |
1483 | 0 | } else { |
1484 | 0 | arg0 = nullptr; |
1485 | 0 | } |
1486 | 0 | self->SetOndrag(Constify(arg0)); |
1487 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1488 | 0 |
|
1489 | 0 | return true; |
1490 | 0 | } |
1491 | | |
1492 | | static const JSJitInfo ondrag_getterinfo = { |
1493 | | { (JSJitGetterOp)get_ondrag }, |
1494 | | { prototypes::id::SVGElement }, |
1495 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1496 | | JSJitInfo::Getter, |
1497 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1498 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
1499 | | false, /* isInfallible. False in setters. */ |
1500 | | false, /* isMovable. Not relevant for setters. */ |
1501 | | false, /* isEliminatable. Not relevant for setters. */ |
1502 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1503 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1504 | | false, /* isTypedMethod. Only relevant for methods. */ |
1505 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1506 | | }; |
1507 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1508 | | static_assert(0 < 1, "There is no slot for us"); |
1509 | | static const JSJitInfo ondrag_setterinfo = { |
1510 | | { (JSJitGetterOp)set_ondrag }, |
1511 | | { prototypes::id::SVGElement }, |
1512 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1513 | | JSJitInfo::Setter, |
1514 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1515 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1516 | | false, /* isInfallible. False in setters. */ |
1517 | | false, /* isMovable. Not relevant for setters. */ |
1518 | | false, /* isEliminatable. Not relevant for setters. */ |
1519 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1520 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1521 | | false, /* isTypedMethod. Only relevant for methods. */ |
1522 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1523 | | }; |
1524 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1525 | | static_assert(0 < 1, "There is no slot for us"); |
1526 | | |
1527 | | MOZ_CAN_RUN_SCRIPT static bool |
1528 | | get_ondragend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
1529 | 0 | { |
1530 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ondragend", DOM, cx); |
1531 | 0 |
|
1532 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOndragend()); |
1533 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1534 | 0 | if (result) { |
1535 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
1536 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
1537 | 0 | return false; |
1538 | 0 | } |
1539 | 0 | return true; |
1540 | 0 | } else { |
1541 | 0 | args.rval().setNull(); |
1542 | 0 | return true; |
1543 | 0 | } |
1544 | 0 | } |
1545 | | |
1546 | | MOZ_CAN_RUN_SCRIPT static bool |
1547 | | set_ondragend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
1548 | 0 | { |
1549 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ondragend", DOM, cx); |
1550 | 0 |
|
1551 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
1552 | 0 | if (args[0].isObject()) { |
1553 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
1554 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
1555 | 0 | } |
1556 | 0 | } else { |
1557 | 0 | arg0 = nullptr; |
1558 | 0 | } |
1559 | 0 | self->SetOndragend(Constify(arg0)); |
1560 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1561 | 0 |
|
1562 | 0 | return true; |
1563 | 0 | } |
1564 | | |
1565 | | static const JSJitInfo ondragend_getterinfo = { |
1566 | | { (JSJitGetterOp)get_ondragend }, |
1567 | | { prototypes::id::SVGElement }, |
1568 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1569 | | JSJitInfo::Getter, |
1570 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1571 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
1572 | | false, /* isInfallible. False in setters. */ |
1573 | | false, /* isMovable. Not relevant for setters. */ |
1574 | | false, /* isEliminatable. Not relevant for setters. */ |
1575 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1576 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1577 | | false, /* isTypedMethod. Only relevant for methods. */ |
1578 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1579 | | }; |
1580 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1581 | | static_assert(0 < 1, "There is no slot for us"); |
1582 | | static const JSJitInfo ondragend_setterinfo = { |
1583 | | { (JSJitGetterOp)set_ondragend }, |
1584 | | { prototypes::id::SVGElement }, |
1585 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1586 | | JSJitInfo::Setter, |
1587 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1588 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1589 | | false, /* isInfallible. False in setters. */ |
1590 | | false, /* isMovable. Not relevant for setters. */ |
1591 | | false, /* isEliminatable. Not relevant for setters. */ |
1592 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1593 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1594 | | false, /* isTypedMethod. Only relevant for methods. */ |
1595 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1596 | | }; |
1597 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1598 | | static_assert(0 < 1, "There is no slot for us"); |
1599 | | |
1600 | | MOZ_CAN_RUN_SCRIPT static bool |
1601 | | get_ondragenter(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
1602 | 0 | { |
1603 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ondragenter", DOM, cx); |
1604 | 0 |
|
1605 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOndragenter()); |
1606 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1607 | 0 | if (result) { |
1608 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
1609 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
1610 | 0 | return false; |
1611 | 0 | } |
1612 | 0 | return true; |
1613 | 0 | } else { |
1614 | 0 | args.rval().setNull(); |
1615 | 0 | return true; |
1616 | 0 | } |
1617 | 0 | } |
1618 | | |
1619 | | MOZ_CAN_RUN_SCRIPT static bool |
1620 | | set_ondragenter(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
1621 | 0 | { |
1622 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ondragenter", DOM, cx); |
1623 | 0 |
|
1624 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
1625 | 0 | if (args[0].isObject()) { |
1626 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
1627 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
1628 | 0 | } |
1629 | 0 | } else { |
1630 | 0 | arg0 = nullptr; |
1631 | 0 | } |
1632 | 0 | self->SetOndragenter(Constify(arg0)); |
1633 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1634 | 0 |
|
1635 | 0 | return true; |
1636 | 0 | } |
1637 | | |
1638 | | static const JSJitInfo ondragenter_getterinfo = { |
1639 | | { (JSJitGetterOp)get_ondragenter }, |
1640 | | { prototypes::id::SVGElement }, |
1641 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1642 | | JSJitInfo::Getter, |
1643 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1644 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
1645 | | false, /* isInfallible. False in setters. */ |
1646 | | false, /* isMovable. Not relevant for setters. */ |
1647 | | false, /* isEliminatable. Not relevant for setters. */ |
1648 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1649 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1650 | | false, /* isTypedMethod. Only relevant for methods. */ |
1651 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1652 | | }; |
1653 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1654 | | static_assert(0 < 1, "There is no slot for us"); |
1655 | | static const JSJitInfo ondragenter_setterinfo = { |
1656 | | { (JSJitGetterOp)set_ondragenter }, |
1657 | | { prototypes::id::SVGElement }, |
1658 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1659 | | JSJitInfo::Setter, |
1660 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1661 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1662 | | false, /* isInfallible. False in setters. */ |
1663 | | false, /* isMovable. Not relevant for setters. */ |
1664 | | false, /* isEliminatable. Not relevant for setters. */ |
1665 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1666 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1667 | | false, /* isTypedMethod. Only relevant for methods. */ |
1668 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1669 | | }; |
1670 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1671 | | static_assert(0 < 1, "There is no slot for us"); |
1672 | | |
1673 | | MOZ_CAN_RUN_SCRIPT static bool |
1674 | | get_ondragexit(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
1675 | 0 | { |
1676 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ondragexit", DOM, cx); |
1677 | 0 |
|
1678 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOndragexit()); |
1679 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1680 | 0 | if (result) { |
1681 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
1682 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
1683 | 0 | return false; |
1684 | 0 | } |
1685 | 0 | return true; |
1686 | 0 | } else { |
1687 | 0 | args.rval().setNull(); |
1688 | 0 | return true; |
1689 | 0 | } |
1690 | 0 | } |
1691 | | |
1692 | | MOZ_CAN_RUN_SCRIPT static bool |
1693 | | set_ondragexit(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
1694 | 0 | { |
1695 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ondragexit", DOM, cx); |
1696 | 0 |
|
1697 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
1698 | 0 | if (args[0].isObject()) { |
1699 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
1700 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
1701 | 0 | } |
1702 | 0 | } else { |
1703 | 0 | arg0 = nullptr; |
1704 | 0 | } |
1705 | 0 | self->SetOndragexit(Constify(arg0)); |
1706 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1707 | 0 |
|
1708 | 0 | return true; |
1709 | 0 | } |
1710 | | |
1711 | | static const JSJitInfo ondragexit_getterinfo = { |
1712 | | { (JSJitGetterOp)get_ondragexit }, |
1713 | | { prototypes::id::SVGElement }, |
1714 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1715 | | JSJitInfo::Getter, |
1716 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1717 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
1718 | | false, /* isInfallible. False in setters. */ |
1719 | | false, /* isMovable. Not relevant for setters. */ |
1720 | | false, /* isEliminatable. Not relevant for setters. */ |
1721 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1722 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1723 | | false, /* isTypedMethod. Only relevant for methods. */ |
1724 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1725 | | }; |
1726 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1727 | | static_assert(0 < 1, "There is no slot for us"); |
1728 | | static const JSJitInfo ondragexit_setterinfo = { |
1729 | | { (JSJitGetterOp)set_ondragexit }, |
1730 | | { prototypes::id::SVGElement }, |
1731 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1732 | | JSJitInfo::Setter, |
1733 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1734 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1735 | | false, /* isInfallible. False in setters. */ |
1736 | | false, /* isMovable. Not relevant for setters. */ |
1737 | | false, /* isEliminatable. Not relevant for setters. */ |
1738 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1739 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1740 | | false, /* isTypedMethod. Only relevant for methods. */ |
1741 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1742 | | }; |
1743 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1744 | | static_assert(0 < 1, "There is no slot for us"); |
1745 | | |
1746 | | MOZ_CAN_RUN_SCRIPT static bool |
1747 | | get_ondragleave(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
1748 | 0 | { |
1749 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ondragleave", DOM, cx); |
1750 | 0 |
|
1751 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOndragleave()); |
1752 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1753 | 0 | if (result) { |
1754 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
1755 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
1756 | 0 | return false; |
1757 | 0 | } |
1758 | 0 | return true; |
1759 | 0 | } else { |
1760 | 0 | args.rval().setNull(); |
1761 | 0 | return true; |
1762 | 0 | } |
1763 | 0 | } |
1764 | | |
1765 | | MOZ_CAN_RUN_SCRIPT static bool |
1766 | | set_ondragleave(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
1767 | 0 | { |
1768 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ondragleave", DOM, cx); |
1769 | 0 |
|
1770 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
1771 | 0 | if (args[0].isObject()) { |
1772 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
1773 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
1774 | 0 | } |
1775 | 0 | } else { |
1776 | 0 | arg0 = nullptr; |
1777 | 0 | } |
1778 | 0 | self->SetOndragleave(Constify(arg0)); |
1779 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1780 | 0 |
|
1781 | 0 | return true; |
1782 | 0 | } |
1783 | | |
1784 | | static const JSJitInfo ondragleave_getterinfo = { |
1785 | | { (JSJitGetterOp)get_ondragleave }, |
1786 | | { prototypes::id::SVGElement }, |
1787 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1788 | | JSJitInfo::Getter, |
1789 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1790 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
1791 | | false, /* isInfallible. False in setters. */ |
1792 | | false, /* isMovable. Not relevant for setters. */ |
1793 | | false, /* isEliminatable. Not relevant for setters. */ |
1794 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1795 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1796 | | false, /* isTypedMethod. Only relevant for methods. */ |
1797 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1798 | | }; |
1799 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1800 | | static_assert(0 < 1, "There is no slot for us"); |
1801 | | static const JSJitInfo ondragleave_setterinfo = { |
1802 | | { (JSJitGetterOp)set_ondragleave }, |
1803 | | { prototypes::id::SVGElement }, |
1804 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1805 | | JSJitInfo::Setter, |
1806 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1807 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1808 | | false, /* isInfallible. False in setters. */ |
1809 | | false, /* isMovable. Not relevant for setters. */ |
1810 | | false, /* isEliminatable. Not relevant for setters. */ |
1811 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1812 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1813 | | false, /* isTypedMethod. Only relevant for methods. */ |
1814 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1815 | | }; |
1816 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1817 | | static_assert(0 < 1, "There is no slot for us"); |
1818 | | |
1819 | | MOZ_CAN_RUN_SCRIPT static bool |
1820 | | get_ondragover(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
1821 | 0 | { |
1822 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ondragover", DOM, cx); |
1823 | 0 |
|
1824 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOndragover()); |
1825 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1826 | 0 | if (result) { |
1827 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
1828 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
1829 | 0 | return false; |
1830 | 0 | } |
1831 | 0 | return true; |
1832 | 0 | } else { |
1833 | 0 | args.rval().setNull(); |
1834 | 0 | return true; |
1835 | 0 | } |
1836 | 0 | } |
1837 | | |
1838 | | MOZ_CAN_RUN_SCRIPT static bool |
1839 | | set_ondragover(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
1840 | 0 | { |
1841 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ondragover", DOM, cx); |
1842 | 0 |
|
1843 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
1844 | 0 | if (args[0].isObject()) { |
1845 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
1846 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
1847 | 0 | } |
1848 | 0 | } else { |
1849 | 0 | arg0 = nullptr; |
1850 | 0 | } |
1851 | 0 | self->SetOndragover(Constify(arg0)); |
1852 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1853 | 0 |
|
1854 | 0 | return true; |
1855 | 0 | } |
1856 | | |
1857 | | static const JSJitInfo ondragover_getterinfo = { |
1858 | | { (JSJitGetterOp)get_ondragover }, |
1859 | | { prototypes::id::SVGElement }, |
1860 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1861 | | JSJitInfo::Getter, |
1862 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1863 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
1864 | | false, /* isInfallible. False in setters. */ |
1865 | | false, /* isMovable. Not relevant for setters. */ |
1866 | | false, /* isEliminatable. Not relevant for setters. */ |
1867 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1868 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1869 | | false, /* isTypedMethod. Only relevant for methods. */ |
1870 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1871 | | }; |
1872 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1873 | | static_assert(0 < 1, "There is no slot for us"); |
1874 | | static const JSJitInfo ondragover_setterinfo = { |
1875 | | { (JSJitGetterOp)set_ondragover }, |
1876 | | { prototypes::id::SVGElement }, |
1877 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1878 | | JSJitInfo::Setter, |
1879 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1880 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1881 | | false, /* isInfallible. False in setters. */ |
1882 | | false, /* isMovable. Not relevant for setters. */ |
1883 | | false, /* isEliminatable. Not relevant for setters. */ |
1884 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1885 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1886 | | false, /* isTypedMethod. Only relevant for methods. */ |
1887 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1888 | | }; |
1889 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1890 | | static_assert(0 < 1, "There is no slot for us"); |
1891 | | |
1892 | | MOZ_CAN_RUN_SCRIPT static bool |
1893 | | get_ondragstart(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
1894 | 0 | { |
1895 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ondragstart", DOM, cx); |
1896 | 0 |
|
1897 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOndragstart()); |
1898 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1899 | 0 | if (result) { |
1900 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
1901 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
1902 | 0 | return false; |
1903 | 0 | } |
1904 | 0 | return true; |
1905 | 0 | } else { |
1906 | 0 | args.rval().setNull(); |
1907 | 0 | return true; |
1908 | 0 | } |
1909 | 0 | } |
1910 | | |
1911 | | MOZ_CAN_RUN_SCRIPT static bool |
1912 | | set_ondragstart(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
1913 | 0 | { |
1914 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ondragstart", DOM, cx); |
1915 | 0 |
|
1916 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
1917 | 0 | if (args[0].isObject()) { |
1918 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
1919 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
1920 | 0 | } |
1921 | 0 | } else { |
1922 | 0 | arg0 = nullptr; |
1923 | 0 | } |
1924 | 0 | self->SetOndragstart(Constify(arg0)); |
1925 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1926 | 0 |
|
1927 | 0 | return true; |
1928 | 0 | } |
1929 | | |
1930 | | static const JSJitInfo ondragstart_getterinfo = { |
1931 | | { (JSJitGetterOp)get_ondragstart }, |
1932 | | { prototypes::id::SVGElement }, |
1933 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1934 | | JSJitInfo::Getter, |
1935 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1936 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
1937 | | false, /* isInfallible. False in setters. */ |
1938 | | false, /* isMovable. Not relevant for setters. */ |
1939 | | false, /* isEliminatable. Not relevant for setters. */ |
1940 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1941 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1942 | | false, /* isTypedMethod. Only relevant for methods. */ |
1943 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1944 | | }; |
1945 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1946 | | static_assert(0 < 1, "There is no slot for us"); |
1947 | | static const JSJitInfo ondragstart_setterinfo = { |
1948 | | { (JSJitGetterOp)set_ondragstart }, |
1949 | | { prototypes::id::SVGElement }, |
1950 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
1951 | | JSJitInfo::Setter, |
1952 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
1953 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
1954 | | false, /* isInfallible. False in setters. */ |
1955 | | false, /* isMovable. Not relevant for setters. */ |
1956 | | false, /* isEliminatable. Not relevant for setters. */ |
1957 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
1958 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
1959 | | false, /* isTypedMethod. Only relevant for methods. */ |
1960 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
1961 | | }; |
1962 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
1963 | | static_assert(0 < 1, "There is no slot for us"); |
1964 | | |
1965 | | MOZ_CAN_RUN_SCRIPT static bool |
1966 | | get_ondrop(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
1967 | 0 | { |
1968 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ondrop", DOM, cx); |
1969 | 0 |
|
1970 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOndrop()); |
1971 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1972 | 0 | if (result) { |
1973 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
1974 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
1975 | 0 | return false; |
1976 | 0 | } |
1977 | 0 | return true; |
1978 | 0 | } else { |
1979 | 0 | args.rval().setNull(); |
1980 | 0 | return true; |
1981 | 0 | } |
1982 | 0 | } |
1983 | | |
1984 | | MOZ_CAN_RUN_SCRIPT static bool |
1985 | | set_ondrop(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
1986 | 0 | { |
1987 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ondrop", DOM, cx); |
1988 | 0 |
|
1989 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
1990 | 0 | if (args[0].isObject()) { |
1991 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
1992 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
1993 | 0 | } |
1994 | 0 | } else { |
1995 | 0 | arg0 = nullptr; |
1996 | 0 | } |
1997 | 0 | self->SetOndrop(Constify(arg0)); |
1998 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
1999 | 0 |
|
2000 | 0 | return true; |
2001 | 0 | } |
2002 | | |
2003 | | static const JSJitInfo ondrop_getterinfo = { |
2004 | | { (JSJitGetterOp)get_ondrop }, |
2005 | | { prototypes::id::SVGElement }, |
2006 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2007 | | JSJitInfo::Getter, |
2008 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2009 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
2010 | | false, /* isInfallible. False in setters. */ |
2011 | | false, /* isMovable. Not relevant for setters. */ |
2012 | | false, /* isEliminatable. Not relevant for setters. */ |
2013 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2014 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2015 | | false, /* isTypedMethod. Only relevant for methods. */ |
2016 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2017 | | }; |
2018 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2019 | | static_assert(0 < 1, "There is no slot for us"); |
2020 | | static const JSJitInfo ondrop_setterinfo = { |
2021 | | { (JSJitGetterOp)set_ondrop }, |
2022 | | { prototypes::id::SVGElement }, |
2023 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2024 | | JSJitInfo::Setter, |
2025 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2026 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
2027 | | false, /* isInfallible. False in setters. */ |
2028 | | false, /* isMovable. Not relevant for setters. */ |
2029 | | false, /* isEliminatable. Not relevant for setters. */ |
2030 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2031 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2032 | | false, /* isTypedMethod. Only relevant for methods. */ |
2033 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2034 | | }; |
2035 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2036 | | static_assert(0 < 1, "There is no slot for us"); |
2037 | | |
2038 | | MOZ_CAN_RUN_SCRIPT static bool |
2039 | | get_ondurationchange(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
2040 | 0 | { |
2041 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ondurationchange", DOM, cx); |
2042 | 0 |
|
2043 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOndurationchange()); |
2044 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2045 | 0 | if (result) { |
2046 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
2047 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
2048 | 0 | return false; |
2049 | 0 | } |
2050 | 0 | return true; |
2051 | 0 | } else { |
2052 | 0 | args.rval().setNull(); |
2053 | 0 | return true; |
2054 | 0 | } |
2055 | 0 | } |
2056 | | |
2057 | | MOZ_CAN_RUN_SCRIPT static bool |
2058 | | set_ondurationchange(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
2059 | 0 | { |
2060 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ondurationchange", DOM, cx); |
2061 | 0 |
|
2062 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
2063 | 0 | if (args[0].isObject()) { |
2064 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
2065 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
2066 | 0 | } |
2067 | 0 | } else { |
2068 | 0 | arg0 = nullptr; |
2069 | 0 | } |
2070 | 0 | self->SetOndurationchange(Constify(arg0)); |
2071 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2072 | 0 |
|
2073 | 0 | return true; |
2074 | 0 | } |
2075 | | |
2076 | | static const JSJitInfo ondurationchange_getterinfo = { |
2077 | | { (JSJitGetterOp)get_ondurationchange }, |
2078 | | { prototypes::id::SVGElement }, |
2079 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2080 | | JSJitInfo::Getter, |
2081 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2082 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
2083 | | false, /* isInfallible. False in setters. */ |
2084 | | false, /* isMovable. Not relevant for setters. */ |
2085 | | false, /* isEliminatable. Not relevant for setters. */ |
2086 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2087 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2088 | | false, /* isTypedMethod. Only relevant for methods. */ |
2089 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2090 | | }; |
2091 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2092 | | static_assert(0 < 1, "There is no slot for us"); |
2093 | | static const JSJitInfo ondurationchange_setterinfo = { |
2094 | | { (JSJitGetterOp)set_ondurationchange }, |
2095 | | { prototypes::id::SVGElement }, |
2096 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2097 | | JSJitInfo::Setter, |
2098 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2099 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
2100 | | false, /* isInfallible. False in setters. */ |
2101 | | false, /* isMovable. Not relevant for setters. */ |
2102 | | false, /* isEliminatable. Not relevant for setters. */ |
2103 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2104 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2105 | | false, /* isTypedMethod. Only relevant for methods. */ |
2106 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2107 | | }; |
2108 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2109 | | static_assert(0 < 1, "There is no slot for us"); |
2110 | | |
2111 | | MOZ_CAN_RUN_SCRIPT static bool |
2112 | | get_onemptied(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
2113 | 0 | { |
2114 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onemptied", DOM, cx); |
2115 | 0 |
|
2116 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnemptied()); |
2117 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2118 | 0 | if (result) { |
2119 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
2120 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
2121 | 0 | return false; |
2122 | 0 | } |
2123 | 0 | return true; |
2124 | 0 | } else { |
2125 | 0 | args.rval().setNull(); |
2126 | 0 | return true; |
2127 | 0 | } |
2128 | 0 | } |
2129 | | |
2130 | | MOZ_CAN_RUN_SCRIPT static bool |
2131 | | set_onemptied(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
2132 | 0 | { |
2133 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onemptied", DOM, cx); |
2134 | 0 |
|
2135 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
2136 | 0 | if (args[0].isObject()) { |
2137 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
2138 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
2139 | 0 | } |
2140 | 0 | } else { |
2141 | 0 | arg0 = nullptr; |
2142 | 0 | } |
2143 | 0 | self->SetOnemptied(Constify(arg0)); |
2144 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2145 | 0 |
|
2146 | 0 | return true; |
2147 | 0 | } |
2148 | | |
2149 | | static const JSJitInfo onemptied_getterinfo = { |
2150 | | { (JSJitGetterOp)get_onemptied }, |
2151 | | { prototypes::id::SVGElement }, |
2152 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2153 | | JSJitInfo::Getter, |
2154 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2155 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
2156 | | false, /* isInfallible. False in setters. */ |
2157 | | false, /* isMovable. Not relevant for setters. */ |
2158 | | false, /* isEliminatable. Not relevant for setters. */ |
2159 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2160 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2161 | | false, /* isTypedMethod. Only relevant for methods. */ |
2162 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2163 | | }; |
2164 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2165 | | static_assert(0 < 1, "There is no slot for us"); |
2166 | | static const JSJitInfo onemptied_setterinfo = { |
2167 | | { (JSJitGetterOp)set_onemptied }, |
2168 | | { prototypes::id::SVGElement }, |
2169 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2170 | | JSJitInfo::Setter, |
2171 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2172 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
2173 | | false, /* isInfallible. False in setters. */ |
2174 | | false, /* isMovable. Not relevant for setters. */ |
2175 | | false, /* isEliminatable. Not relevant for setters. */ |
2176 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2177 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2178 | | false, /* isTypedMethod. Only relevant for methods. */ |
2179 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2180 | | }; |
2181 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2182 | | static_assert(0 < 1, "There is no slot for us"); |
2183 | | |
2184 | | MOZ_CAN_RUN_SCRIPT static bool |
2185 | | get_onended(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
2186 | 0 | { |
2187 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onended", DOM, cx); |
2188 | 0 |
|
2189 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnended()); |
2190 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2191 | 0 | if (result) { |
2192 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
2193 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
2194 | 0 | return false; |
2195 | 0 | } |
2196 | 0 | return true; |
2197 | 0 | } else { |
2198 | 0 | args.rval().setNull(); |
2199 | 0 | return true; |
2200 | 0 | } |
2201 | 0 | } |
2202 | | |
2203 | | MOZ_CAN_RUN_SCRIPT static bool |
2204 | | set_onended(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
2205 | 0 | { |
2206 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onended", DOM, cx); |
2207 | 0 |
|
2208 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
2209 | 0 | if (args[0].isObject()) { |
2210 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
2211 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
2212 | 0 | } |
2213 | 0 | } else { |
2214 | 0 | arg0 = nullptr; |
2215 | 0 | } |
2216 | 0 | self->SetOnended(Constify(arg0)); |
2217 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2218 | 0 |
|
2219 | 0 | return true; |
2220 | 0 | } |
2221 | | |
2222 | | static const JSJitInfo onended_getterinfo = { |
2223 | | { (JSJitGetterOp)get_onended }, |
2224 | | { prototypes::id::SVGElement }, |
2225 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2226 | | JSJitInfo::Getter, |
2227 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2228 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
2229 | | false, /* isInfallible. False in setters. */ |
2230 | | false, /* isMovable. Not relevant for setters. */ |
2231 | | false, /* isEliminatable. Not relevant for setters. */ |
2232 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2233 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2234 | | false, /* isTypedMethod. Only relevant for methods. */ |
2235 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2236 | | }; |
2237 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2238 | | static_assert(0 < 1, "There is no slot for us"); |
2239 | | static const JSJitInfo onended_setterinfo = { |
2240 | | { (JSJitGetterOp)set_onended }, |
2241 | | { prototypes::id::SVGElement }, |
2242 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2243 | | JSJitInfo::Setter, |
2244 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2245 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
2246 | | false, /* isInfallible. False in setters. */ |
2247 | | false, /* isMovable. Not relevant for setters. */ |
2248 | | false, /* isEliminatable. Not relevant for setters. */ |
2249 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2250 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2251 | | false, /* isTypedMethod. Only relevant for methods. */ |
2252 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2253 | | }; |
2254 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2255 | | static_assert(0 < 1, "There is no slot for us"); |
2256 | | |
2257 | | MOZ_CAN_RUN_SCRIPT static bool |
2258 | | get_oninput(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
2259 | 0 | { |
2260 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.oninput", DOM, cx); |
2261 | 0 |
|
2262 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOninput()); |
2263 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2264 | 0 | if (result) { |
2265 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
2266 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
2267 | 0 | return false; |
2268 | 0 | } |
2269 | 0 | return true; |
2270 | 0 | } else { |
2271 | 0 | args.rval().setNull(); |
2272 | 0 | return true; |
2273 | 0 | } |
2274 | 0 | } |
2275 | | |
2276 | | MOZ_CAN_RUN_SCRIPT static bool |
2277 | | set_oninput(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
2278 | 0 | { |
2279 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.oninput", DOM, cx); |
2280 | 0 |
|
2281 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
2282 | 0 | if (args[0].isObject()) { |
2283 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
2284 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
2285 | 0 | } |
2286 | 0 | } else { |
2287 | 0 | arg0 = nullptr; |
2288 | 0 | } |
2289 | 0 | self->SetOninput(Constify(arg0)); |
2290 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2291 | 0 |
|
2292 | 0 | return true; |
2293 | 0 | } |
2294 | | |
2295 | | static const JSJitInfo oninput_getterinfo = { |
2296 | | { (JSJitGetterOp)get_oninput }, |
2297 | | { prototypes::id::SVGElement }, |
2298 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2299 | | JSJitInfo::Getter, |
2300 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2301 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
2302 | | false, /* isInfallible. False in setters. */ |
2303 | | false, /* isMovable. Not relevant for setters. */ |
2304 | | false, /* isEliminatable. Not relevant for setters. */ |
2305 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2306 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2307 | | false, /* isTypedMethod. Only relevant for methods. */ |
2308 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2309 | | }; |
2310 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2311 | | static_assert(0 < 1, "There is no slot for us"); |
2312 | | static const JSJitInfo oninput_setterinfo = { |
2313 | | { (JSJitGetterOp)set_oninput }, |
2314 | | { prototypes::id::SVGElement }, |
2315 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2316 | | JSJitInfo::Setter, |
2317 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2318 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
2319 | | false, /* isInfallible. False in setters. */ |
2320 | | false, /* isMovable. Not relevant for setters. */ |
2321 | | false, /* isEliminatable. Not relevant for setters. */ |
2322 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2323 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2324 | | false, /* isTypedMethod. Only relevant for methods. */ |
2325 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2326 | | }; |
2327 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2328 | | static_assert(0 < 1, "There is no slot for us"); |
2329 | | |
2330 | | MOZ_CAN_RUN_SCRIPT static bool |
2331 | | get_oninvalid(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
2332 | 0 | { |
2333 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.oninvalid", DOM, cx); |
2334 | 0 |
|
2335 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOninvalid()); |
2336 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2337 | 0 | if (result) { |
2338 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
2339 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
2340 | 0 | return false; |
2341 | 0 | } |
2342 | 0 | return true; |
2343 | 0 | } else { |
2344 | 0 | args.rval().setNull(); |
2345 | 0 | return true; |
2346 | 0 | } |
2347 | 0 | } |
2348 | | |
2349 | | MOZ_CAN_RUN_SCRIPT static bool |
2350 | | set_oninvalid(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
2351 | 0 | { |
2352 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.oninvalid", DOM, cx); |
2353 | 0 |
|
2354 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
2355 | 0 | if (args[0].isObject()) { |
2356 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
2357 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
2358 | 0 | } |
2359 | 0 | } else { |
2360 | 0 | arg0 = nullptr; |
2361 | 0 | } |
2362 | 0 | self->SetOninvalid(Constify(arg0)); |
2363 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2364 | 0 |
|
2365 | 0 | return true; |
2366 | 0 | } |
2367 | | |
2368 | | static const JSJitInfo oninvalid_getterinfo = { |
2369 | | { (JSJitGetterOp)get_oninvalid }, |
2370 | | { prototypes::id::SVGElement }, |
2371 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2372 | | JSJitInfo::Getter, |
2373 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2374 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
2375 | | false, /* isInfallible. False in setters. */ |
2376 | | false, /* isMovable. Not relevant for setters. */ |
2377 | | false, /* isEliminatable. Not relevant for setters. */ |
2378 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2379 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2380 | | false, /* isTypedMethod. Only relevant for methods. */ |
2381 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2382 | | }; |
2383 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2384 | | static_assert(0 < 1, "There is no slot for us"); |
2385 | | static const JSJitInfo oninvalid_setterinfo = { |
2386 | | { (JSJitGetterOp)set_oninvalid }, |
2387 | | { prototypes::id::SVGElement }, |
2388 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2389 | | JSJitInfo::Setter, |
2390 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2391 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
2392 | | false, /* isInfallible. False in setters. */ |
2393 | | false, /* isMovable. Not relevant for setters. */ |
2394 | | false, /* isEliminatable. Not relevant for setters. */ |
2395 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2396 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2397 | | false, /* isTypedMethod. Only relevant for methods. */ |
2398 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2399 | | }; |
2400 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2401 | | static_assert(0 < 1, "There is no slot for us"); |
2402 | | |
2403 | | MOZ_CAN_RUN_SCRIPT static bool |
2404 | | get_onkeydown(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
2405 | 0 | { |
2406 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onkeydown", DOM, cx); |
2407 | 0 |
|
2408 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnkeydown()); |
2409 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2410 | 0 | if (result) { |
2411 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
2412 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
2413 | 0 | return false; |
2414 | 0 | } |
2415 | 0 | return true; |
2416 | 0 | } else { |
2417 | 0 | args.rval().setNull(); |
2418 | 0 | return true; |
2419 | 0 | } |
2420 | 0 | } |
2421 | | |
2422 | | MOZ_CAN_RUN_SCRIPT static bool |
2423 | | set_onkeydown(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
2424 | 0 | { |
2425 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onkeydown", DOM, cx); |
2426 | 0 |
|
2427 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
2428 | 0 | if (args[0].isObject()) { |
2429 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
2430 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
2431 | 0 | } |
2432 | 0 | } else { |
2433 | 0 | arg0 = nullptr; |
2434 | 0 | } |
2435 | 0 | self->SetOnkeydown(Constify(arg0)); |
2436 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2437 | 0 |
|
2438 | 0 | return true; |
2439 | 0 | } |
2440 | | |
2441 | | static const JSJitInfo onkeydown_getterinfo = { |
2442 | | { (JSJitGetterOp)get_onkeydown }, |
2443 | | { prototypes::id::SVGElement }, |
2444 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2445 | | JSJitInfo::Getter, |
2446 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2447 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
2448 | | false, /* isInfallible. False in setters. */ |
2449 | | false, /* isMovable. Not relevant for setters. */ |
2450 | | false, /* isEliminatable. Not relevant for setters. */ |
2451 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2452 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2453 | | false, /* isTypedMethod. Only relevant for methods. */ |
2454 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2455 | | }; |
2456 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2457 | | static_assert(0 < 1, "There is no slot for us"); |
2458 | | static const JSJitInfo onkeydown_setterinfo = { |
2459 | | { (JSJitGetterOp)set_onkeydown }, |
2460 | | { prototypes::id::SVGElement }, |
2461 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2462 | | JSJitInfo::Setter, |
2463 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2464 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
2465 | | false, /* isInfallible. False in setters. */ |
2466 | | false, /* isMovable. Not relevant for setters. */ |
2467 | | false, /* isEliminatable. Not relevant for setters. */ |
2468 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2469 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2470 | | false, /* isTypedMethod. Only relevant for methods. */ |
2471 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2472 | | }; |
2473 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2474 | | static_assert(0 < 1, "There is no slot for us"); |
2475 | | |
2476 | | MOZ_CAN_RUN_SCRIPT static bool |
2477 | | get_onkeypress(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
2478 | 0 | { |
2479 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onkeypress", DOM, cx); |
2480 | 0 |
|
2481 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnkeypress()); |
2482 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2483 | 0 | if (result) { |
2484 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
2485 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
2486 | 0 | return false; |
2487 | 0 | } |
2488 | 0 | return true; |
2489 | 0 | } else { |
2490 | 0 | args.rval().setNull(); |
2491 | 0 | return true; |
2492 | 0 | } |
2493 | 0 | } |
2494 | | |
2495 | | MOZ_CAN_RUN_SCRIPT static bool |
2496 | | set_onkeypress(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
2497 | 0 | { |
2498 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onkeypress", DOM, cx); |
2499 | 0 |
|
2500 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
2501 | 0 | if (args[0].isObject()) { |
2502 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
2503 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
2504 | 0 | } |
2505 | 0 | } else { |
2506 | 0 | arg0 = nullptr; |
2507 | 0 | } |
2508 | 0 | self->SetOnkeypress(Constify(arg0)); |
2509 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2510 | 0 |
|
2511 | 0 | return true; |
2512 | 0 | } |
2513 | | |
2514 | | static const JSJitInfo onkeypress_getterinfo = { |
2515 | | { (JSJitGetterOp)get_onkeypress }, |
2516 | | { prototypes::id::SVGElement }, |
2517 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2518 | | JSJitInfo::Getter, |
2519 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2520 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
2521 | | false, /* isInfallible. False in setters. */ |
2522 | | false, /* isMovable. Not relevant for setters. */ |
2523 | | false, /* isEliminatable. Not relevant for setters. */ |
2524 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2525 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2526 | | false, /* isTypedMethod. Only relevant for methods. */ |
2527 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2528 | | }; |
2529 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2530 | | static_assert(0 < 1, "There is no slot for us"); |
2531 | | static const JSJitInfo onkeypress_setterinfo = { |
2532 | | { (JSJitGetterOp)set_onkeypress }, |
2533 | | { prototypes::id::SVGElement }, |
2534 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2535 | | JSJitInfo::Setter, |
2536 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2537 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
2538 | | false, /* isInfallible. False in setters. */ |
2539 | | false, /* isMovable. Not relevant for setters. */ |
2540 | | false, /* isEliminatable. Not relevant for setters. */ |
2541 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2542 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2543 | | false, /* isTypedMethod. Only relevant for methods. */ |
2544 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2545 | | }; |
2546 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2547 | | static_assert(0 < 1, "There is no slot for us"); |
2548 | | |
2549 | | MOZ_CAN_RUN_SCRIPT static bool |
2550 | | get_onkeyup(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
2551 | 0 | { |
2552 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onkeyup", DOM, cx); |
2553 | 0 |
|
2554 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnkeyup()); |
2555 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2556 | 0 | if (result) { |
2557 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
2558 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
2559 | 0 | return false; |
2560 | 0 | } |
2561 | 0 | return true; |
2562 | 0 | } else { |
2563 | 0 | args.rval().setNull(); |
2564 | 0 | return true; |
2565 | 0 | } |
2566 | 0 | } |
2567 | | |
2568 | | MOZ_CAN_RUN_SCRIPT static bool |
2569 | | set_onkeyup(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
2570 | 0 | { |
2571 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onkeyup", DOM, cx); |
2572 | 0 |
|
2573 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
2574 | 0 | if (args[0].isObject()) { |
2575 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
2576 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
2577 | 0 | } |
2578 | 0 | } else { |
2579 | 0 | arg0 = nullptr; |
2580 | 0 | } |
2581 | 0 | self->SetOnkeyup(Constify(arg0)); |
2582 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2583 | 0 |
|
2584 | 0 | return true; |
2585 | 0 | } |
2586 | | |
2587 | | static const JSJitInfo onkeyup_getterinfo = { |
2588 | | { (JSJitGetterOp)get_onkeyup }, |
2589 | | { prototypes::id::SVGElement }, |
2590 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2591 | | JSJitInfo::Getter, |
2592 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2593 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
2594 | | false, /* isInfallible. False in setters. */ |
2595 | | false, /* isMovable. Not relevant for setters. */ |
2596 | | false, /* isEliminatable. Not relevant for setters. */ |
2597 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2598 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2599 | | false, /* isTypedMethod. Only relevant for methods. */ |
2600 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2601 | | }; |
2602 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2603 | | static_assert(0 < 1, "There is no slot for us"); |
2604 | | static const JSJitInfo onkeyup_setterinfo = { |
2605 | | { (JSJitGetterOp)set_onkeyup }, |
2606 | | { prototypes::id::SVGElement }, |
2607 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2608 | | JSJitInfo::Setter, |
2609 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2610 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
2611 | | false, /* isInfallible. False in setters. */ |
2612 | | false, /* isMovable. Not relevant for setters. */ |
2613 | | false, /* isEliminatable. Not relevant for setters. */ |
2614 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2615 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2616 | | false, /* isTypedMethod. Only relevant for methods. */ |
2617 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2618 | | }; |
2619 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2620 | | static_assert(0 < 1, "There is no slot for us"); |
2621 | | |
2622 | | MOZ_CAN_RUN_SCRIPT static bool |
2623 | | get_onload(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
2624 | 0 | { |
2625 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onload", DOM, cx); |
2626 | 0 |
|
2627 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnload()); |
2628 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2629 | 0 | if (result) { |
2630 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
2631 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
2632 | 0 | return false; |
2633 | 0 | } |
2634 | 0 | return true; |
2635 | 0 | } else { |
2636 | 0 | args.rval().setNull(); |
2637 | 0 | return true; |
2638 | 0 | } |
2639 | 0 | } |
2640 | | |
2641 | | MOZ_CAN_RUN_SCRIPT static bool |
2642 | | set_onload(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
2643 | 0 | { |
2644 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onload", DOM, cx); |
2645 | 0 |
|
2646 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
2647 | 0 | if (args[0].isObject()) { |
2648 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
2649 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
2650 | 0 | } |
2651 | 0 | } else { |
2652 | 0 | arg0 = nullptr; |
2653 | 0 | } |
2654 | 0 | self->SetOnload(Constify(arg0)); |
2655 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2656 | 0 |
|
2657 | 0 | return true; |
2658 | 0 | } |
2659 | | |
2660 | | static const JSJitInfo onload_getterinfo = { |
2661 | | { (JSJitGetterOp)get_onload }, |
2662 | | { prototypes::id::SVGElement }, |
2663 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2664 | | JSJitInfo::Getter, |
2665 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2666 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
2667 | | false, /* isInfallible. False in setters. */ |
2668 | | false, /* isMovable. Not relevant for setters. */ |
2669 | | false, /* isEliminatable. Not relevant for setters. */ |
2670 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2671 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2672 | | false, /* isTypedMethod. Only relevant for methods. */ |
2673 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2674 | | }; |
2675 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2676 | | static_assert(0 < 1, "There is no slot for us"); |
2677 | | static const JSJitInfo onload_setterinfo = { |
2678 | | { (JSJitGetterOp)set_onload }, |
2679 | | { prototypes::id::SVGElement }, |
2680 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2681 | | JSJitInfo::Setter, |
2682 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2683 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
2684 | | false, /* isInfallible. False in setters. */ |
2685 | | false, /* isMovable. Not relevant for setters. */ |
2686 | | false, /* isEliminatable. Not relevant for setters. */ |
2687 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2688 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2689 | | false, /* isTypedMethod. Only relevant for methods. */ |
2690 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2691 | | }; |
2692 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2693 | | static_assert(0 < 1, "There is no slot for us"); |
2694 | | |
2695 | | MOZ_CAN_RUN_SCRIPT static bool |
2696 | | get_onloadeddata(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
2697 | 0 | { |
2698 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onloadeddata", DOM, cx); |
2699 | 0 |
|
2700 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnloadeddata()); |
2701 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2702 | 0 | if (result) { |
2703 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
2704 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
2705 | 0 | return false; |
2706 | 0 | } |
2707 | 0 | return true; |
2708 | 0 | } else { |
2709 | 0 | args.rval().setNull(); |
2710 | 0 | return true; |
2711 | 0 | } |
2712 | 0 | } |
2713 | | |
2714 | | MOZ_CAN_RUN_SCRIPT static bool |
2715 | | set_onloadeddata(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
2716 | 0 | { |
2717 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onloadeddata", DOM, cx); |
2718 | 0 |
|
2719 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
2720 | 0 | if (args[0].isObject()) { |
2721 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
2722 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
2723 | 0 | } |
2724 | 0 | } else { |
2725 | 0 | arg0 = nullptr; |
2726 | 0 | } |
2727 | 0 | self->SetOnloadeddata(Constify(arg0)); |
2728 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2729 | 0 |
|
2730 | 0 | return true; |
2731 | 0 | } |
2732 | | |
2733 | | static const JSJitInfo onloadeddata_getterinfo = { |
2734 | | { (JSJitGetterOp)get_onloadeddata }, |
2735 | | { prototypes::id::SVGElement }, |
2736 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2737 | | JSJitInfo::Getter, |
2738 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2739 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
2740 | | false, /* isInfallible. False in setters. */ |
2741 | | false, /* isMovable. Not relevant for setters. */ |
2742 | | false, /* isEliminatable. Not relevant for setters. */ |
2743 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2744 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2745 | | false, /* isTypedMethod. Only relevant for methods. */ |
2746 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2747 | | }; |
2748 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2749 | | static_assert(0 < 1, "There is no slot for us"); |
2750 | | static const JSJitInfo onloadeddata_setterinfo = { |
2751 | | { (JSJitGetterOp)set_onloadeddata }, |
2752 | | { prototypes::id::SVGElement }, |
2753 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2754 | | JSJitInfo::Setter, |
2755 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2756 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
2757 | | false, /* isInfallible. False in setters. */ |
2758 | | false, /* isMovable. Not relevant for setters. */ |
2759 | | false, /* isEliminatable. Not relevant for setters. */ |
2760 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2761 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2762 | | false, /* isTypedMethod. Only relevant for methods. */ |
2763 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2764 | | }; |
2765 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2766 | | static_assert(0 < 1, "There is no slot for us"); |
2767 | | |
2768 | | MOZ_CAN_RUN_SCRIPT static bool |
2769 | | get_onloadedmetadata(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
2770 | 0 | { |
2771 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onloadedmetadata", DOM, cx); |
2772 | 0 |
|
2773 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnloadedmetadata()); |
2774 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2775 | 0 | if (result) { |
2776 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
2777 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
2778 | 0 | return false; |
2779 | 0 | } |
2780 | 0 | return true; |
2781 | 0 | } else { |
2782 | 0 | args.rval().setNull(); |
2783 | 0 | return true; |
2784 | 0 | } |
2785 | 0 | } |
2786 | | |
2787 | | MOZ_CAN_RUN_SCRIPT static bool |
2788 | | set_onloadedmetadata(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
2789 | 0 | { |
2790 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onloadedmetadata", DOM, cx); |
2791 | 0 |
|
2792 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
2793 | 0 | if (args[0].isObject()) { |
2794 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
2795 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
2796 | 0 | } |
2797 | 0 | } else { |
2798 | 0 | arg0 = nullptr; |
2799 | 0 | } |
2800 | 0 | self->SetOnloadedmetadata(Constify(arg0)); |
2801 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2802 | 0 |
|
2803 | 0 | return true; |
2804 | 0 | } |
2805 | | |
2806 | | static const JSJitInfo onloadedmetadata_getterinfo = { |
2807 | | { (JSJitGetterOp)get_onloadedmetadata }, |
2808 | | { prototypes::id::SVGElement }, |
2809 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2810 | | JSJitInfo::Getter, |
2811 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2812 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
2813 | | false, /* isInfallible. False in setters. */ |
2814 | | false, /* isMovable. Not relevant for setters. */ |
2815 | | false, /* isEliminatable. Not relevant for setters. */ |
2816 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2817 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2818 | | false, /* isTypedMethod. Only relevant for methods. */ |
2819 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2820 | | }; |
2821 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2822 | | static_assert(0 < 1, "There is no slot for us"); |
2823 | | static const JSJitInfo onloadedmetadata_setterinfo = { |
2824 | | { (JSJitGetterOp)set_onloadedmetadata }, |
2825 | | { prototypes::id::SVGElement }, |
2826 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2827 | | JSJitInfo::Setter, |
2828 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2829 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
2830 | | false, /* isInfallible. False in setters. */ |
2831 | | false, /* isMovable. Not relevant for setters. */ |
2832 | | false, /* isEliminatable. Not relevant for setters. */ |
2833 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2834 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2835 | | false, /* isTypedMethod. Only relevant for methods. */ |
2836 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2837 | | }; |
2838 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2839 | | static_assert(0 < 1, "There is no slot for us"); |
2840 | | |
2841 | | MOZ_CAN_RUN_SCRIPT static bool |
2842 | | get_onloadend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
2843 | 0 | { |
2844 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onloadend", DOM, cx); |
2845 | 0 |
|
2846 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnloadend()); |
2847 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2848 | 0 | if (result) { |
2849 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
2850 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
2851 | 0 | return false; |
2852 | 0 | } |
2853 | 0 | return true; |
2854 | 0 | } else { |
2855 | 0 | args.rval().setNull(); |
2856 | 0 | return true; |
2857 | 0 | } |
2858 | 0 | } |
2859 | | |
2860 | | MOZ_CAN_RUN_SCRIPT static bool |
2861 | | set_onloadend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
2862 | 0 | { |
2863 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onloadend", DOM, cx); |
2864 | 0 |
|
2865 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
2866 | 0 | if (args[0].isObject()) { |
2867 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
2868 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
2869 | 0 | } |
2870 | 0 | } else { |
2871 | 0 | arg0 = nullptr; |
2872 | 0 | } |
2873 | 0 | self->SetOnloadend(Constify(arg0)); |
2874 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2875 | 0 |
|
2876 | 0 | return true; |
2877 | 0 | } |
2878 | | |
2879 | | static const JSJitInfo onloadend_getterinfo = { |
2880 | | { (JSJitGetterOp)get_onloadend }, |
2881 | | { prototypes::id::SVGElement }, |
2882 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2883 | | JSJitInfo::Getter, |
2884 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2885 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
2886 | | false, /* isInfallible. False in setters. */ |
2887 | | false, /* isMovable. Not relevant for setters. */ |
2888 | | false, /* isEliminatable. Not relevant for setters. */ |
2889 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2890 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2891 | | false, /* isTypedMethod. Only relevant for methods. */ |
2892 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2893 | | }; |
2894 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2895 | | static_assert(0 < 1, "There is no slot for us"); |
2896 | | static const JSJitInfo onloadend_setterinfo = { |
2897 | | { (JSJitGetterOp)set_onloadend }, |
2898 | | { prototypes::id::SVGElement }, |
2899 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2900 | | JSJitInfo::Setter, |
2901 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2902 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
2903 | | false, /* isInfallible. False in setters. */ |
2904 | | false, /* isMovable. Not relevant for setters. */ |
2905 | | false, /* isEliminatable. Not relevant for setters. */ |
2906 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2907 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2908 | | false, /* isTypedMethod. Only relevant for methods. */ |
2909 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2910 | | }; |
2911 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2912 | | static_assert(0 < 1, "There is no slot for us"); |
2913 | | |
2914 | | MOZ_CAN_RUN_SCRIPT static bool |
2915 | | get_onloadstart(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
2916 | 0 | { |
2917 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onloadstart", DOM, cx); |
2918 | 0 |
|
2919 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnloadstart()); |
2920 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2921 | 0 | if (result) { |
2922 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
2923 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
2924 | 0 | return false; |
2925 | 0 | } |
2926 | 0 | return true; |
2927 | 0 | } else { |
2928 | 0 | args.rval().setNull(); |
2929 | 0 | return true; |
2930 | 0 | } |
2931 | 0 | } |
2932 | | |
2933 | | MOZ_CAN_RUN_SCRIPT static bool |
2934 | | set_onloadstart(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
2935 | 0 | { |
2936 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onloadstart", DOM, cx); |
2937 | 0 |
|
2938 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
2939 | 0 | if (args[0].isObject()) { |
2940 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
2941 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
2942 | 0 | } |
2943 | 0 | } else { |
2944 | 0 | arg0 = nullptr; |
2945 | 0 | } |
2946 | 0 | self->SetOnloadstart(Constify(arg0)); |
2947 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2948 | 0 |
|
2949 | 0 | return true; |
2950 | 0 | } |
2951 | | |
2952 | | static const JSJitInfo onloadstart_getterinfo = { |
2953 | | { (JSJitGetterOp)get_onloadstart }, |
2954 | | { prototypes::id::SVGElement }, |
2955 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2956 | | JSJitInfo::Getter, |
2957 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2958 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
2959 | | false, /* isInfallible. False in setters. */ |
2960 | | false, /* isMovable. Not relevant for setters. */ |
2961 | | false, /* isEliminatable. Not relevant for setters. */ |
2962 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2963 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2964 | | false, /* isTypedMethod. Only relevant for methods. */ |
2965 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2966 | | }; |
2967 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2968 | | static_assert(0 < 1, "There is no slot for us"); |
2969 | | static const JSJitInfo onloadstart_setterinfo = { |
2970 | | { (JSJitGetterOp)set_onloadstart }, |
2971 | | { prototypes::id::SVGElement }, |
2972 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
2973 | | JSJitInfo::Setter, |
2974 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
2975 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
2976 | | false, /* isInfallible. False in setters. */ |
2977 | | false, /* isMovable. Not relevant for setters. */ |
2978 | | false, /* isEliminatable. Not relevant for setters. */ |
2979 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
2980 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
2981 | | false, /* isTypedMethod. Only relevant for methods. */ |
2982 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
2983 | | }; |
2984 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
2985 | | static_assert(0 < 1, "There is no slot for us"); |
2986 | | |
2987 | | MOZ_CAN_RUN_SCRIPT static bool |
2988 | | get_onmousedown(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
2989 | 0 | { |
2990 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onmousedown", DOM, cx); |
2991 | 0 |
|
2992 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnmousedown()); |
2993 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
2994 | 0 | if (result) { |
2995 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
2996 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
2997 | 0 | return false; |
2998 | 0 | } |
2999 | 0 | return true; |
3000 | 0 | } else { |
3001 | 0 | args.rval().setNull(); |
3002 | 0 | return true; |
3003 | 0 | } |
3004 | 0 | } |
3005 | | |
3006 | | MOZ_CAN_RUN_SCRIPT static bool |
3007 | | set_onmousedown(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
3008 | 0 | { |
3009 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onmousedown", DOM, cx); |
3010 | 0 |
|
3011 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
3012 | 0 | if (args[0].isObject()) { |
3013 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
3014 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
3015 | 0 | } |
3016 | 0 | } else { |
3017 | 0 | arg0 = nullptr; |
3018 | 0 | } |
3019 | 0 | self->SetOnmousedown(Constify(arg0)); |
3020 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3021 | 0 |
|
3022 | 0 | return true; |
3023 | 0 | } |
3024 | | |
3025 | | static const JSJitInfo onmousedown_getterinfo = { |
3026 | | { (JSJitGetterOp)get_onmousedown }, |
3027 | | { prototypes::id::SVGElement }, |
3028 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3029 | | JSJitInfo::Getter, |
3030 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3031 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
3032 | | false, /* isInfallible. False in setters. */ |
3033 | | false, /* isMovable. Not relevant for setters. */ |
3034 | | false, /* isEliminatable. Not relevant for setters. */ |
3035 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3036 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3037 | | false, /* isTypedMethod. Only relevant for methods. */ |
3038 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3039 | | }; |
3040 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3041 | | static_assert(0 < 1, "There is no slot for us"); |
3042 | | static const JSJitInfo onmousedown_setterinfo = { |
3043 | | { (JSJitGetterOp)set_onmousedown }, |
3044 | | { prototypes::id::SVGElement }, |
3045 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3046 | | JSJitInfo::Setter, |
3047 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3048 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
3049 | | false, /* isInfallible. False in setters. */ |
3050 | | false, /* isMovable. Not relevant for setters. */ |
3051 | | false, /* isEliminatable. Not relevant for setters. */ |
3052 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3053 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3054 | | false, /* isTypedMethod. Only relevant for methods. */ |
3055 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3056 | | }; |
3057 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3058 | | static_assert(0 < 1, "There is no slot for us"); |
3059 | | |
3060 | | MOZ_CAN_RUN_SCRIPT static bool |
3061 | | get_onmouseenter(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
3062 | 0 | { |
3063 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onmouseenter", DOM, cx); |
3064 | 0 |
|
3065 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnmouseenter()); |
3066 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3067 | 0 | if (result) { |
3068 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
3069 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
3070 | 0 | return false; |
3071 | 0 | } |
3072 | 0 | return true; |
3073 | 0 | } else { |
3074 | 0 | args.rval().setNull(); |
3075 | 0 | return true; |
3076 | 0 | } |
3077 | 0 | } |
3078 | | |
3079 | | MOZ_CAN_RUN_SCRIPT static bool |
3080 | | set_onmouseenter(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
3081 | 0 | { |
3082 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onmouseenter", DOM, cx); |
3083 | 0 |
|
3084 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
3085 | 0 | if (args[0].isObject()) { |
3086 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
3087 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
3088 | 0 | } |
3089 | 0 | } else { |
3090 | 0 | arg0 = nullptr; |
3091 | 0 | } |
3092 | 0 | self->SetOnmouseenter(Constify(arg0)); |
3093 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3094 | 0 |
|
3095 | 0 | return true; |
3096 | 0 | } |
3097 | | |
3098 | | static const JSJitInfo onmouseenter_getterinfo = { |
3099 | | { (JSJitGetterOp)get_onmouseenter }, |
3100 | | { prototypes::id::SVGElement }, |
3101 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3102 | | JSJitInfo::Getter, |
3103 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3104 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
3105 | | false, /* isInfallible. False in setters. */ |
3106 | | false, /* isMovable. Not relevant for setters. */ |
3107 | | false, /* isEliminatable. Not relevant for setters. */ |
3108 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3109 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3110 | | false, /* isTypedMethod. Only relevant for methods. */ |
3111 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3112 | | }; |
3113 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3114 | | static_assert(0 < 1, "There is no slot for us"); |
3115 | | static const JSJitInfo onmouseenter_setterinfo = { |
3116 | | { (JSJitGetterOp)set_onmouseenter }, |
3117 | | { prototypes::id::SVGElement }, |
3118 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3119 | | JSJitInfo::Setter, |
3120 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3121 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
3122 | | false, /* isInfallible. False in setters. */ |
3123 | | false, /* isMovable. Not relevant for setters. */ |
3124 | | false, /* isEliminatable. Not relevant for setters. */ |
3125 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3126 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3127 | | false, /* isTypedMethod. Only relevant for methods. */ |
3128 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3129 | | }; |
3130 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3131 | | static_assert(0 < 1, "There is no slot for us"); |
3132 | | |
3133 | | MOZ_CAN_RUN_SCRIPT static bool |
3134 | | get_onmouseleave(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
3135 | 0 | { |
3136 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onmouseleave", DOM, cx); |
3137 | 0 |
|
3138 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnmouseleave()); |
3139 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3140 | 0 | if (result) { |
3141 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
3142 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
3143 | 0 | return false; |
3144 | 0 | } |
3145 | 0 | return true; |
3146 | 0 | } else { |
3147 | 0 | args.rval().setNull(); |
3148 | 0 | return true; |
3149 | 0 | } |
3150 | 0 | } |
3151 | | |
3152 | | MOZ_CAN_RUN_SCRIPT static bool |
3153 | | set_onmouseleave(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
3154 | 0 | { |
3155 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onmouseleave", DOM, cx); |
3156 | 0 |
|
3157 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
3158 | 0 | if (args[0].isObject()) { |
3159 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
3160 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
3161 | 0 | } |
3162 | 0 | } else { |
3163 | 0 | arg0 = nullptr; |
3164 | 0 | } |
3165 | 0 | self->SetOnmouseleave(Constify(arg0)); |
3166 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3167 | 0 |
|
3168 | 0 | return true; |
3169 | 0 | } |
3170 | | |
3171 | | static const JSJitInfo onmouseleave_getterinfo = { |
3172 | | { (JSJitGetterOp)get_onmouseleave }, |
3173 | | { prototypes::id::SVGElement }, |
3174 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3175 | | JSJitInfo::Getter, |
3176 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3177 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
3178 | | false, /* isInfallible. False in setters. */ |
3179 | | false, /* isMovable. Not relevant for setters. */ |
3180 | | false, /* isEliminatable. Not relevant for setters. */ |
3181 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3182 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3183 | | false, /* isTypedMethod. Only relevant for methods. */ |
3184 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3185 | | }; |
3186 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3187 | | static_assert(0 < 1, "There is no slot for us"); |
3188 | | static const JSJitInfo onmouseleave_setterinfo = { |
3189 | | { (JSJitGetterOp)set_onmouseleave }, |
3190 | | { prototypes::id::SVGElement }, |
3191 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3192 | | JSJitInfo::Setter, |
3193 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3194 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
3195 | | false, /* isInfallible. False in setters. */ |
3196 | | false, /* isMovable. Not relevant for setters. */ |
3197 | | false, /* isEliminatable. Not relevant for setters. */ |
3198 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3199 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3200 | | false, /* isTypedMethod. Only relevant for methods. */ |
3201 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3202 | | }; |
3203 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3204 | | static_assert(0 < 1, "There is no slot for us"); |
3205 | | |
3206 | | MOZ_CAN_RUN_SCRIPT static bool |
3207 | | get_onmousemove(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
3208 | 0 | { |
3209 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onmousemove", DOM, cx); |
3210 | 0 |
|
3211 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnmousemove()); |
3212 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3213 | 0 | if (result) { |
3214 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
3215 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
3216 | 0 | return false; |
3217 | 0 | } |
3218 | 0 | return true; |
3219 | 0 | } else { |
3220 | 0 | args.rval().setNull(); |
3221 | 0 | return true; |
3222 | 0 | } |
3223 | 0 | } |
3224 | | |
3225 | | MOZ_CAN_RUN_SCRIPT static bool |
3226 | | set_onmousemove(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
3227 | 0 | { |
3228 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onmousemove", DOM, cx); |
3229 | 0 |
|
3230 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
3231 | 0 | if (args[0].isObject()) { |
3232 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
3233 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
3234 | 0 | } |
3235 | 0 | } else { |
3236 | 0 | arg0 = nullptr; |
3237 | 0 | } |
3238 | 0 | self->SetOnmousemove(Constify(arg0)); |
3239 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3240 | 0 |
|
3241 | 0 | return true; |
3242 | 0 | } |
3243 | | |
3244 | | static const JSJitInfo onmousemove_getterinfo = { |
3245 | | { (JSJitGetterOp)get_onmousemove }, |
3246 | | { prototypes::id::SVGElement }, |
3247 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3248 | | JSJitInfo::Getter, |
3249 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3250 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
3251 | | false, /* isInfallible. False in setters. */ |
3252 | | false, /* isMovable. Not relevant for setters. */ |
3253 | | false, /* isEliminatable. Not relevant for setters. */ |
3254 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3255 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3256 | | false, /* isTypedMethod. Only relevant for methods. */ |
3257 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3258 | | }; |
3259 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3260 | | static_assert(0 < 1, "There is no slot for us"); |
3261 | | static const JSJitInfo onmousemove_setterinfo = { |
3262 | | { (JSJitGetterOp)set_onmousemove }, |
3263 | | { prototypes::id::SVGElement }, |
3264 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3265 | | JSJitInfo::Setter, |
3266 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3267 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
3268 | | false, /* isInfallible. False in setters. */ |
3269 | | false, /* isMovable. Not relevant for setters. */ |
3270 | | false, /* isEliminatable. Not relevant for setters. */ |
3271 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3272 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3273 | | false, /* isTypedMethod. Only relevant for methods. */ |
3274 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3275 | | }; |
3276 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3277 | | static_assert(0 < 1, "There is no slot for us"); |
3278 | | |
3279 | | MOZ_CAN_RUN_SCRIPT static bool |
3280 | | get_onmouseout(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
3281 | 0 | { |
3282 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onmouseout", DOM, cx); |
3283 | 0 |
|
3284 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnmouseout()); |
3285 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3286 | 0 | if (result) { |
3287 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
3288 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
3289 | 0 | return false; |
3290 | 0 | } |
3291 | 0 | return true; |
3292 | 0 | } else { |
3293 | 0 | args.rval().setNull(); |
3294 | 0 | return true; |
3295 | 0 | } |
3296 | 0 | } |
3297 | | |
3298 | | MOZ_CAN_RUN_SCRIPT static bool |
3299 | | set_onmouseout(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
3300 | 0 | { |
3301 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onmouseout", DOM, cx); |
3302 | 0 |
|
3303 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
3304 | 0 | if (args[0].isObject()) { |
3305 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
3306 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
3307 | 0 | } |
3308 | 0 | } else { |
3309 | 0 | arg0 = nullptr; |
3310 | 0 | } |
3311 | 0 | self->SetOnmouseout(Constify(arg0)); |
3312 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3313 | 0 |
|
3314 | 0 | return true; |
3315 | 0 | } |
3316 | | |
3317 | | static const JSJitInfo onmouseout_getterinfo = { |
3318 | | { (JSJitGetterOp)get_onmouseout }, |
3319 | | { prototypes::id::SVGElement }, |
3320 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3321 | | JSJitInfo::Getter, |
3322 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3323 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
3324 | | false, /* isInfallible. False in setters. */ |
3325 | | false, /* isMovable. Not relevant for setters. */ |
3326 | | false, /* isEliminatable. Not relevant for setters. */ |
3327 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3328 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3329 | | false, /* isTypedMethod. Only relevant for methods. */ |
3330 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3331 | | }; |
3332 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3333 | | static_assert(0 < 1, "There is no slot for us"); |
3334 | | static const JSJitInfo onmouseout_setterinfo = { |
3335 | | { (JSJitGetterOp)set_onmouseout }, |
3336 | | { prototypes::id::SVGElement }, |
3337 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3338 | | JSJitInfo::Setter, |
3339 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3340 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
3341 | | false, /* isInfallible. False in setters. */ |
3342 | | false, /* isMovable. Not relevant for setters. */ |
3343 | | false, /* isEliminatable. Not relevant for setters. */ |
3344 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3345 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3346 | | false, /* isTypedMethod. Only relevant for methods. */ |
3347 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3348 | | }; |
3349 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3350 | | static_assert(0 < 1, "There is no slot for us"); |
3351 | | |
3352 | | MOZ_CAN_RUN_SCRIPT static bool |
3353 | | get_onmouseover(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
3354 | 0 | { |
3355 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onmouseover", DOM, cx); |
3356 | 0 |
|
3357 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnmouseover()); |
3358 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3359 | 0 | if (result) { |
3360 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
3361 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
3362 | 0 | return false; |
3363 | 0 | } |
3364 | 0 | return true; |
3365 | 0 | } else { |
3366 | 0 | args.rval().setNull(); |
3367 | 0 | return true; |
3368 | 0 | } |
3369 | 0 | } |
3370 | | |
3371 | | MOZ_CAN_RUN_SCRIPT static bool |
3372 | | set_onmouseover(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
3373 | 0 | { |
3374 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onmouseover", DOM, cx); |
3375 | 0 |
|
3376 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
3377 | 0 | if (args[0].isObject()) { |
3378 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
3379 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
3380 | 0 | } |
3381 | 0 | } else { |
3382 | 0 | arg0 = nullptr; |
3383 | 0 | } |
3384 | 0 | self->SetOnmouseover(Constify(arg0)); |
3385 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3386 | 0 |
|
3387 | 0 | return true; |
3388 | 0 | } |
3389 | | |
3390 | | static const JSJitInfo onmouseover_getterinfo = { |
3391 | | { (JSJitGetterOp)get_onmouseover }, |
3392 | | { prototypes::id::SVGElement }, |
3393 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3394 | | JSJitInfo::Getter, |
3395 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3396 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
3397 | | false, /* isInfallible. False in setters. */ |
3398 | | false, /* isMovable. Not relevant for setters. */ |
3399 | | false, /* isEliminatable. Not relevant for setters. */ |
3400 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3401 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3402 | | false, /* isTypedMethod. Only relevant for methods. */ |
3403 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3404 | | }; |
3405 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3406 | | static_assert(0 < 1, "There is no slot for us"); |
3407 | | static const JSJitInfo onmouseover_setterinfo = { |
3408 | | { (JSJitGetterOp)set_onmouseover }, |
3409 | | { prototypes::id::SVGElement }, |
3410 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3411 | | JSJitInfo::Setter, |
3412 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3413 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
3414 | | false, /* isInfallible. False in setters. */ |
3415 | | false, /* isMovable. Not relevant for setters. */ |
3416 | | false, /* isEliminatable. Not relevant for setters. */ |
3417 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3418 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3419 | | false, /* isTypedMethod. Only relevant for methods. */ |
3420 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3421 | | }; |
3422 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3423 | | static_assert(0 < 1, "There is no slot for us"); |
3424 | | |
3425 | | MOZ_CAN_RUN_SCRIPT static bool |
3426 | | get_onmouseup(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
3427 | 0 | { |
3428 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onmouseup", DOM, cx); |
3429 | 0 |
|
3430 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnmouseup()); |
3431 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3432 | 0 | if (result) { |
3433 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
3434 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
3435 | 0 | return false; |
3436 | 0 | } |
3437 | 0 | return true; |
3438 | 0 | } else { |
3439 | 0 | args.rval().setNull(); |
3440 | 0 | return true; |
3441 | 0 | } |
3442 | 0 | } |
3443 | | |
3444 | | MOZ_CAN_RUN_SCRIPT static bool |
3445 | | set_onmouseup(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
3446 | 0 | { |
3447 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onmouseup", DOM, cx); |
3448 | 0 |
|
3449 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
3450 | 0 | if (args[0].isObject()) { |
3451 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
3452 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
3453 | 0 | } |
3454 | 0 | } else { |
3455 | 0 | arg0 = nullptr; |
3456 | 0 | } |
3457 | 0 | self->SetOnmouseup(Constify(arg0)); |
3458 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3459 | 0 |
|
3460 | 0 | return true; |
3461 | 0 | } |
3462 | | |
3463 | | static const JSJitInfo onmouseup_getterinfo = { |
3464 | | { (JSJitGetterOp)get_onmouseup }, |
3465 | | { prototypes::id::SVGElement }, |
3466 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3467 | | JSJitInfo::Getter, |
3468 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3469 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
3470 | | false, /* isInfallible. False in setters. */ |
3471 | | false, /* isMovable. Not relevant for setters. */ |
3472 | | false, /* isEliminatable. Not relevant for setters. */ |
3473 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3474 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3475 | | false, /* isTypedMethod. Only relevant for methods. */ |
3476 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3477 | | }; |
3478 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3479 | | static_assert(0 < 1, "There is no slot for us"); |
3480 | | static const JSJitInfo onmouseup_setterinfo = { |
3481 | | { (JSJitGetterOp)set_onmouseup }, |
3482 | | { prototypes::id::SVGElement }, |
3483 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3484 | | JSJitInfo::Setter, |
3485 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3486 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
3487 | | false, /* isInfallible. False in setters. */ |
3488 | | false, /* isMovable. Not relevant for setters. */ |
3489 | | false, /* isEliminatable. Not relevant for setters. */ |
3490 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3491 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3492 | | false, /* isTypedMethod. Only relevant for methods. */ |
3493 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3494 | | }; |
3495 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3496 | | static_assert(0 < 1, "There is no slot for us"); |
3497 | | |
3498 | | MOZ_CAN_RUN_SCRIPT static bool |
3499 | | get_onwheel(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
3500 | 0 | { |
3501 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onwheel", DOM, cx); |
3502 | 0 |
|
3503 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnwheel()); |
3504 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3505 | 0 | if (result) { |
3506 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
3507 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
3508 | 0 | return false; |
3509 | 0 | } |
3510 | 0 | return true; |
3511 | 0 | } else { |
3512 | 0 | args.rval().setNull(); |
3513 | 0 | return true; |
3514 | 0 | } |
3515 | 0 | } |
3516 | | |
3517 | | MOZ_CAN_RUN_SCRIPT static bool |
3518 | | set_onwheel(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
3519 | 0 | { |
3520 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onwheel", DOM, cx); |
3521 | 0 |
|
3522 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
3523 | 0 | if (args[0].isObject()) { |
3524 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
3525 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
3526 | 0 | } |
3527 | 0 | } else { |
3528 | 0 | arg0 = nullptr; |
3529 | 0 | } |
3530 | 0 | self->SetOnwheel(Constify(arg0)); |
3531 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3532 | 0 |
|
3533 | 0 | return true; |
3534 | 0 | } |
3535 | | |
3536 | | static const JSJitInfo onwheel_getterinfo = { |
3537 | | { (JSJitGetterOp)get_onwheel }, |
3538 | | { prototypes::id::SVGElement }, |
3539 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3540 | | JSJitInfo::Getter, |
3541 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3542 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
3543 | | false, /* isInfallible. False in setters. */ |
3544 | | false, /* isMovable. Not relevant for setters. */ |
3545 | | false, /* isEliminatable. Not relevant for setters. */ |
3546 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3547 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3548 | | false, /* isTypedMethod. Only relevant for methods. */ |
3549 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3550 | | }; |
3551 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3552 | | static_assert(0 < 1, "There is no slot for us"); |
3553 | | static const JSJitInfo onwheel_setterinfo = { |
3554 | | { (JSJitGetterOp)set_onwheel }, |
3555 | | { prototypes::id::SVGElement }, |
3556 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3557 | | JSJitInfo::Setter, |
3558 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3559 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
3560 | | false, /* isInfallible. False in setters. */ |
3561 | | false, /* isMovable. Not relevant for setters. */ |
3562 | | false, /* isEliminatable. Not relevant for setters. */ |
3563 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3564 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3565 | | false, /* isTypedMethod. Only relevant for methods. */ |
3566 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3567 | | }; |
3568 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3569 | | static_assert(0 < 1, "There is no slot for us"); |
3570 | | |
3571 | | MOZ_CAN_RUN_SCRIPT static bool |
3572 | | get_onpause(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
3573 | 0 | { |
3574 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onpause", DOM, cx); |
3575 | 0 |
|
3576 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnpause()); |
3577 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3578 | 0 | if (result) { |
3579 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
3580 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
3581 | 0 | return false; |
3582 | 0 | } |
3583 | 0 | return true; |
3584 | 0 | } else { |
3585 | 0 | args.rval().setNull(); |
3586 | 0 | return true; |
3587 | 0 | } |
3588 | 0 | } |
3589 | | |
3590 | | MOZ_CAN_RUN_SCRIPT static bool |
3591 | | set_onpause(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
3592 | 0 | { |
3593 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onpause", DOM, cx); |
3594 | 0 |
|
3595 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
3596 | 0 | if (args[0].isObject()) { |
3597 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
3598 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
3599 | 0 | } |
3600 | 0 | } else { |
3601 | 0 | arg0 = nullptr; |
3602 | 0 | } |
3603 | 0 | self->SetOnpause(Constify(arg0)); |
3604 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3605 | 0 |
|
3606 | 0 | return true; |
3607 | 0 | } |
3608 | | |
3609 | | static const JSJitInfo onpause_getterinfo = { |
3610 | | { (JSJitGetterOp)get_onpause }, |
3611 | | { prototypes::id::SVGElement }, |
3612 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3613 | | JSJitInfo::Getter, |
3614 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3615 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
3616 | | false, /* isInfallible. False in setters. */ |
3617 | | false, /* isMovable. Not relevant for setters. */ |
3618 | | false, /* isEliminatable. Not relevant for setters. */ |
3619 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3620 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3621 | | false, /* isTypedMethod. Only relevant for methods. */ |
3622 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3623 | | }; |
3624 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3625 | | static_assert(0 < 1, "There is no slot for us"); |
3626 | | static const JSJitInfo onpause_setterinfo = { |
3627 | | { (JSJitGetterOp)set_onpause }, |
3628 | | { prototypes::id::SVGElement }, |
3629 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3630 | | JSJitInfo::Setter, |
3631 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3632 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
3633 | | false, /* isInfallible. False in setters. */ |
3634 | | false, /* isMovable. Not relevant for setters. */ |
3635 | | false, /* isEliminatable. Not relevant for setters. */ |
3636 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3637 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3638 | | false, /* isTypedMethod. Only relevant for methods. */ |
3639 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3640 | | }; |
3641 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3642 | | static_assert(0 < 1, "There is no slot for us"); |
3643 | | |
3644 | | MOZ_CAN_RUN_SCRIPT static bool |
3645 | | get_onplay(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
3646 | 0 | { |
3647 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onplay", DOM, cx); |
3648 | 0 |
|
3649 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnplay()); |
3650 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3651 | 0 | if (result) { |
3652 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
3653 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
3654 | 0 | return false; |
3655 | 0 | } |
3656 | 0 | return true; |
3657 | 0 | } else { |
3658 | 0 | args.rval().setNull(); |
3659 | 0 | return true; |
3660 | 0 | } |
3661 | 0 | } |
3662 | | |
3663 | | MOZ_CAN_RUN_SCRIPT static bool |
3664 | | set_onplay(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
3665 | 0 | { |
3666 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onplay", DOM, cx); |
3667 | 0 |
|
3668 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
3669 | 0 | if (args[0].isObject()) { |
3670 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
3671 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
3672 | 0 | } |
3673 | 0 | } else { |
3674 | 0 | arg0 = nullptr; |
3675 | 0 | } |
3676 | 0 | self->SetOnplay(Constify(arg0)); |
3677 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3678 | 0 |
|
3679 | 0 | return true; |
3680 | 0 | } |
3681 | | |
3682 | | static const JSJitInfo onplay_getterinfo = { |
3683 | | { (JSJitGetterOp)get_onplay }, |
3684 | | { prototypes::id::SVGElement }, |
3685 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3686 | | JSJitInfo::Getter, |
3687 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3688 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
3689 | | false, /* isInfallible. False in setters. */ |
3690 | | false, /* isMovable. Not relevant for setters. */ |
3691 | | false, /* isEliminatable. Not relevant for setters. */ |
3692 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3693 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3694 | | false, /* isTypedMethod. Only relevant for methods. */ |
3695 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3696 | | }; |
3697 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3698 | | static_assert(0 < 1, "There is no slot for us"); |
3699 | | static const JSJitInfo onplay_setterinfo = { |
3700 | | { (JSJitGetterOp)set_onplay }, |
3701 | | { prototypes::id::SVGElement }, |
3702 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3703 | | JSJitInfo::Setter, |
3704 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3705 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
3706 | | false, /* isInfallible. False in setters. */ |
3707 | | false, /* isMovable. Not relevant for setters. */ |
3708 | | false, /* isEliminatable. Not relevant for setters. */ |
3709 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3710 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3711 | | false, /* isTypedMethod. Only relevant for methods. */ |
3712 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3713 | | }; |
3714 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3715 | | static_assert(0 < 1, "There is no slot for us"); |
3716 | | |
3717 | | MOZ_CAN_RUN_SCRIPT static bool |
3718 | | get_onplaying(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
3719 | 0 | { |
3720 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onplaying", DOM, cx); |
3721 | 0 |
|
3722 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnplaying()); |
3723 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3724 | 0 | if (result) { |
3725 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
3726 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
3727 | 0 | return false; |
3728 | 0 | } |
3729 | 0 | return true; |
3730 | 0 | } else { |
3731 | 0 | args.rval().setNull(); |
3732 | 0 | return true; |
3733 | 0 | } |
3734 | 0 | } |
3735 | | |
3736 | | MOZ_CAN_RUN_SCRIPT static bool |
3737 | | set_onplaying(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
3738 | 0 | { |
3739 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onplaying", DOM, cx); |
3740 | 0 |
|
3741 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
3742 | 0 | if (args[0].isObject()) { |
3743 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
3744 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
3745 | 0 | } |
3746 | 0 | } else { |
3747 | 0 | arg0 = nullptr; |
3748 | 0 | } |
3749 | 0 | self->SetOnplaying(Constify(arg0)); |
3750 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3751 | 0 |
|
3752 | 0 | return true; |
3753 | 0 | } |
3754 | | |
3755 | | static const JSJitInfo onplaying_getterinfo = { |
3756 | | { (JSJitGetterOp)get_onplaying }, |
3757 | | { prototypes::id::SVGElement }, |
3758 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3759 | | JSJitInfo::Getter, |
3760 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3761 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
3762 | | false, /* isInfallible. False in setters. */ |
3763 | | false, /* isMovable. Not relevant for setters. */ |
3764 | | false, /* isEliminatable. Not relevant for setters. */ |
3765 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3766 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3767 | | false, /* isTypedMethod. Only relevant for methods. */ |
3768 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3769 | | }; |
3770 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3771 | | static_assert(0 < 1, "There is no slot for us"); |
3772 | | static const JSJitInfo onplaying_setterinfo = { |
3773 | | { (JSJitGetterOp)set_onplaying }, |
3774 | | { prototypes::id::SVGElement }, |
3775 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3776 | | JSJitInfo::Setter, |
3777 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3778 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
3779 | | false, /* isInfallible. False in setters. */ |
3780 | | false, /* isMovable. Not relevant for setters. */ |
3781 | | false, /* isEliminatable. Not relevant for setters. */ |
3782 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3783 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3784 | | false, /* isTypedMethod. Only relevant for methods. */ |
3785 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3786 | | }; |
3787 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3788 | | static_assert(0 < 1, "There is no slot for us"); |
3789 | | |
3790 | | MOZ_CAN_RUN_SCRIPT static bool |
3791 | | get_onprogress(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
3792 | 0 | { |
3793 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onprogress", DOM, cx); |
3794 | 0 |
|
3795 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnprogress()); |
3796 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3797 | 0 | if (result) { |
3798 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
3799 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
3800 | 0 | return false; |
3801 | 0 | } |
3802 | 0 | return true; |
3803 | 0 | } else { |
3804 | 0 | args.rval().setNull(); |
3805 | 0 | return true; |
3806 | 0 | } |
3807 | 0 | } |
3808 | | |
3809 | | MOZ_CAN_RUN_SCRIPT static bool |
3810 | | set_onprogress(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
3811 | 0 | { |
3812 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onprogress", DOM, cx); |
3813 | 0 |
|
3814 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
3815 | 0 | if (args[0].isObject()) { |
3816 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
3817 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
3818 | 0 | } |
3819 | 0 | } else { |
3820 | 0 | arg0 = nullptr; |
3821 | 0 | } |
3822 | 0 | self->SetOnprogress(Constify(arg0)); |
3823 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3824 | 0 |
|
3825 | 0 | return true; |
3826 | 0 | } |
3827 | | |
3828 | | static const JSJitInfo onprogress_getterinfo = { |
3829 | | { (JSJitGetterOp)get_onprogress }, |
3830 | | { prototypes::id::SVGElement }, |
3831 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3832 | | JSJitInfo::Getter, |
3833 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3834 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
3835 | | false, /* isInfallible. False in setters. */ |
3836 | | false, /* isMovable. Not relevant for setters. */ |
3837 | | false, /* isEliminatable. Not relevant for setters. */ |
3838 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3839 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3840 | | false, /* isTypedMethod. Only relevant for methods. */ |
3841 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3842 | | }; |
3843 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3844 | | static_assert(0 < 1, "There is no slot for us"); |
3845 | | static const JSJitInfo onprogress_setterinfo = { |
3846 | | { (JSJitGetterOp)set_onprogress }, |
3847 | | { prototypes::id::SVGElement }, |
3848 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3849 | | JSJitInfo::Setter, |
3850 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3851 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
3852 | | false, /* isInfallible. False in setters. */ |
3853 | | false, /* isMovable. Not relevant for setters. */ |
3854 | | false, /* isEliminatable. Not relevant for setters. */ |
3855 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3856 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3857 | | false, /* isTypedMethod. Only relevant for methods. */ |
3858 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3859 | | }; |
3860 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3861 | | static_assert(0 < 1, "There is no slot for us"); |
3862 | | |
3863 | | MOZ_CAN_RUN_SCRIPT static bool |
3864 | | get_onratechange(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
3865 | 0 | { |
3866 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onratechange", DOM, cx); |
3867 | 0 |
|
3868 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnratechange()); |
3869 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3870 | 0 | if (result) { |
3871 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
3872 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
3873 | 0 | return false; |
3874 | 0 | } |
3875 | 0 | return true; |
3876 | 0 | } else { |
3877 | 0 | args.rval().setNull(); |
3878 | 0 | return true; |
3879 | 0 | } |
3880 | 0 | } |
3881 | | |
3882 | | MOZ_CAN_RUN_SCRIPT static bool |
3883 | | set_onratechange(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
3884 | 0 | { |
3885 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onratechange", DOM, cx); |
3886 | 0 |
|
3887 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
3888 | 0 | if (args[0].isObject()) { |
3889 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
3890 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
3891 | 0 | } |
3892 | 0 | } else { |
3893 | 0 | arg0 = nullptr; |
3894 | 0 | } |
3895 | 0 | self->SetOnratechange(Constify(arg0)); |
3896 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3897 | 0 |
|
3898 | 0 | return true; |
3899 | 0 | } |
3900 | | |
3901 | | static const JSJitInfo onratechange_getterinfo = { |
3902 | | { (JSJitGetterOp)get_onratechange }, |
3903 | | { prototypes::id::SVGElement }, |
3904 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3905 | | JSJitInfo::Getter, |
3906 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3907 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
3908 | | false, /* isInfallible. False in setters. */ |
3909 | | false, /* isMovable. Not relevant for setters. */ |
3910 | | false, /* isEliminatable. Not relevant for setters. */ |
3911 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3912 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3913 | | false, /* isTypedMethod. Only relevant for methods. */ |
3914 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3915 | | }; |
3916 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3917 | | static_assert(0 < 1, "There is no slot for us"); |
3918 | | static const JSJitInfo onratechange_setterinfo = { |
3919 | | { (JSJitGetterOp)set_onratechange }, |
3920 | | { prototypes::id::SVGElement }, |
3921 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3922 | | JSJitInfo::Setter, |
3923 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3924 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
3925 | | false, /* isInfallible. False in setters. */ |
3926 | | false, /* isMovable. Not relevant for setters. */ |
3927 | | false, /* isEliminatable. Not relevant for setters. */ |
3928 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3929 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3930 | | false, /* isTypedMethod. Only relevant for methods. */ |
3931 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3932 | | }; |
3933 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3934 | | static_assert(0 < 1, "There is no slot for us"); |
3935 | | |
3936 | | MOZ_CAN_RUN_SCRIPT static bool |
3937 | | get_onreset(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
3938 | 0 | { |
3939 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onreset", DOM, cx); |
3940 | 0 |
|
3941 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnreset()); |
3942 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3943 | 0 | if (result) { |
3944 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
3945 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
3946 | 0 | return false; |
3947 | 0 | } |
3948 | 0 | return true; |
3949 | 0 | } else { |
3950 | 0 | args.rval().setNull(); |
3951 | 0 | return true; |
3952 | 0 | } |
3953 | 0 | } |
3954 | | |
3955 | | MOZ_CAN_RUN_SCRIPT static bool |
3956 | | set_onreset(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
3957 | 0 | { |
3958 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onreset", DOM, cx); |
3959 | 0 |
|
3960 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
3961 | 0 | if (args[0].isObject()) { |
3962 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
3963 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
3964 | 0 | } |
3965 | 0 | } else { |
3966 | 0 | arg0 = nullptr; |
3967 | 0 | } |
3968 | 0 | self->SetOnreset(Constify(arg0)); |
3969 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
3970 | 0 |
|
3971 | 0 | return true; |
3972 | 0 | } |
3973 | | |
3974 | | static const JSJitInfo onreset_getterinfo = { |
3975 | | { (JSJitGetterOp)get_onreset }, |
3976 | | { prototypes::id::SVGElement }, |
3977 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3978 | | JSJitInfo::Getter, |
3979 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3980 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
3981 | | false, /* isInfallible. False in setters. */ |
3982 | | false, /* isMovable. Not relevant for setters. */ |
3983 | | false, /* isEliminatable. Not relevant for setters. */ |
3984 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
3985 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
3986 | | false, /* isTypedMethod. Only relevant for methods. */ |
3987 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
3988 | | }; |
3989 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
3990 | | static_assert(0 < 1, "There is no slot for us"); |
3991 | | static const JSJitInfo onreset_setterinfo = { |
3992 | | { (JSJitGetterOp)set_onreset }, |
3993 | | { prototypes::id::SVGElement }, |
3994 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
3995 | | JSJitInfo::Setter, |
3996 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
3997 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
3998 | | false, /* isInfallible. False in setters. */ |
3999 | | false, /* isMovable. Not relevant for setters. */ |
4000 | | false, /* isEliminatable. Not relevant for setters. */ |
4001 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4002 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4003 | | false, /* isTypedMethod. Only relevant for methods. */ |
4004 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4005 | | }; |
4006 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4007 | | static_assert(0 < 1, "There is no slot for us"); |
4008 | | |
4009 | | MOZ_CAN_RUN_SCRIPT static bool |
4010 | | get_onresize(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
4011 | 0 | { |
4012 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onresize", DOM, cx); |
4013 | 0 |
|
4014 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnresize()); |
4015 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4016 | 0 | if (result) { |
4017 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
4018 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
4019 | 0 | return false; |
4020 | 0 | } |
4021 | 0 | return true; |
4022 | 0 | } else { |
4023 | 0 | args.rval().setNull(); |
4024 | 0 | return true; |
4025 | 0 | } |
4026 | 0 | } |
4027 | | |
4028 | | MOZ_CAN_RUN_SCRIPT static bool |
4029 | | set_onresize(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
4030 | 0 | { |
4031 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onresize", DOM, cx); |
4032 | 0 |
|
4033 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
4034 | 0 | if (args[0].isObject()) { |
4035 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
4036 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
4037 | 0 | } |
4038 | 0 | } else { |
4039 | 0 | arg0 = nullptr; |
4040 | 0 | } |
4041 | 0 | self->SetOnresize(Constify(arg0)); |
4042 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4043 | 0 |
|
4044 | 0 | return true; |
4045 | 0 | } |
4046 | | |
4047 | | static const JSJitInfo onresize_getterinfo = { |
4048 | | { (JSJitGetterOp)get_onresize }, |
4049 | | { prototypes::id::SVGElement }, |
4050 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4051 | | JSJitInfo::Getter, |
4052 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4053 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
4054 | | false, /* isInfallible. False in setters. */ |
4055 | | false, /* isMovable. Not relevant for setters. */ |
4056 | | false, /* isEliminatable. Not relevant for setters. */ |
4057 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4058 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4059 | | false, /* isTypedMethod. Only relevant for methods. */ |
4060 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4061 | | }; |
4062 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4063 | | static_assert(0 < 1, "There is no slot for us"); |
4064 | | static const JSJitInfo onresize_setterinfo = { |
4065 | | { (JSJitGetterOp)set_onresize }, |
4066 | | { prototypes::id::SVGElement }, |
4067 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4068 | | JSJitInfo::Setter, |
4069 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4070 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
4071 | | false, /* isInfallible. False in setters. */ |
4072 | | false, /* isMovable. Not relevant for setters. */ |
4073 | | false, /* isEliminatable. Not relevant for setters. */ |
4074 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4075 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4076 | | false, /* isTypedMethod. Only relevant for methods. */ |
4077 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4078 | | }; |
4079 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4080 | | static_assert(0 < 1, "There is no slot for us"); |
4081 | | |
4082 | | MOZ_CAN_RUN_SCRIPT static bool |
4083 | | get_onscroll(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
4084 | 0 | { |
4085 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onscroll", DOM, cx); |
4086 | 0 |
|
4087 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnscroll()); |
4088 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4089 | 0 | if (result) { |
4090 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
4091 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
4092 | 0 | return false; |
4093 | 0 | } |
4094 | 0 | return true; |
4095 | 0 | } else { |
4096 | 0 | args.rval().setNull(); |
4097 | 0 | return true; |
4098 | 0 | } |
4099 | 0 | } |
4100 | | |
4101 | | MOZ_CAN_RUN_SCRIPT static bool |
4102 | | set_onscroll(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
4103 | 0 | { |
4104 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onscroll", DOM, cx); |
4105 | 0 |
|
4106 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
4107 | 0 | if (args[0].isObject()) { |
4108 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
4109 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
4110 | 0 | } |
4111 | 0 | } else { |
4112 | 0 | arg0 = nullptr; |
4113 | 0 | } |
4114 | 0 | self->SetOnscroll(Constify(arg0)); |
4115 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4116 | 0 |
|
4117 | 0 | return true; |
4118 | 0 | } |
4119 | | |
4120 | | static const JSJitInfo onscroll_getterinfo = { |
4121 | | { (JSJitGetterOp)get_onscroll }, |
4122 | | { prototypes::id::SVGElement }, |
4123 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4124 | | JSJitInfo::Getter, |
4125 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4126 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
4127 | | false, /* isInfallible. False in setters. */ |
4128 | | false, /* isMovable. Not relevant for setters. */ |
4129 | | false, /* isEliminatable. Not relevant for setters. */ |
4130 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4131 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4132 | | false, /* isTypedMethod. Only relevant for methods. */ |
4133 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4134 | | }; |
4135 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4136 | | static_assert(0 < 1, "There is no slot for us"); |
4137 | | static const JSJitInfo onscroll_setterinfo = { |
4138 | | { (JSJitGetterOp)set_onscroll }, |
4139 | | { prototypes::id::SVGElement }, |
4140 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4141 | | JSJitInfo::Setter, |
4142 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4143 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
4144 | | false, /* isInfallible. False in setters. */ |
4145 | | false, /* isMovable. Not relevant for setters. */ |
4146 | | false, /* isEliminatable. Not relevant for setters. */ |
4147 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4148 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4149 | | false, /* isTypedMethod. Only relevant for methods. */ |
4150 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4151 | | }; |
4152 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4153 | | static_assert(0 < 1, "There is no slot for us"); |
4154 | | |
4155 | | MOZ_CAN_RUN_SCRIPT static bool |
4156 | | get_onseeked(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
4157 | 0 | { |
4158 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onseeked", DOM, cx); |
4159 | 0 |
|
4160 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnseeked()); |
4161 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4162 | 0 | if (result) { |
4163 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
4164 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
4165 | 0 | return false; |
4166 | 0 | } |
4167 | 0 | return true; |
4168 | 0 | } else { |
4169 | 0 | args.rval().setNull(); |
4170 | 0 | return true; |
4171 | 0 | } |
4172 | 0 | } |
4173 | | |
4174 | | MOZ_CAN_RUN_SCRIPT static bool |
4175 | | set_onseeked(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
4176 | 0 | { |
4177 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onseeked", DOM, cx); |
4178 | 0 |
|
4179 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
4180 | 0 | if (args[0].isObject()) { |
4181 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
4182 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
4183 | 0 | } |
4184 | 0 | } else { |
4185 | 0 | arg0 = nullptr; |
4186 | 0 | } |
4187 | 0 | self->SetOnseeked(Constify(arg0)); |
4188 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4189 | 0 |
|
4190 | 0 | return true; |
4191 | 0 | } |
4192 | | |
4193 | | static const JSJitInfo onseeked_getterinfo = { |
4194 | | { (JSJitGetterOp)get_onseeked }, |
4195 | | { prototypes::id::SVGElement }, |
4196 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4197 | | JSJitInfo::Getter, |
4198 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4199 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
4200 | | false, /* isInfallible. False in setters. */ |
4201 | | false, /* isMovable. Not relevant for setters. */ |
4202 | | false, /* isEliminatable. Not relevant for setters. */ |
4203 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4204 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4205 | | false, /* isTypedMethod. Only relevant for methods. */ |
4206 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4207 | | }; |
4208 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4209 | | static_assert(0 < 1, "There is no slot for us"); |
4210 | | static const JSJitInfo onseeked_setterinfo = { |
4211 | | { (JSJitGetterOp)set_onseeked }, |
4212 | | { prototypes::id::SVGElement }, |
4213 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4214 | | JSJitInfo::Setter, |
4215 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4216 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
4217 | | false, /* isInfallible. False in setters. */ |
4218 | | false, /* isMovable. Not relevant for setters. */ |
4219 | | false, /* isEliminatable. Not relevant for setters. */ |
4220 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4221 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4222 | | false, /* isTypedMethod. Only relevant for methods. */ |
4223 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4224 | | }; |
4225 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4226 | | static_assert(0 < 1, "There is no slot for us"); |
4227 | | |
4228 | | MOZ_CAN_RUN_SCRIPT static bool |
4229 | | get_onseeking(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
4230 | 0 | { |
4231 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onseeking", DOM, cx); |
4232 | 0 |
|
4233 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnseeking()); |
4234 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4235 | 0 | if (result) { |
4236 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
4237 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
4238 | 0 | return false; |
4239 | 0 | } |
4240 | 0 | return true; |
4241 | 0 | } else { |
4242 | 0 | args.rval().setNull(); |
4243 | 0 | return true; |
4244 | 0 | } |
4245 | 0 | } |
4246 | | |
4247 | | MOZ_CAN_RUN_SCRIPT static bool |
4248 | | set_onseeking(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
4249 | 0 | { |
4250 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onseeking", DOM, cx); |
4251 | 0 |
|
4252 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
4253 | 0 | if (args[0].isObject()) { |
4254 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
4255 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
4256 | 0 | } |
4257 | 0 | } else { |
4258 | 0 | arg0 = nullptr; |
4259 | 0 | } |
4260 | 0 | self->SetOnseeking(Constify(arg0)); |
4261 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4262 | 0 |
|
4263 | 0 | return true; |
4264 | 0 | } |
4265 | | |
4266 | | static const JSJitInfo onseeking_getterinfo = { |
4267 | | { (JSJitGetterOp)get_onseeking }, |
4268 | | { prototypes::id::SVGElement }, |
4269 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4270 | | JSJitInfo::Getter, |
4271 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4272 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
4273 | | false, /* isInfallible. False in setters. */ |
4274 | | false, /* isMovable. Not relevant for setters. */ |
4275 | | false, /* isEliminatable. Not relevant for setters. */ |
4276 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4277 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4278 | | false, /* isTypedMethod. Only relevant for methods. */ |
4279 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4280 | | }; |
4281 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4282 | | static_assert(0 < 1, "There is no slot for us"); |
4283 | | static const JSJitInfo onseeking_setterinfo = { |
4284 | | { (JSJitGetterOp)set_onseeking }, |
4285 | | { prototypes::id::SVGElement }, |
4286 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4287 | | JSJitInfo::Setter, |
4288 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4289 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
4290 | | false, /* isInfallible. False in setters. */ |
4291 | | false, /* isMovable. Not relevant for setters. */ |
4292 | | false, /* isEliminatable. Not relevant for setters. */ |
4293 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4294 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4295 | | false, /* isTypedMethod. Only relevant for methods. */ |
4296 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4297 | | }; |
4298 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4299 | | static_assert(0 < 1, "There is no slot for us"); |
4300 | | |
4301 | | MOZ_CAN_RUN_SCRIPT static bool |
4302 | | get_onselect(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
4303 | 0 | { |
4304 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onselect", DOM, cx); |
4305 | 0 |
|
4306 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnselect()); |
4307 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4308 | 0 | if (result) { |
4309 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
4310 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
4311 | 0 | return false; |
4312 | 0 | } |
4313 | 0 | return true; |
4314 | 0 | } else { |
4315 | 0 | args.rval().setNull(); |
4316 | 0 | return true; |
4317 | 0 | } |
4318 | 0 | } |
4319 | | |
4320 | | MOZ_CAN_RUN_SCRIPT static bool |
4321 | | set_onselect(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
4322 | 0 | { |
4323 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onselect", DOM, cx); |
4324 | 0 |
|
4325 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
4326 | 0 | if (args[0].isObject()) { |
4327 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
4328 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
4329 | 0 | } |
4330 | 0 | } else { |
4331 | 0 | arg0 = nullptr; |
4332 | 0 | } |
4333 | 0 | self->SetOnselect(Constify(arg0)); |
4334 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4335 | 0 |
|
4336 | 0 | return true; |
4337 | 0 | } |
4338 | | |
4339 | | static const JSJitInfo onselect_getterinfo = { |
4340 | | { (JSJitGetterOp)get_onselect }, |
4341 | | { prototypes::id::SVGElement }, |
4342 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4343 | | JSJitInfo::Getter, |
4344 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4345 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
4346 | | false, /* isInfallible. False in setters. */ |
4347 | | false, /* isMovable. Not relevant for setters. */ |
4348 | | false, /* isEliminatable. Not relevant for setters. */ |
4349 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4350 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4351 | | false, /* isTypedMethod. Only relevant for methods. */ |
4352 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4353 | | }; |
4354 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4355 | | static_assert(0 < 1, "There is no slot for us"); |
4356 | | static const JSJitInfo onselect_setterinfo = { |
4357 | | { (JSJitGetterOp)set_onselect }, |
4358 | | { prototypes::id::SVGElement }, |
4359 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4360 | | JSJitInfo::Setter, |
4361 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4362 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
4363 | | false, /* isInfallible. False in setters. */ |
4364 | | false, /* isMovable. Not relevant for setters. */ |
4365 | | false, /* isEliminatable. Not relevant for setters. */ |
4366 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4367 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4368 | | false, /* isTypedMethod. Only relevant for methods. */ |
4369 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4370 | | }; |
4371 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4372 | | static_assert(0 < 1, "There is no slot for us"); |
4373 | | |
4374 | | MOZ_CAN_RUN_SCRIPT static bool |
4375 | | get_onshow(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
4376 | 0 | { |
4377 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onshow", DOM, cx); |
4378 | 0 |
|
4379 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnshow()); |
4380 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4381 | 0 | if (result) { |
4382 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
4383 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
4384 | 0 | return false; |
4385 | 0 | } |
4386 | 0 | return true; |
4387 | 0 | } else { |
4388 | 0 | args.rval().setNull(); |
4389 | 0 | return true; |
4390 | 0 | } |
4391 | 0 | } |
4392 | | |
4393 | | MOZ_CAN_RUN_SCRIPT static bool |
4394 | | set_onshow(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
4395 | 0 | { |
4396 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onshow", DOM, cx); |
4397 | 0 |
|
4398 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
4399 | 0 | if (args[0].isObject()) { |
4400 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
4401 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
4402 | 0 | } |
4403 | 0 | } else { |
4404 | 0 | arg0 = nullptr; |
4405 | 0 | } |
4406 | 0 | self->SetOnshow(Constify(arg0)); |
4407 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4408 | 0 |
|
4409 | 0 | return true; |
4410 | 0 | } |
4411 | | |
4412 | | static const JSJitInfo onshow_getterinfo = { |
4413 | | { (JSJitGetterOp)get_onshow }, |
4414 | | { prototypes::id::SVGElement }, |
4415 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4416 | | JSJitInfo::Getter, |
4417 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4418 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
4419 | | false, /* isInfallible. False in setters. */ |
4420 | | false, /* isMovable. Not relevant for setters. */ |
4421 | | false, /* isEliminatable. Not relevant for setters. */ |
4422 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4423 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4424 | | false, /* isTypedMethod. Only relevant for methods. */ |
4425 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4426 | | }; |
4427 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4428 | | static_assert(0 < 1, "There is no slot for us"); |
4429 | | static const JSJitInfo onshow_setterinfo = { |
4430 | | { (JSJitGetterOp)set_onshow }, |
4431 | | { prototypes::id::SVGElement }, |
4432 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4433 | | JSJitInfo::Setter, |
4434 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4435 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
4436 | | false, /* isInfallible. False in setters. */ |
4437 | | false, /* isMovable. Not relevant for setters. */ |
4438 | | false, /* isEliminatable. Not relevant for setters. */ |
4439 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4440 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4441 | | false, /* isTypedMethod. Only relevant for methods. */ |
4442 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4443 | | }; |
4444 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4445 | | static_assert(0 < 1, "There is no slot for us"); |
4446 | | |
4447 | | MOZ_CAN_RUN_SCRIPT static bool |
4448 | | get_onstalled(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
4449 | 0 | { |
4450 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onstalled", DOM, cx); |
4451 | 0 |
|
4452 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnstalled()); |
4453 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4454 | 0 | if (result) { |
4455 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
4456 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
4457 | 0 | return false; |
4458 | 0 | } |
4459 | 0 | return true; |
4460 | 0 | } else { |
4461 | 0 | args.rval().setNull(); |
4462 | 0 | return true; |
4463 | 0 | } |
4464 | 0 | } |
4465 | | |
4466 | | MOZ_CAN_RUN_SCRIPT static bool |
4467 | | set_onstalled(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
4468 | 0 | { |
4469 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onstalled", DOM, cx); |
4470 | 0 |
|
4471 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
4472 | 0 | if (args[0].isObject()) { |
4473 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
4474 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
4475 | 0 | } |
4476 | 0 | } else { |
4477 | 0 | arg0 = nullptr; |
4478 | 0 | } |
4479 | 0 | self->SetOnstalled(Constify(arg0)); |
4480 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4481 | 0 |
|
4482 | 0 | return true; |
4483 | 0 | } |
4484 | | |
4485 | | static const JSJitInfo onstalled_getterinfo = { |
4486 | | { (JSJitGetterOp)get_onstalled }, |
4487 | | { prototypes::id::SVGElement }, |
4488 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4489 | | JSJitInfo::Getter, |
4490 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4491 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
4492 | | false, /* isInfallible. False in setters. */ |
4493 | | false, /* isMovable. Not relevant for setters. */ |
4494 | | false, /* isEliminatable. Not relevant for setters. */ |
4495 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4496 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4497 | | false, /* isTypedMethod. Only relevant for methods. */ |
4498 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4499 | | }; |
4500 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4501 | | static_assert(0 < 1, "There is no slot for us"); |
4502 | | static const JSJitInfo onstalled_setterinfo = { |
4503 | | { (JSJitGetterOp)set_onstalled }, |
4504 | | { prototypes::id::SVGElement }, |
4505 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4506 | | JSJitInfo::Setter, |
4507 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4508 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
4509 | | false, /* isInfallible. False in setters. */ |
4510 | | false, /* isMovable. Not relevant for setters. */ |
4511 | | false, /* isEliminatable. Not relevant for setters. */ |
4512 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4513 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4514 | | false, /* isTypedMethod. Only relevant for methods. */ |
4515 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4516 | | }; |
4517 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4518 | | static_assert(0 < 1, "There is no slot for us"); |
4519 | | |
4520 | | MOZ_CAN_RUN_SCRIPT static bool |
4521 | | get_onsubmit(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
4522 | 0 | { |
4523 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onsubmit", DOM, cx); |
4524 | 0 |
|
4525 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnsubmit()); |
4526 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4527 | 0 | if (result) { |
4528 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
4529 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
4530 | 0 | return false; |
4531 | 0 | } |
4532 | 0 | return true; |
4533 | 0 | } else { |
4534 | 0 | args.rval().setNull(); |
4535 | 0 | return true; |
4536 | 0 | } |
4537 | 0 | } |
4538 | | |
4539 | | MOZ_CAN_RUN_SCRIPT static bool |
4540 | | set_onsubmit(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
4541 | 0 | { |
4542 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onsubmit", DOM, cx); |
4543 | 0 |
|
4544 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
4545 | 0 | if (args[0].isObject()) { |
4546 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
4547 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
4548 | 0 | } |
4549 | 0 | } else { |
4550 | 0 | arg0 = nullptr; |
4551 | 0 | } |
4552 | 0 | self->SetOnsubmit(Constify(arg0)); |
4553 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4554 | 0 |
|
4555 | 0 | return true; |
4556 | 0 | } |
4557 | | |
4558 | | static const JSJitInfo onsubmit_getterinfo = { |
4559 | | { (JSJitGetterOp)get_onsubmit }, |
4560 | | { prototypes::id::SVGElement }, |
4561 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4562 | | JSJitInfo::Getter, |
4563 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4564 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
4565 | | false, /* isInfallible. False in setters. */ |
4566 | | false, /* isMovable. Not relevant for setters. */ |
4567 | | false, /* isEliminatable. Not relevant for setters. */ |
4568 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4569 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4570 | | false, /* isTypedMethod. Only relevant for methods. */ |
4571 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4572 | | }; |
4573 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4574 | | static_assert(0 < 1, "There is no slot for us"); |
4575 | | static const JSJitInfo onsubmit_setterinfo = { |
4576 | | { (JSJitGetterOp)set_onsubmit }, |
4577 | | { prototypes::id::SVGElement }, |
4578 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4579 | | JSJitInfo::Setter, |
4580 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4581 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
4582 | | false, /* isInfallible. False in setters. */ |
4583 | | false, /* isMovable. Not relevant for setters. */ |
4584 | | false, /* isEliminatable. Not relevant for setters. */ |
4585 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4586 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4587 | | false, /* isTypedMethod. Only relevant for methods. */ |
4588 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4589 | | }; |
4590 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4591 | | static_assert(0 < 1, "There is no slot for us"); |
4592 | | |
4593 | | MOZ_CAN_RUN_SCRIPT static bool |
4594 | | get_onsuspend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
4595 | 0 | { |
4596 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onsuspend", DOM, cx); |
4597 | 0 |
|
4598 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnsuspend()); |
4599 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4600 | 0 | if (result) { |
4601 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
4602 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
4603 | 0 | return false; |
4604 | 0 | } |
4605 | 0 | return true; |
4606 | 0 | } else { |
4607 | 0 | args.rval().setNull(); |
4608 | 0 | return true; |
4609 | 0 | } |
4610 | 0 | } |
4611 | | |
4612 | | MOZ_CAN_RUN_SCRIPT static bool |
4613 | | set_onsuspend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
4614 | 0 | { |
4615 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onsuspend", DOM, cx); |
4616 | 0 |
|
4617 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
4618 | 0 | if (args[0].isObject()) { |
4619 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
4620 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
4621 | 0 | } |
4622 | 0 | } else { |
4623 | 0 | arg0 = nullptr; |
4624 | 0 | } |
4625 | 0 | self->SetOnsuspend(Constify(arg0)); |
4626 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4627 | 0 |
|
4628 | 0 | return true; |
4629 | 0 | } |
4630 | | |
4631 | | static const JSJitInfo onsuspend_getterinfo = { |
4632 | | { (JSJitGetterOp)get_onsuspend }, |
4633 | | { prototypes::id::SVGElement }, |
4634 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4635 | | JSJitInfo::Getter, |
4636 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4637 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
4638 | | false, /* isInfallible. False in setters. */ |
4639 | | false, /* isMovable. Not relevant for setters. */ |
4640 | | false, /* isEliminatable. Not relevant for setters. */ |
4641 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4642 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4643 | | false, /* isTypedMethod. Only relevant for methods. */ |
4644 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4645 | | }; |
4646 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4647 | | static_assert(0 < 1, "There is no slot for us"); |
4648 | | static const JSJitInfo onsuspend_setterinfo = { |
4649 | | { (JSJitGetterOp)set_onsuspend }, |
4650 | | { prototypes::id::SVGElement }, |
4651 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4652 | | JSJitInfo::Setter, |
4653 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4654 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
4655 | | false, /* isInfallible. False in setters. */ |
4656 | | false, /* isMovable. Not relevant for setters. */ |
4657 | | false, /* isEliminatable. Not relevant for setters. */ |
4658 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4659 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4660 | | false, /* isTypedMethod. Only relevant for methods. */ |
4661 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4662 | | }; |
4663 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4664 | | static_assert(0 < 1, "There is no slot for us"); |
4665 | | |
4666 | | MOZ_CAN_RUN_SCRIPT static bool |
4667 | | get_ontimeupdate(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
4668 | 0 | { |
4669 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ontimeupdate", DOM, cx); |
4670 | 0 |
|
4671 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOntimeupdate()); |
4672 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4673 | 0 | if (result) { |
4674 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
4675 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
4676 | 0 | return false; |
4677 | 0 | } |
4678 | 0 | return true; |
4679 | 0 | } else { |
4680 | 0 | args.rval().setNull(); |
4681 | 0 | return true; |
4682 | 0 | } |
4683 | 0 | } |
4684 | | |
4685 | | MOZ_CAN_RUN_SCRIPT static bool |
4686 | | set_ontimeupdate(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
4687 | 0 | { |
4688 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ontimeupdate", DOM, cx); |
4689 | 0 |
|
4690 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
4691 | 0 | if (args[0].isObject()) { |
4692 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
4693 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
4694 | 0 | } |
4695 | 0 | } else { |
4696 | 0 | arg0 = nullptr; |
4697 | 0 | } |
4698 | 0 | self->SetOntimeupdate(Constify(arg0)); |
4699 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4700 | 0 |
|
4701 | 0 | return true; |
4702 | 0 | } |
4703 | | |
4704 | | static const JSJitInfo ontimeupdate_getterinfo = { |
4705 | | { (JSJitGetterOp)get_ontimeupdate }, |
4706 | | { prototypes::id::SVGElement }, |
4707 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4708 | | JSJitInfo::Getter, |
4709 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4710 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
4711 | | false, /* isInfallible. False in setters. */ |
4712 | | false, /* isMovable. Not relevant for setters. */ |
4713 | | false, /* isEliminatable. Not relevant for setters. */ |
4714 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4715 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4716 | | false, /* isTypedMethod. Only relevant for methods. */ |
4717 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4718 | | }; |
4719 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4720 | | static_assert(0 < 1, "There is no slot for us"); |
4721 | | static const JSJitInfo ontimeupdate_setterinfo = { |
4722 | | { (JSJitGetterOp)set_ontimeupdate }, |
4723 | | { prototypes::id::SVGElement }, |
4724 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4725 | | JSJitInfo::Setter, |
4726 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4727 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
4728 | | false, /* isInfallible. False in setters. */ |
4729 | | false, /* isMovable. Not relevant for setters. */ |
4730 | | false, /* isEliminatable. Not relevant for setters. */ |
4731 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4732 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4733 | | false, /* isTypedMethod. Only relevant for methods. */ |
4734 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4735 | | }; |
4736 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4737 | | static_assert(0 < 1, "There is no slot for us"); |
4738 | | |
4739 | | MOZ_CAN_RUN_SCRIPT static bool |
4740 | | get_onvolumechange(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
4741 | 0 | { |
4742 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onvolumechange", DOM, cx); |
4743 | 0 |
|
4744 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnvolumechange()); |
4745 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4746 | 0 | if (result) { |
4747 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
4748 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
4749 | 0 | return false; |
4750 | 0 | } |
4751 | 0 | return true; |
4752 | 0 | } else { |
4753 | 0 | args.rval().setNull(); |
4754 | 0 | return true; |
4755 | 0 | } |
4756 | 0 | } |
4757 | | |
4758 | | MOZ_CAN_RUN_SCRIPT static bool |
4759 | | set_onvolumechange(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
4760 | 0 | { |
4761 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onvolumechange", DOM, cx); |
4762 | 0 |
|
4763 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
4764 | 0 | if (args[0].isObject()) { |
4765 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
4766 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
4767 | 0 | } |
4768 | 0 | } else { |
4769 | 0 | arg0 = nullptr; |
4770 | 0 | } |
4771 | 0 | self->SetOnvolumechange(Constify(arg0)); |
4772 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4773 | 0 |
|
4774 | 0 | return true; |
4775 | 0 | } |
4776 | | |
4777 | | static const JSJitInfo onvolumechange_getterinfo = { |
4778 | | { (JSJitGetterOp)get_onvolumechange }, |
4779 | | { prototypes::id::SVGElement }, |
4780 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4781 | | JSJitInfo::Getter, |
4782 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4783 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
4784 | | false, /* isInfallible. False in setters. */ |
4785 | | false, /* isMovable. Not relevant for setters. */ |
4786 | | false, /* isEliminatable. Not relevant for setters. */ |
4787 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4788 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4789 | | false, /* isTypedMethod. Only relevant for methods. */ |
4790 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4791 | | }; |
4792 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4793 | | static_assert(0 < 1, "There is no slot for us"); |
4794 | | static const JSJitInfo onvolumechange_setterinfo = { |
4795 | | { (JSJitGetterOp)set_onvolumechange }, |
4796 | | { prototypes::id::SVGElement }, |
4797 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4798 | | JSJitInfo::Setter, |
4799 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4800 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
4801 | | false, /* isInfallible. False in setters. */ |
4802 | | false, /* isMovable. Not relevant for setters. */ |
4803 | | false, /* isEliminatable. Not relevant for setters. */ |
4804 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4805 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4806 | | false, /* isTypedMethod. Only relevant for methods. */ |
4807 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4808 | | }; |
4809 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4810 | | static_assert(0 < 1, "There is no slot for us"); |
4811 | | |
4812 | | MOZ_CAN_RUN_SCRIPT static bool |
4813 | | get_onwaiting(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
4814 | 0 | { |
4815 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onwaiting", DOM, cx); |
4816 | 0 |
|
4817 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnwaiting()); |
4818 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4819 | 0 | if (result) { |
4820 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
4821 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
4822 | 0 | return false; |
4823 | 0 | } |
4824 | 0 | return true; |
4825 | 0 | } else { |
4826 | 0 | args.rval().setNull(); |
4827 | 0 | return true; |
4828 | 0 | } |
4829 | 0 | } |
4830 | | |
4831 | | MOZ_CAN_RUN_SCRIPT static bool |
4832 | | set_onwaiting(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
4833 | 0 | { |
4834 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onwaiting", DOM, cx); |
4835 | 0 |
|
4836 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
4837 | 0 | if (args[0].isObject()) { |
4838 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
4839 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
4840 | 0 | } |
4841 | 0 | } else { |
4842 | 0 | arg0 = nullptr; |
4843 | 0 | } |
4844 | 0 | self->SetOnwaiting(Constify(arg0)); |
4845 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4846 | 0 |
|
4847 | 0 | return true; |
4848 | 0 | } |
4849 | | |
4850 | | static const JSJitInfo onwaiting_getterinfo = { |
4851 | | { (JSJitGetterOp)get_onwaiting }, |
4852 | | { prototypes::id::SVGElement }, |
4853 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4854 | | JSJitInfo::Getter, |
4855 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4856 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
4857 | | false, /* isInfallible. False in setters. */ |
4858 | | false, /* isMovable. Not relevant for setters. */ |
4859 | | false, /* isEliminatable. Not relevant for setters. */ |
4860 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4861 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4862 | | false, /* isTypedMethod. Only relevant for methods. */ |
4863 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4864 | | }; |
4865 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4866 | | static_assert(0 < 1, "There is no slot for us"); |
4867 | | static const JSJitInfo onwaiting_setterinfo = { |
4868 | | { (JSJitGetterOp)set_onwaiting }, |
4869 | | { prototypes::id::SVGElement }, |
4870 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4871 | | JSJitInfo::Setter, |
4872 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4873 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
4874 | | false, /* isInfallible. False in setters. */ |
4875 | | false, /* isMovable. Not relevant for setters. */ |
4876 | | false, /* isEliminatable. Not relevant for setters. */ |
4877 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4878 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4879 | | false, /* isTypedMethod. Only relevant for methods. */ |
4880 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4881 | | }; |
4882 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4883 | | static_assert(0 < 1, "There is no slot for us"); |
4884 | | |
4885 | | MOZ_CAN_RUN_SCRIPT static bool |
4886 | | get_onselectstart(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
4887 | 0 | { |
4888 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onselectstart", DOM, cx); |
4889 | 0 |
|
4890 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnselectstart()); |
4891 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4892 | 0 | if (result) { |
4893 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
4894 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
4895 | 0 | return false; |
4896 | 0 | } |
4897 | 0 | return true; |
4898 | 0 | } else { |
4899 | 0 | args.rval().setNull(); |
4900 | 0 | return true; |
4901 | 0 | } |
4902 | 0 | } |
4903 | | |
4904 | | MOZ_CAN_RUN_SCRIPT static bool |
4905 | | set_onselectstart(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
4906 | 0 | { |
4907 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onselectstart", DOM, cx); |
4908 | 0 |
|
4909 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
4910 | 0 | if (args[0].isObject()) { |
4911 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
4912 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
4913 | 0 | } |
4914 | 0 | } else { |
4915 | 0 | arg0 = nullptr; |
4916 | 0 | } |
4917 | 0 | self->SetOnselectstart(Constify(arg0)); |
4918 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4919 | 0 |
|
4920 | 0 | return true; |
4921 | 0 | } |
4922 | | |
4923 | | static const JSJitInfo onselectstart_getterinfo = { |
4924 | | { (JSJitGetterOp)get_onselectstart }, |
4925 | | { prototypes::id::SVGElement }, |
4926 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4927 | | JSJitInfo::Getter, |
4928 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4929 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
4930 | | false, /* isInfallible. False in setters. */ |
4931 | | false, /* isMovable. Not relevant for setters. */ |
4932 | | false, /* isEliminatable. Not relevant for setters. */ |
4933 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4934 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4935 | | false, /* isTypedMethod. Only relevant for methods. */ |
4936 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4937 | | }; |
4938 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4939 | | static_assert(0 < 1, "There is no slot for us"); |
4940 | | static const JSJitInfo onselectstart_setterinfo = { |
4941 | | { (JSJitGetterOp)set_onselectstart }, |
4942 | | { prototypes::id::SVGElement }, |
4943 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
4944 | | JSJitInfo::Setter, |
4945 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
4946 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
4947 | | false, /* isInfallible. False in setters. */ |
4948 | | false, /* isMovable. Not relevant for setters. */ |
4949 | | false, /* isEliminatable. Not relevant for setters. */ |
4950 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
4951 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
4952 | | false, /* isTypedMethod. Only relevant for methods. */ |
4953 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
4954 | | }; |
4955 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
4956 | | static_assert(0 < 1, "There is no slot for us"); |
4957 | | |
4958 | | MOZ_CAN_RUN_SCRIPT static bool |
4959 | | get_ontoggle(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
4960 | 0 | { |
4961 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ontoggle", DOM, cx); |
4962 | 0 |
|
4963 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOntoggle()); |
4964 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4965 | 0 | if (result) { |
4966 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
4967 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
4968 | 0 | return false; |
4969 | 0 | } |
4970 | 0 | return true; |
4971 | 0 | } else { |
4972 | 0 | args.rval().setNull(); |
4973 | 0 | return true; |
4974 | 0 | } |
4975 | 0 | } |
4976 | | |
4977 | | MOZ_CAN_RUN_SCRIPT static bool |
4978 | | set_ontoggle(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
4979 | 0 | { |
4980 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ontoggle", DOM, cx); |
4981 | 0 |
|
4982 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
4983 | 0 | if (args[0].isObject()) { |
4984 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
4985 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
4986 | 0 | } |
4987 | 0 | } else { |
4988 | 0 | arg0 = nullptr; |
4989 | 0 | } |
4990 | 0 | self->SetOntoggle(Constify(arg0)); |
4991 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
4992 | 0 |
|
4993 | 0 | return true; |
4994 | 0 | } |
4995 | | |
4996 | | static const JSJitInfo ontoggle_getterinfo = { |
4997 | | { (JSJitGetterOp)get_ontoggle }, |
4998 | | { prototypes::id::SVGElement }, |
4999 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5000 | | JSJitInfo::Getter, |
5001 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5002 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
5003 | | false, /* isInfallible. False in setters. */ |
5004 | | false, /* isMovable. Not relevant for setters. */ |
5005 | | false, /* isEliminatable. Not relevant for setters. */ |
5006 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5007 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5008 | | false, /* isTypedMethod. Only relevant for methods. */ |
5009 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5010 | | }; |
5011 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5012 | | static_assert(0 < 1, "There is no slot for us"); |
5013 | | static const JSJitInfo ontoggle_setterinfo = { |
5014 | | { (JSJitGetterOp)set_ontoggle }, |
5015 | | { prototypes::id::SVGElement }, |
5016 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5017 | | JSJitInfo::Setter, |
5018 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5019 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
5020 | | false, /* isInfallible. False in setters. */ |
5021 | | false, /* isMovable. Not relevant for setters. */ |
5022 | | false, /* isEliminatable. Not relevant for setters. */ |
5023 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5024 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5025 | | false, /* isTypedMethod. Only relevant for methods. */ |
5026 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5027 | | }; |
5028 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5029 | | static_assert(0 < 1, "There is no slot for us"); |
5030 | | |
5031 | | MOZ_CAN_RUN_SCRIPT static bool |
5032 | | get_onpointercancel(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
5033 | 0 | { |
5034 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onpointercancel", DOM, cx); |
5035 | 0 |
|
5036 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnpointercancel()); |
5037 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5038 | 0 | if (result) { |
5039 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
5040 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
5041 | 0 | return false; |
5042 | 0 | } |
5043 | 0 | return true; |
5044 | 0 | } else { |
5045 | 0 | args.rval().setNull(); |
5046 | 0 | return true; |
5047 | 0 | } |
5048 | 0 | } |
5049 | | |
5050 | | MOZ_CAN_RUN_SCRIPT static bool |
5051 | | set_onpointercancel(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
5052 | 0 | { |
5053 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onpointercancel", DOM, cx); |
5054 | 0 |
|
5055 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
5056 | 0 | if (args[0].isObject()) { |
5057 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
5058 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
5059 | 0 | } |
5060 | 0 | } else { |
5061 | 0 | arg0 = nullptr; |
5062 | 0 | } |
5063 | 0 | self->SetOnpointercancel(Constify(arg0)); |
5064 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5065 | 0 |
|
5066 | 0 | return true; |
5067 | 0 | } |
5068 | | |
5069 | | static const JSJitInfo onpointercancel_getterinfo = { |
5070 | | { (JSJitGetterOp)get_onpointercancel }, |
5071 | | { prototypes::id::SVGElement }, |
5072 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5073 | | JSJitInfo::Getter, |
5074 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5075 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
5076 | | false, /* isInfallible. False in setters. */ |
5077 | | false, /* isMovable. Not relevant for setters. */ |
5078 | | false, /* isEliminatable. Not relevant for setters. */ |
5079 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5080 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5081 | | false, /* isTypedMethod. Only relevant for methods. */ |
5082 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5083 | | }; |
5084 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5085 | | static_assert(0 < 1, "There is no slot for us"); |
5086 | | static const JSJitInfo onpointercancel_setterinfo = { |
5087 | | { (JSJitGetterOp)set_onpointercancel }, |
5088 | | { prototypes::id::SVGElement }, |
5089 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5090 | | JSJitInfo::Setter, |
5091 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5092 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
5093 | | false, /* isInfallible. False in setters. */ |
5094 | | false, /* isMovable. Not relevant for setters. */ |
5095 | | false, /* isEliminatable. Not relevant for setters. */ |
5096 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5097 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5098 | | false, /* isTypedMethod. Only relevant for methods. */ |
5099 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5100 | | }; |
5101 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5102 | | static_assert(0 < 1, "There is no slot for us"); |
5103 | | |
5104 | | MOZ_CAN_RUN_SCRIPT static bool |
5105 | | get_onpointerdown(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
5106 | 0 | { |
5107 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onpointerdown", DOM, cx); |
5108 | 0 |
|
5109 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnpointerdown()); |
5110 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5111 | 0 | if (result) { |
5112 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
5113 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
5114 | 0 | return false; |
5115 | 0 | } |
5116 | 0 | return true; |
5117 | 0 | } else { |
5118 | 0 | args.rval().setNull(); |
5119 | 0 | return true; |
5120 | 0 | } |
5121 | 0 | } |
5122 | | |
5123 | | MOZ_CAN_RUN_SCRIPT static bool |
5124 | | set_onpointerdown(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
5125 | 0 | { |
5126 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onpointerdown", DOM, cx); |
5127 | 0 |
|
5128 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
5129 | 0 | if (args[0].isObject()) { |
5130 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
5131 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
5132 | 0 | } |
5133 | 0 | } else { |
5134 | 0 | arg0 = nullptr; |
5135 | 0 | } |
5136 | 0 | self->SetOnpointerdown(Constify(arg0)); |
5137 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5138 | 0 |
|
5139 | 0 | return true; |
5140 | 0 | } |
5141 | | |
5142 | | static const JSJitInfo onpointerdown_getterinfo = { |
5143 | | { (JSJitGetterOp)get_onpointerdown }, |
5144 | | { prototypes::id::SVGElement }, |
5145 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5146 | | JSJitInfo::Getter, |
5147 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5148 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
5149 | | false, /* isInfallible. False in setters. */ |
5150 | | false, /* isMovable. Not relevant for setters. */ |
5151 | | false, /* isEliminatable. Not relevant for setters. */ |
5152 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5153 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5154 | | false, /* isTypedMethod. Only relevant for methods. */ |
5155 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5156 | | }; |
5157 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5158 | | static_assert(0 < 1, "There is no slot for us"); |
5159 | | static const JSJitInfo onpointerdown_setterinfo = { |
5160 | | { (JSJitGetterOp)set_onpointerdown }, |
5161 | | { prototypes::id::SVGElement }, |
5162 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5163 | | JSJitInfo::Setter, |
5164 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5165 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
5166 | | false, /* isInfallible. False in setters. */ |
5167 | | false, /* isMovable. Not relevant for setters. */ |
5168 | | false, /* isEliminatable. Not relevant for setters. */ |
5169 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5170 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5171 | | false, /* isTypedMethod. Only relevant for methods. */ |
5172 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5173 | | }; |
5174 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5175 | | static_assert(0 < 1, "There is no slot for us"); |
5176 | | |
5177 | | MOZ_CAN_RUN_SCRIPT static bool |
5178 | | get_onpointerup(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
5179 | 0 | { |
5180 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onpointerup", DOM, cx); |
5181 | 0 |
|
5182 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnpointerup()); |
5183 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5184 | 0 | if (result) { |
5185 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
5186 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
5187 | 0 | return false; |
5188 | 0 | } |
5189 | 0 | return true; |
5190 | 0 | } else { |
5191 | 0 | args.rval().setNull(); |
5192 | 0 | return true; |
5193 | 0 | } |
5194 | 0 | } |
5195 | | |
5196 | | MOZ_CAN_RUN_SCRIPT static bool |
5197 | | set_onpointerup(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
5198 | 0 | { |
5199 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onpointerup", DOM, cx); |
5200 | 0 |
|
5201 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
5202 | 0 | if (args[0].isObject()) { |
5203 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
5204 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
5205 | 0 | } |
5206 | 0 | } else { |
5207 | 0 | arg0 = nullptr; |
5208 | 0 | } |
5209 | 0 | self->SetOnpointerup(Constify(arg0)); |
5210 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5211 | 0 |
|
5212 | 0 | return true; |
5213 | 0 | } |
5214 | | |
5215 | | static const JSJitInfo onpointerup_getterinfo = { |
5216 | | { (JSJitGetterOp)get_onpointerup }, |
5217 | | { prototypes::id::SVGElement }, |
5218 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5219 | | JSJitInfo::Getter, |
5220 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5221 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
5222 | | false, /* isInfallible. False in setters. */ |
5223 | | false, /* isMovable. Not relevant for setters. */ |
5224 | | false, /* isEliminatable. Not relevant for setters. */ |
5225 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5226 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5227 | | false, /* isTypedMethod. Only relevant for methods. */ |
5228 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5229 | | }; |
5230 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5231 | | static_assert(0 < 1, "There is no slot for us"); |
5232 | | static const JSJitInfo onpointerup_setterinfo = { |
5233 | | { (JSJitGetterOp)set_onpointerup }, |
5234 | | { prototypes::id::SVGElement }, |
5235 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5236 | | JSJitInfo::Setter, |
5237 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5238 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
5239 | | false, /* isInfallible. False in setters. */ |
5240 | | false, /* isMovable. Not relevant for setters. */ |
5241 | | false, /* isEliminatable. Not relevant for setters. */ |
5242 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5243 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5244 | | false, /* isTypedMethod. Only relevant for methods. */ |
5245 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5246 | | }; |
5247 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5248 | | static_assert(0 < 1, "There is no slot for us"); |
5249 | | |
5250 | | MOZ_CAN_RUN_SCRIPT static bool |
5251 | | get_onpointermove(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
5252 | 0 | { |
5253 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onpointermove", DOM, cx); |
5254 | 0 |
|
5255 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnpointermove()); |
5256 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5257 | 0 | if (result) { |
5258 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
5259 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
5260 | 0 | return false; |
5261 | 0 | } |
5262 | 0 | return true; |
5263 | 0 | } else { |
5264 | 0 | args.rval().setNull(); |
5265 | 0 | return true; |
5266 | 0 | } |
5267 | 0 | } |
5268 | | |
5269 | | MOZ_CAN_RUN_SCRIPT static bool |
5270 | | set_onpointermove(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
5271 | 0 | { |
5272 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onpointermove", DOM, cx); |
5273 | 0 |
|
5274 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
5275 | 0 | if (args[0].isObject()) { |
5276 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
5277 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
5278 | 0 | } |
5279 | 0 | } else { |
5280 | 0 | arg0 = nullptr; |
5281 | 0 | } |
5282 | 0 | self->SetOnpointermove(Constify(arg0)); |
5283 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5284 | 0 |
|
5285 | 0 | return true; |
5286 | 0 | } |
5287 | | |
5288 | | static const JSJitInfo onpointermove_getterinfo = { |
5289 | | { (JSJitGetterOp)get_onpointermove }, |
5290 | | { prototypes::id::SVGElement }, |
5291 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5292 | | JSJitInfo::Getter, |
5293 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5294 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
5295 | | false, /* isInfallible. False in setters. */ |
5296 | | false, /* isMovable. Not relevant for setters. */ |
5297 | | false, /* isEliminatable. Not relevant for setters. */ |
5298 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5299 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5300 | | false, /* isTypedMethod. Only relevant for methods. */ |
5301 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5302 | | }; |
5303 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5304 | | static_assert(0 < 1, "There is no slot for us"); |
5305 | | static const JSJitInfo onpointermove_setterinfo = { |
5306 | | { (JSJitGetterOp)set_onpointermove }, |
5307 | | { prototypes::id::SVGElement }, |
5308 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5309 | | JSJitInfo::Setter, |
5310 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5311 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
5312 | | false, /* isInfallible. False in setters. */ |
5313 | | false, /* isMovable. Not relevant for setters. */ |
5314 | | false, /* isEliminatable. Not relevant for setters. */ |
5315 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5316 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5317 | | false, /* isTypedMethod. Only relevant for methods. */ |
5318 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5319 | | }; |
5320 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5321 | | static_assert(0 < 1, "There is no slot for us"); |
5322 | | |
5323 | | MOZ_CAN_RUN_SCRIPT static bool |
5324 | | get_onpointerout(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
5325 | 0 | { |
5326 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onpointerout", DOM, cx); |
5327 | 0 |
|
5328 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnpointerout()); |
5329 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5330 | 0 | if (result) { |
5331 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
5332 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
5333 | 0 | return false; |
5334 | 0 | } |
5335 | 0 | return true; |
5336 | 0 | } else { |
5337 | 0 | args.rval().setNull(); |
5338 | 0 | return true; |
5339 | 0 | } |
5340 | 0 | } |
5341 | | |
5342 | | MOZ_CAN_RUN_SCRIPT static bool |
5343 | | set_onpointerout(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
5344 | 0 | { |
5345 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onpointerout", DOM, cx); |
5346 | 0 |
|
5347 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
5348 | 0 | if (args[0].isObject()) { |
5349 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
5350 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
5351 | 0 | } |
5352 | 0 | } else { |
5353 | 0 | arg0 = nullptr; |
5354 | 0 | } |
5355 | 0 | self->SetOnpointerout(Constify(arg0)); |
5356 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5357 | 0 |
|
5358 | 0 | return true; |
5359 | 0 | } |
5360 | | |
5361 | | static const JSJitInfo onpointerout_getterinfo = { |
5362 | | { (JSJitGetterOp)get_onpointerout }, |
5363 | | { prototypes::id::SVGElement }, |
5364 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5365 | | JSJitInfo::Getter, |
5366 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5367 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
5368 | | false, /* isInfallible. False in setters. */ |
5369 | | false, /* isMovable. Not relevant for setters. */ |
5370 | | false, /* isEliminatable. Not relevant for setters. */ |
5371 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5372 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5373 | | false, /* isTypedMethod. Only relevant for methods. */ |
5374 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5375 | | }; |
5376 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5377 | | static_assert(0 < 1, "There is no slot for us"); |
5378 | | static const JSJitInfo onpointerout_setterinfo = { |
5379 | | { (JSJitGetterOp)set_onpointerout }, |
5380 | | { prototypes::id::SVGElement }, |
5381 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5382 | | JSJitInfo::Setter, |
5383 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5384 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
5385 | | false, /* isInfallible. False in setters. */ |
5386 | | false, /* isMovable. Not relevant for setters. */ |
5387 | | false, /* isEliminatable. Not relevant for setters. */ |
5388 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5389 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5390 | | false, /* isTypedMethod. Only relevant for methods. */ |
5391 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5392 | | }; |
5393 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5394 | | static_assert(0 < 1, "There is no slot for us"); |
5395 | | |
5396 | | MOZ_CAN_RUN_SCRIPT static bool |
5397 | | get_onpointerover(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
5398 | 0 | { |
5399 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onpointerover", DOM, cx); |
5400 | 0 |
|
5401 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnpointerover()); |
5402 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5403 | 0 | if (result) { |
5404 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
5405 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
5406 | 0 | return false; |
5407 | 0 | } |
5408 | 0 | return true; |
5409 | 0 | } else { |
5410 | 0 | args.rval().setNull(); |
5411 | 0 | return true; |
5412 | 0 | } |
5413 | 0 | } |
5414 | | |
5415 | | MOZ_CAN_RUN_SCRIPT static bool |
5416 | | set_onpointerover(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
5417 | 0 | { |
5418 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onpointerover", DOM, cx); |
5419 | 0 |
|
5420 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
5421 | 0 | if (args[0].isObject()) { |
5422 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
5423 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
5424 | 0 | } |
5425 | 0 | } else { |
5426 | 0 | arg0 = nullptr; |
5427 | 0 | } |
5428 | 0 | self->SetOnpointerover(Constify(arg0)); |
5429 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5430 | 0 |
|
5431 | 0 | return true; |
5432 | 0 | } |
5433 | | |
5434 | | static const JSJitInfo onpointerover_getterinfo = { |
5435 | | { (JSJitGetterOp)get_onpointerover }, |
5436 | | { prototypes::id::SVGElement }, |
5437 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5438 | | JSJitInfo::Getter, |
5439 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5440 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
5441 | | false, /* isInfallible. False in setters. */ |
5442 | | false, /* isMovable. Not relevant for setters. */ |
5443 | | false, /* isEliminatable. Not relevant for setters. */ |
5444 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5445 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5446 | | false, /* isTypedMethod. Only relevant for methods. */ |
5447 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5448 | | }; |
5449 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5450 | | static_assert(0 < 1, "There is no slot for us"); |
5451 | | static const JSJitInfo onpointerover_setterinfo = { |
5452 | | { (JSJitGetterOp)set_onpointerover }, |
5453 | | { prototypes::id::SVGElement }, |
5454 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5455 | | JSJitInfo::Setter, |
5456 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5457 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
5458 | | false, /* isInfallible. False in setters. */ |
5459 | | false, /* isMovable. Not relevant for setters. */ |
5460 | | false, /* isEliminatable. Not relevant for setters. */ |
5461 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5462 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5463 | | false, /* isTypedMethod. Only relevant for methods. */ |
5464 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5465 | | }; |
5466 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5467 | | static_assert(0 < 1, "There is no slot for us"); |
5468 | | |
5469 | | MOZ_CAN_RUN_SCRIPT static bool |
5470 | | get_onpointerenter(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
5471 | 0 | { |
5472 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onpointerenter", DOM, cx); |
5473 | 0 |
|
5474 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnpointerenter()); |
5475 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5476 | 0 | if (result) { |
5477 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
5478 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
5479 | 0 | return false; |
5480 | 0 | } |
5481 | 0 | return true; |
5482 | 0 | } else { |
5483 | 0 | args.rval().setNull(); |
5484 | 0 | return true; |
5485 | 0 | } |
5486 | 0 | } |
5487 | | |
5488 | | MOZ_CAN_RUN_SCRIPT static bool |
5489 | | set_onpointerenter(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
5490 | 0 | { |
5491 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onpointerenter", DOM, cx); |
5492 | 0 |
|
5493 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
5494 | 0 | if (args[0].isObject()) { |
5495 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
5496 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
5497 | 0 | } |
5498 | 0 | } else { |
5499 | 0 | arg0 = nullptr; |
5500 | 0 | } |
5501 | 0 | self->SetOnpointerenter(Constify(arg0)); |
5502 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5503 | 0 |
|
5504 | 0 | return true; |
5505 | 0 | } |
5506 | | |
5507 | | static const JSJitInfo onpointerenter_getterinfo = { |
5508 | | { (JSJitGetterOp)get_onpointerenter }, |
5509 | | { prototypes::id::SVGElement }, |
5510 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5511 | | JSJitInfo::Getter, |
5512 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5513 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
5514 | | false, /* isInfallible. False in setters. */ |
5515 | | false, /* isMovable. Not relevant for setters. */ |
5516 | | false, /* isEliminatable. Not relevant for setters. */ |
5517 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5518 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5519 | | false, /* isTypedMethod. Only relevant for methods. */ |
5520 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5521 | | }; |
5522 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5523 | | static_assert(0 < 1, "There is no slot for us"); |
5524 | | static const JSJitInfo onpointerenter_setterinfo = { |
5525 | | { (JSJitGetterOp)set_onpointerenter }, |
5526 | | { prototypes::id::SVGElement }, |
5527 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5528 | | JSJitInfo::Setter, |
5529 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5530 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
5531 | | false, /* isInfallible. False in setters. */ |
5532 | | false, /* isMovable. Not relevant for setters. */ |
5533 | | false, /* isEliminatable. Not relevant for setters. */ |
5534 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5535 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5536 | | false, /* isTypedMethod. Only relevant for methods. */ |
5537 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5538 | | }; |
5539 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5540 | | static_assert(0 < 1, "There is no slot for us"); |
5541 | | |
5542 | | MOZ_CAN_RUN_SCRIPT static bool |
5543 | | get_onpointerleave(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
5544 | 0 | { |
5545 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onpointerleave", DOM, cx); |
5546 | 0 |
|
5547 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnpointerleave()); |
5548 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5549 | 0 | if (result) { |
5550 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
5551 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
5552 | 0 | return false; |
5553 | 0 | } |
5554 | 0 | return true; |
5555 | 0 | } else { |
5556 | 0 | args.rval().setNull(); |
5557 | 0 | return true; |
5558 | 0 | } |
5559 | 0 | } |
5560 | | |
5561 | | MOZ_CAN_RUN_SCRIPT static bool |
5562 | | set_onpointerleave(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
5563 | 0 | { |
5564 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onpointerleave", DOM, cx); |
5565 | 0 |
|
5566 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
5567 | 0 | if (args[0].isObject()) { |
5568 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
5569 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
5570 | 0 | } |
5571 | 0 | } else { |
5572 | 0 | arg0 = nullptr; |
5573 | 0 | } |
5574 | 0 | self->SetOnpointerleave(Constify(arg0)); |
5575 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5576 | 0 |
|
5577 | 0 | return true; |
5578 | 0 | } |
5579 | | |
5580 | | static const JSJitInfo onpointerleave_getterinfo = { |
5581 | | { (JSJitGetterOp)get_onpointerleave }, |
5582 | | { prototypes::id::SVGElement }, |
5583 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5584 | | JSJitInfo::Getter, |
5585 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5586 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
5587 | | false, /* isInfallible. False in setters. */ |
5588 | | false, /* isMovable. Not relevant for setters. */ |
5589 | | false, /* isEliminatable. Not relevant for setters. */ |
5590 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5591 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5592 | | false, /* isTypedMethod. Only relevant for methods. */ |
5593 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5594 | | }; |
5595 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5596 | | static_assert(0 < 1, "There is no slot for us"); |
5597 | | static const JSJitInfo onpointerleave_setterinfo = { |
5598 | | { (JSJitGetterOp)set_onpointerleave }, |
5599 | | { prototypes::id::SVGElement }, |
5600 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5601 | | JSJitInfo::Setter, |
5602 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5603 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
5604 | | false, /* isInfallible. False in setters. */ |
5605 | | false, /* isMovable. Not relevant for setters. */ |
5606 | | false, /* isEliminatable. Not relevant for setters. */ |
5607 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5608 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5609 | | false, /* isTypedMethod. Only relevant for methods. */ |
5610 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5611 | | }; |
5612 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5613 | | static_assert(0 < 1, "There is no slot for us"); |
5614 | | |
5615 | | MOZ_CAN_RUN_SCRIPT static bool |
5616 | | get_ongotpointercapture(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
5617 | 0 | { |
5618 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ongotpointercapture", DOM, cx); |
5619 | 0 |
|
5620 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOngotpointercapture()); |
5621 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5622 | 0 | if (result) { |
5623 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
5624 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
5625 | 0 | return false; |
5626 | 0 | } |
5627 | 0 | return true; |
5628 | 0 | } else { |
5629 | 0 | args.rval().setNull(); |
5630 | 0 | return true; |
5631 | 0 | } |
5632 | 0 | } |
5633 | | |
5634 | | MOZ_CAN_RUN_SCRIPT static bool |
5635 | | set_ongotpointercapture(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
5636 | 0 | { |
5637 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ongotpointercapture", DOM, cx); |
5638 | 0 |
|
5639 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
5640 | 0 | if (args[0].isObject()) { |
5641 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
5642 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
5643 | 0 | } |
5644 | 0 | } else { |
5645 | 0 | arg0 = nullptr; |
5646 | 0 | } |
5647 | 0 | self->SetOngotpointercapture(Constify(arg0)); |
5648 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5649 | 0 |
|
5650 | 0 | return true; |
5651 | 0 | } |
5652 | | |
5653 | | static const JSJitInfo ongotpointercapture_getterinfo = { |
5654 | | { (JSJitGetterOp)get_ongotpointercapture }, |
5655 | | { prototypes::id::SVGElement }, |
5656 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5657 | | JSJitInfo::Getter, |
5658 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5659 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
5660 | | false, /* isInfallible. False in setters. */ |
5661 | | false, /* isMovable. Not relevant for setters. */ |
5662 | | false, /* isEliminatable. Not relevant for setters. */ |
5663 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5664 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5665 | | false, /* isTypedMethod. Only relevant for methods. */ |
5666 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5667 | | }; |
5668 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5669 | | static_assert(0 < 1, "There is no slot for us"); |
5670 | | static const JSJitInfo ongotpointercapture_setterinfo = { |
5671 | | { (JSJitGetterOp)set_ongotpointercapture }, |
5672 | | { prototypes::id::SVGElement }, |
5673 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5674 | | JSJitInfo::Setter, |
5675 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5676 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
5677 | | false, /* isInfallible. False in setters. */ |
5678 | | false, /* isMovable. Not relevant for setters. */ |
5679 | | false, /* isEliminatable. Not relevant for setters. */ |
5680 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5681 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5682 | | false, /* isTypedMethod. Only relevant for methods. */ |
5683 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5684 | | }; |
5685 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5686 | | static_assert(0 < 1, "There is no slot for us"); |
5687 | | |
5688 | | MOZ_CAN_RUN_SCRIPT static bool |
5689 | | get_onlostpointercapture(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
5690 | 0 | { |
5691 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onlostpointercapture", DOM, cx); |
5692 | 0 |
|
5693 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnlostpointercapture()); |
5694 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5695 | 0 | if (result) { |
5696 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
5697 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
5698 | 0 | return false; |
5699 | 0 | } |
5700 | 0 | return true; |
5701 | 0 | } else { |
5702 | 0 | args.rval().setNull(); |
5703 | 0 | return true; |
5704 | 0 | } |
5705 | 0 | } |
5706 | | |
5707 | | MOZ_CAN_RUN_SCRIPT static bool |
5708 | | set_onlostpointercapture(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
5709 | 0 | { |
5710 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onlostpointercapture", DOM, cx); |
5711 | 0 |
|
5712 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
5713 | 0 | if (args[0].isObject()) { |
5714 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
5715 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
5716 | 0 | } |
5717 | 0 | } else { |
5718 | 0 | arg0 = nullptr; |
5719 | 0 | } |
5720 | 0 | self->SetOnlostpointercapture(Constify(arg0)); |
5721 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5722 | 0 |
|
5723 | 0 | return true; |
5724 | 0 | } |
5725 | | |
5726 | | static const JSJitInfo onlostpointercapture_getterinfo = { |
5727 | | { (JSJitGetterOp)get_onlostpointercapture }, |
5728 | | { prototypes::id::SVGElement }, |
5729 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5730 | | JSJitInfo::Getter, |
5731 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5732 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
5733 | | false, /* isInfallible. False in setters. */ |
5734 | | false, /* isMovable. Not relevant for setters. */ |
5735 | | false, /* isEliminatable. Not relevant for setters. */ |
5736 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5737 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5738 | | false, /* isTypedMethod. Only relevant for methods. */ |
5739 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5740 | | }; |
5741 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5742 | | static_assert(0 < 1, "There is no slot for us"); |
5743 | | static const JSJitInfo onlostpointercapture_setterinfo = { |
5744 | | { (JSJitGetterOp)set_onlostpointercapture }, |
5745 | | { prototypes::id::SVGElement }, |
5746 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5747 | | JSJitInfo::Setter, |
5748 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5749 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
5750 | | false, /* isInfallible. False in setters. */ |
5751 | | false, /* isMovable. Not relevant for setters. */ |
5752 | | false, /* isEliminatable. Not relevant for setters. */ |
5753 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5754 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5755 | | false, /* isTypedMethod. Only relevant for methods. */ |
5756 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5757 | | }; |
5758 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5759 | | static_assert(0 < 1, "There is no slot for us"); |
5760 | | |
5761 | | MOZ_CAN_RUN_SCRIPT static bool |
5762 | | get_onmozfullscreenchange(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
5763 | 0 | { |
5764 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onmozfullscreenchange", DOM, cx); |
5765 | 0 |
|
5766 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnmozfullscreenchange()); |
5767 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5768 | 0 | if (result) { |
5769 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
5770 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
5771 | 0 | return false; |
5772 | 0 | } |
5773 | 0 | return true; |
5774 | 0 | } else { |
5775 | 0 | args.rval().setNull(); |
5776 | 0 | return true; |
5777 | 0 | } |
5778 | 0 | } |
5779 | | |
5780 | | MOZ_CAN_RUN_SCRIPT static bool |
5781 | | set_onmozfullscreenchange(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
5782 | 0 | { |
5783 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onmozfullscreenchange", DOM, cx); |
5784 | 0 |
|
5785 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
5786 | 0 | if (args[0].isObject()) { |
5787 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
5788 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
5789 | 0 | } |
5790 | 0 | } else { |
5791 | 0 | arg0 = nullptr; |
5792 | 0 | } |
5793 | 0 | self->SetOnmozfullscreenchange(Constify(arg0)); |
5794 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5795 | 0 |
|
5796 | 0 | return true; |
5797 | 0 | } |
5798 | | |
5799 | | static const JSJitInfo onmozfullscreenchange_getterinfo = { |
5800 | | { (JSJitGetterOp)get_onmozfullscreenchange }, |
5801 | | { prototypes::id::SVGElement }, |
5802 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5803 | | JSJitInfo::Getter, |
5804 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5805 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
5806 | | false, /* isInfallible. False in setters. */ |
5807 | | false, /* isMovable. Not relevant for setters. */ |
5808 | | false, /* isEliminatable. Not relevant for setters. */ |
5809 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5810 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5811 | | false, /* isTypedMethod. Only relevant for methods. */ |
5812 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5813 | | }; |
5814 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5815 | | static_assert(0 < 1, "There is no slot for us"); |
5816 | | static const JSJitInfo onmozfullscreenchange_setterinfo = { |
5817 | | { (JSJitGetterOp)set_onmozfullscreenchange }, |
5818 | | { prototypes::id::SVGElement }, |
5819 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5820 | | JSJitInfo::Setter, |
5821 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5822 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
5823 | | false, /* isInfallible. False in setters. */ |
5824 | | false, /* isMovable. Not relevant for setters. */ |
5825 | | false, /* isEliminatable. Not relevant for setters. */ |
5826 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5827 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5828 | | false, /* isTypedMethod. Only relevant for methods. */ |
5829 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5830 | | }; |
5831 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5832 | | static_assert(0 < 1, "There is no slot for us"); |
5833 | | |
5834 | | MOZ_CAN_RUN_SCRIPT static bool |
5835 | | get_onmozfullscreenerror(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
5836 | 0 | { |
5837 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onmozfullscreenerror", DOM, cx); |
5838 | 0 |
|
5839 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnmozfullscreenerror()); |
5840 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5841 | 0 | if (result) { |
5842 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
5843 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
5844 | 0 | return false; |
5845 | 0 | } |
5846 | 0 | return true; |
5847 | 0 | } else { |
5848 | 0 | args.rval().setNull(); |
5849 | 0 | return true; |
5850 | 0 | } |
5851 | 0 | } |
5852 | | |
5853 | | MOZ_CAN_RUN_SCRIPT static bool |
5854 | | set_onmozfullscreenerror(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
5855 | 0 | { |
5856 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onmozfullscreenerror", DOM, cx); |
5857 | 0 |
|
5858 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
5859 | 0 | if (args[0].isObject()) { |
5860 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
5861 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
5862 | 0 | } |
5863 | 0 | } else { |
5864 | 0 | arg0 = nullptr; |
5865 | 0 | } |
5866 | 0 | self->SetOnmozfullscreenerror(Constify(arg0)); |
5867 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5868 | 0 |
|
5869 | 0 | return true; |
5870 | 0 | } |
5871 | | |
5872 | | static const JSJitInfo onmozfullscreenerror_getterinfo = { |
5873 | | { (JSJitGetterOp)get_onmozfullscreenerror }, |
5874 | | { prototypes::id::SVGElement }, |
5875 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5876 | | JSJitInfo::Getter, |
5877 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5878 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
5879 | | false, /* isInfallible. False in setters. */ |
5880 | | false, /* isMovable. Not relevant for setters. */ |
5881 | | false, /* isEliminatable. Not relevant for setters. */ |
5882 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5883 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5884 | | false, /* isTypedMethod. Only relevant for methods. */ |
5885 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5886 | | }; |
5887 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5888 | | static_assert(0 < 1, "There is no slot for us"); |
5889 | | static const JSJitInfo onmozfullscreenerror_setterinfo = { |
5890 | | { (JSJitGetterOp)set_onmozfullscreenerror }, |
5891 | | { prototypes::id::SVGElement }, |
5892 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5893 | | JSJitInfo::Setter, |
5894 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5895 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
5896 | | false, /* isInfallible. False in setters. */ |
5897 | | false, /* isMovable. Not relevant for setters. */ |
5898 | | false, /* isEliminatable. Not relevant for setters. */ |
5899 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5900 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5901 | | false, /* isTypedMethod. Only relevant for methods. */ |
5902 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5903 | | }; |
5904 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5905 | | static_assert(0 < 1, "There is no slot for us"); |
5906 | | |
5907 | | MOZ_CAN_RUN_SCRIPT static bool |
5908 | | get_onanimationcancel(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
5909 | 0 | { |
5910 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onanimationcancel", DOM, cx); |
5911 | 0 |
|
5912 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnanimationcancel()); |
5913 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5914 | 0 | if (result) { |
5915 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
5916 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
5917 | 0 | return false; |
5918 | 0 | } |
5919 | 0 | return true; |
5920 | 0 | } else { |
5921 | 0 | args.rval().setNull(); |
5922 | 0 | return true; |
5923 | 0 | } |
5924 | 0 | } |
5925 | | |
5926 | | MOZ_CAN_RUN_SCRIPT static bool |
5927 | | set_onanimationcancel(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
5928 | 0 | { |
5929 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onanimationcancel", DOM, cx); |
5930 | 0 |
|
5931 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
5932 | 0 | if (args[0].isObject()) { |
5933 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
5934 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
5935 | 0 | } |
5936 | 0 | } else { |
5937 | 0 | arg0 = nullptr; |
5938 | 0 | } |
5939 | 0 | self->SetOnanimationcancel(Constify(arg0)); |
5940 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5941 | 0 |
|
5942 | 0 | return true; |
5943 | 0 | } |
5944 | | |
5945 | | static const JSJitInfo onanimationcancel_getterinfo = { |
5946 | | { (JSJitGetterOp)get_onanimationcancel }, |
5947 | | { prototypes::id::SVGElement }, |
5948 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5949 | | JSJitInfo::Getter, |
5950 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5951 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
5952 | | false, /* isInfallible. False in setters. */ |
5953 | | false, /* isMovable. Not relevant for setters. */ |
5954 | | false, /* isEliminatable. Not relevant for setters. */ |
5955 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5956 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5957 | | false, /* isTypedMethod. Only relevant for methods. */ |
5958 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5959 | | }; |
5960 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5961 | | static_assert(0 < 1, "There is no slot for us"); |
5962 | | static const JSJitInfo onanimationcancel_setterinfo = { |
5963 | | { (JSJitGetterOp)set_onanimationcancel }, |
5964 | | { prototypes::id::SVGElement }, |
5965 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
5966 | | JSJitInfo::Setter, |
5967 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
5968 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
5969 | | false, /* isInfallible. False in setters. */ |
5970 | | false, /* isMovable. Not relevant for setters. */ |
5971 | | false, /* isEliminatable. Not relevant for setters. */ |
5972 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
5973 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
5974 | | false, /* isTypedMethod. Only relevant for methods. */ |
5975 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
5976 | | }; |
5977 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
5978 | | static_assert(0 < 1, "There is no slot for us"); |
5979 | | |
5980 | | MOZ_CAN_RUN_SCRIPT static bool |
5981 | | get_onanimationend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
5982 | 0 | { |
5983 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onanimationend", DOM, cx); |
5984 | 0 |
|
5985 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnanimationend()); |
5986 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
5987 | 0 | if (result) { |
5988 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
5989 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
5990 | 0 | return false; |
5991 | 0 | } |
5992 | 0 | return true; |
5993 | 0 | } else { |
5994 | 0 | args.rval().setNull(); |
5995 | 0 | return true; |
5996 | 0 | } |
5997 | 0 | } |
5998 | | |
5999 | | MOZ_CAN_RUN_SCRIPT static bool |
6000 | | set_onanimationend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
6001 | 0 | { |
6002 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onanimationend", DOM, cx); |
6003 | 0 |
|
6004 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
6005 | 0 | if (args[0].isObject()) { |
6006 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
6007 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
6008 | 0 | } |
6009 | 0 | } else { |
6010 | 0 | arg0 = nullptr; |
6011 | 0 | } |
6012 | 0 | self->SetOnanimationend(Constify(arg0)); |
6013 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6014 | 0 |
|
6015 | 0 | return true; |
6016 | 0 | } |
6017 | | |
6018 | | static const JSJitInfo onanimationend_getterinfo = { |
6019 | | { (JSJitGetterOp)get_onanimationend }, |
6020 | | { prototypes::id::SVGElement }, |
6021 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6022 | | JSJitInfo::Getter, |
6023 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6024 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
6025 | | false, /* isInfallible. False in setters. */ |
6026 | | false, /* isMovable. Not relevant for setters. */ |
6027 | | false, /* isEliminatable. Not relevant for setters. */ |
6028 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6029 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6030 | | false, /* isTypedMethod. Only relevant for methods. */ |
6031 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6032 | | }; |
6033 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6034 | | static_assert(0 < 1, "There is no slot for us"); |
6035 | | static const JSJitInfo onanimationend_setterinfo = { |
6036 | | { (JSJitGetterOp)set_onanimationend }, |
6037 | | { prototypes::id::SVGElement }, |
6038 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6039 | | JSJitInfo::Setter, |
6040 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6041 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
6042 | | false, /* isInfallible. False in setters. */ |
6043 | | false, /* isMovable. Not relevant for setters. */ |
6044 | | false, /* isEliminatable. Not relevant for setters. */ |
6045 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6046 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6047 | | false, /* isTypedMethod. Only relevant for methods. */ |
6048 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6049 | | }; |
6050 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6051 | | static_assert(0 < 1, "There is no slot for us"); |
6052 | | |
6053 | | MOZ_CAN_RUN_SCRIPT static bool |
6054 | | get_onanimationiteration(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
6055 | 0 | { |
6056 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onanimationiteration", DOM, cx); |
6057 | 0 |
|
6058 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnanimationiteration()); |
6059 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6060 | 0 | if (result) { |
6061 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
6062 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
6063 | 0 | return false; |
6064 | 0 | } |
6065 | 0 | return true; |
6066 | 0 | } else { |
6067 | 0 | args.rval().setNull(); |
6068 | 0 | return true; |
6069 | 0 | } |
6070 | 0 | } |
6071 | | |
6072 | | MOZ_CAN_RUN_SCRIPT static bool |
6073 | | set_onanimationiteration(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
6074 | 0 | { |
6075 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onanimationiteration", DOM, cx); |
6076 | 0 |
|
6077 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
6078 | 0 | if (args[0].isObject()) { |
6079 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
6080 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
6081 | 0 | } |
6082 | 0 | } else { |
6083 | 0 | arg0 = nullptr; |
6084 | 0 | } |
6085 | 0 | self->SetOnanimationiteration(Constify(arg0)); |
6086 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6087 | 0 |
|
6088 | 0 | return true; |
6089 | 0 | } |
6090 | | |
6091 | | static const JSJitInfo onanimationiteration_getterinfo = { |
6092 | | { (JSJitGetterOp)get_onanimationiteration }, |
6093 | | { prototypes::id::SVGElement }, |
6094 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6095 | | JSJitInfo::Getter, |
6096 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6097 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
6098 | | false, /* isInfallible. False in setters. */ |
6099 | | false, /* isMovable. Not relevant for setters. */ |
6100 | | false, /* isEliminatable. Not relevant for setters. */ |
6101 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6102 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6103 | | false, /* isTypedMethod. Only relevant for methods. */ |
6104 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6105 | | }; |
6106 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6107 | | static_assert(0 < 1, "There is no slot for us"); |
6108 | | static const JSJitInfo onanimationiteration_setterinfo = { |
6109 | | { (JSJitGetterOp)set_onanimationiteration }, |
6110 | | { prototypes::id::SVGElement }, |
6111 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6112 | | JSJitInfo::Setter, |
6113 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6114 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
6115 | | false, /* isInfallible. False in setters. */ |
6116 | | false, /* isMovable. Not relevant for setters. */ |
6117 | | false, /* isEliminatable. Not relevant for setters. */ |
6118 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6119 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6120 | | false, /* isTypedMethod. Only relevant for methods. */ |
6121 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6122 | | }; |
6123 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6124 | | static_assert(0 < 1, "There is no slot for us"); |
6125 | | |
6126 | | MOZ_CAN_RUN_SCRIPT static bool |
6127 | | get_onanimationstart(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
6128 | 0 | { |
6129 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onanimationstart", DOM, cx); |
6130 | 0 |
|
6131 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnanimationstart()); |
6132 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6133 | 0 | if (result) { |
6134 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
6135 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
6136 | 0 | return false; |
6137 | 0 | } |
6138 | 0 | return true; |
6139 | 0 | } else { |
6140 | 0 | args.rval().setNull(); |
6141 | 0 | return true; |
6142 | 0 | } |
6143 | 0 | } |
6144 | | |
6145 | | MOZ_CAN_RUN_SCRIPT static bool |
6146 | | set_onanimationstart(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
6147 | 0 | { |
6148 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onanimationstart", DOM, cx); |
6149 | 0 |
|
6150 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
6151 | 0 | if (args[0].isObject()) { |
6152 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
6153 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
6154 | 0 | } |
6155 | 0 | } else { |
6156 | 0 | arg0 = nullptr; |
6157 | 0 | } |
6158 | 0 | self->SetOnanimationstart(Constify(arg0)); |
6159 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6160 | 0 |
|
6161 | 0 | return true; |
6162 | 0 | } |
6163 | | |
6164 | | static const JSJitInfo onanimationstart_getterinfo = { |
6165 | | { (JSJitGetterOp)get_onanimationstart }, |
6166 | | { prototypes::id::SVGElement }, |
6167 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6168 | | JSJitInfo::Getter, |
6169 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6170 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
6171 | | false, /* isInfallible. False in setters. */ |
6172 | | false, /* isMovable. Not relevant for setters. */ |
6173 | | false, /* isEliminatable. Not relevant for setters. */ |
6174 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6175 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6176 | | false, /* isTypedMethod. Only relevant for methods. */ |
6177 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6178 | | }; |
6179 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6180 | | static_assert(0 < 1, "There is no slot for us"); |
6181 | | static const JSJitInfo onanimationstart_setterinfo = { |
6182 | | { (JSJitGetterOp)set_onanimationstart }, |
6183 | | { prototypes::id::SVGElement }, |
6184 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6185 | | JSJitInfo::Setter, |
6186 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6187 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
6188 | | false, /* isInfallible. False in setters. */ |
6189 | | false, /* isMovable. Not relevant for setters. */ |
6190 | | false, /* isEliminatable. Not relevant for setters. */ |
6191 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6192 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6193 | | false, /* isTypedMethod. Only relevant for methods. */ |
6194 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6195 | | }; |
6196 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6197 | | static_assert(0 < 1, "There is no slot for us"); |
6198 | | |
6199 | | MOZ_CAN_RUN_SCRIPT static bool |
6200 | | get_ontransitioncancel(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
6201 | 0 | { |
6202 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ontransitioncancel", DOM, cx); |
6203 | 0 |
|
6204 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOntransitioncancel()); |
6205 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6206 | 0 | if (result) { |
6207 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
6208 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
6209 | 0 | return false; |
6210 | 0 | } |
6211 | 0 | return true; |
6212 | 0 | } else { |
6213 | 0 | args.rval().setNull(); |
6214 | 0 | return true; |
6215 | 0 | } |
6216 | 0 | } |
6217 | | |
6218 | | MOZ_CAN_RUN_SCRIPT static bool |
6219 | | set_ontransitioncancel(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
6220 | 0 | { |
6221 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ontransitioncancel", DOM, cx); |
6222 | 0 |
|
6223 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
6224 | 0 | if (args[0].isObject()) { |
6225 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
6226 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
6227 | 0 | } |
6228 | 0 | } else { |
6229 | 0 | arg0 = nullptr; |
6230 | 0 | } |
6231 | 0 | self->SetOntransitioncancel(Constify(arg0)); |
6232 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6233 | 0 |
|
6234 | 0 | return true; |
6235 | 0 | } |
6236 | | |
6237 | | static const JSJitInfo ontransitioncancel_getterinfo = { |
6238 | | { (JSJitGetterOp)get_ontransitioncancel }, |
6239 | | { prototypes::id::SVGElement }, |
6240 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6241 | | JSJitInfo::Getter, |
6242 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6243 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
6244 | | false, /* isInfallible. False in setters. */ |
6245 | | false, /* isMovable. Not relevant for setters. */ |
6246 | | false, /* isEliminatable. Not relevant for setters. */ |
6247 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6248 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6249 | | false, /* isTypedMethod. Only relevant for methods. */ |
6250 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6251 | | }; |
6252 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6253 | | static_assert(0 < 1, "There is no slot for us"); |
6254 | | static const JSJitInfo ontransitioncancel_setterinfo = { |
6255 | | { (JSJitGetterOp)set_ontransitioncancel }, |
6256 | | { prototypes::id::SVGElement }, |
6257 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6258 | | JSJitInfo::Setter, |
6259 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6260 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
6261 | | false, /* isInfallible. False in setters. */ |
6262 | | false, /* isMovable. Not relevant for setters. */ |
6263 | | false, /* isEliminatable. Not relevant for setters. */ |
6264 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6265 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6266 | | false, /* isTypedMethod. Only relevant for methods. */ |
6267 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6268 | | }; |
6269 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6270 | | static_assert(0 < 1, "There is no slot for us"); |
6271 | | |
6272 | | MOZ_CAN_RUN_SCRIPT static bool |
6273 | | get_ontransitionend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
6274 | 0 | { |
6275 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ontransitionend", DOM, cx); |
6276 | 0 |
|
6277 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOntransitionend()); |
6278 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6279 | 0 | if (result) { |
6280 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
6281 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
6282 | 0 | return false; |
6283 | 0 | } |
6284 | 0 | return true; |
6285 | 0 | } else { |
6286 | 0 | args.rval().setNull(); |
6287 | 0 | return true; |
6288 | 0 | } |
6289 | 0 | } |
6290 | | |
6291 | | MOZ_CAN_RUN_SCRIPT static bool |
6292 | | set_ontransitionend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
6293 | 0 | { |
6294 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ontransitionend", DOM, cx); |
6295 | 0 |
|
6296 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
6297 | 0 | if (args[0].isObject()) { |
6298 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
6299 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
6300 | 0 | } |
6301 | 0 | } else { |
6302 | 0 | arg0 = nullptr; |
6303 | 0 | } |
6304 | 0 | self->SetOntransitionend(Constify(arg0)); |
6305 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6306 | 0 |
|
6307 | 0 | return true; |
6308 | 0 | } |
6309 | | |
6310 | | static const JSJitInfo ontransitionend_getterinfo = { |
6311 | | { (JSJitGetterOp)get_ontransitionend }, |
6312 | | { prototypes::id::SVGElement }, |
6313 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6314 | | JSJitInfo::Getter, |
6315 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6316 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
6317 | | false, /* isInfallible. False in setters. */ |
6318 | | false, /* isMovable. Not relevant for setters. */ |
6319 | | false, /* isEliminatable. Not relevant for setters. */ |
6320 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6321 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6322 | | false, /* isTypedMethod. Only relevant for methods. */ |
6323 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6324 | | }; |
6325 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6326 | | static_assert(0 < 1, "There is no slot for us"); |
6327 | | static const JSJitInfo ontransitionend_setterinfo = { |
6328 | | { (JSJitGetterOp)set_ontransitionend }, |
6329 | | { prototypes::id::SVGElement }, |
6330 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6331 | | JSJitInfo::Setter, |
6332 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6333 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
6334 | | false, /* isInfallible. False in setters. */ |
6335 | | false, /* isMovable. Not relevant for setters. */ |
6336 | | false, /* isEliminatable. Not relevant for setters. */ |
6337 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6338 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6339 | | false, /* isTypedMethod. Only relevant for methods. */ |
6340 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6341 | | }; |
6342 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6343 | | static_assert(0 < 1, "There is no slot for us"); |
6344 | | |
6345 | | MOZ_CAN_RUN_SCRIPT static bool |
6346 | | get_ontransitionrun(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
6347 | 0 | { |
6348 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ontransitionrun", DOM, cx); |
6349 | 0 |
|
6350 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOntransitionrun()); |
6351 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6352 | 0 | if (result) { |
6353 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
6354 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
6355 | 0 | return false; |
6356 | 0 | } |
6357 | 0 | return true; |
6358 | 0 | } else { |
6359 | 0 | args.rval().setNull(); |
6360 | 0 | return true; |
6361 | 0 | } |
6362 | 0 | } |
6363 | | |
6364 | | MOZ_CAN_RUN_SCRIPT static bool |
6365 | | set_ontransitionrun(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
6366 | 0 | { |
6367 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ontransitionrun", DOM, cx); |
6368 | 0 |
|
6369 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
6370 | 0 | if (args[0].isObject()) { |
6371 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
6372 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
6373 | 0 | } |
6374 | 0 | } else { |
6375 | 0 | arg0 = nullptr; |
6376 | 0 | } |
6377 | 0 | self->SetOntransitionrun(Constify(arg0)); |
6378 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6379 | 0 |
|
6380 | 0 | return true; |
6381 | 0 | } |
6382 | | |
6383 | | static const JSJitInfo ontransitionrun_getterinfo = { |
6384 | | { (JSJitGetterOp)get_ontransitionrun }, |
6385 | | { prototypes::id::SVGElement }, |
6386 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6387 | | JSJitInfo::Getter, |
6388 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6389 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
6390 | | false, /* isInfallible. False in setters. */ |
6391 | | false, /* isMovable. Not relevant for setters. */ |
6392 | | false, /* isEliminatable. Not relevant for setters. */ |
6393 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6394 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6395 | | false, /* isTypedMethod. Only relevant for methods. */ |
6396 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6397 | | }; |
6398 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6399 | | static_assert(0 < 1, "There is no slot for us"); |
6400 | | static const JSJitInfo ontransitionrun_setterinfo = { |
6401 | | { (JSJitGetterOp)set_ontransitionrun }, |
6402 | | { prototypes::id::SVGElement }, |
6403 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6404 | | JSJitInfo::Setter, |
6405 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6406 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
6407 | | false, /* isInfallible. False in setters. */ |
6408 | | false, /* isMovable. Not relevant for setters. */ |
6409 | | false, /* isEliminatable. Not relevant for setters. */ |
6410 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6411 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6412 | | false, /* isTypedMethod. Only relevant for methods. */ |
6413 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6414 | | }; |
6415 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6416 | | static_assert(0 < 1, "There is no slot for us"); |
6417 | | |
6418 | | MOZ_CAN_RUN_SCRIPT static bool |
6419 | | get_ontransitionstart(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
6420 | 0 | { |
6421 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ontransitionstart", DOM, cx); |
6422 | 0 |
|
6423 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOntransitionstart()); |
6424 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6425 | 0 | if (result) { |
6426 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
6427 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
6428 | 0 | return false; |
6429 | 0 | } |
6430 | 0 | return true; |
6431 | 0 | } else { |
6432 | 0 | args.rval().setNull(); |
6433 | 0 | return true; |
6434 | 0 | } |
6435 | 0 | } |
6436 | | |
6437 | | MOZ_CAN_RUN_SCRIPT static bool |
6438 | | set_ontransitionstart(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
6439 | 0 | { |
6440 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ontransitionstart", DOM, cx); |
6441 | 0 |
|
6442 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
6443 | 0 | if (args[0].isObject()) { |
6444 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
6445 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
6446 | 0 | } |
6447 | 0 | } else { |
6448 | 0 | arg0 = nullptr; |
6449 | 0 | } |
6450 | 0 | self->SetOntransitionstart(Constify(arg0)); |
6451 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6452 | 0 |
|
6453 | 0 | return true; |
6454 | 0 | } |
6455 | | |
6456 | | static const JSJitInfo ontransitionstart_getterinfo = { |
6457 | | { (JSJitGetterOp)get_ontransitionstart }, |
6458 | | { prototypes::id::SVGElement }, |
6459 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6460 | | JSJitInfo::Getter, |
6461 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6462 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
6463 | | false, /* isInfallible. False in setters. */ |
6464 | | false, /* isMovable. Not relevant for setters. */ |
6465 | | false, /* isEliminatable. Not relevant for setters. */ |
6466 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6467 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6468 | | false, /* isTypedMethod. Only relevant for methods. */ |
6469 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6470 | | }; |
6471 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6472 | | static_assert(0 < 1, "There is no slot for us"); |
6473 | | static const JSJitInfo ontransitionstart_setterinfo = { |
6474 | | { (JSJitGetterOp)set_ontransitionstart }, |
6475 | | { prototypes::id::SVGElement }, |
6476 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6477 | | JSJitInfo::Setter, |
6478 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6479 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
6480 | | false, /* isInfallible. False in setters. */ |
6481 | | false, /* isMovable. Not relevant for setters. */ |
6482 | | false, /* isEliminatable. Not relevant for setters. */ |
6483 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6484 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6485 | | false, /* isTypedMethod. Only relevant for methods. */ |
6486 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6487 | | }; |
6488 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6489 | | static_assert(0 < 1, "There is no slot for us"); |
6490 | | |
6491 | | MOZ_CAN_RUN_SCRIPT static bool |
6492 | | get_onwebkitanimationend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
6493 | 0 | { |
6494 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onwebkitanimationend", DOM, cx); |
6495 | 0 |
|
6496 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnwebkitanimationend()); |
6497 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6498 | 0 | if (result) { |
6499 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
6500 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
6501 | 0 | return false; |
6502 | 0 | } |
6503 | 0 | return true; |
6504 | 0 | } else { |
6505 | 0 | args.rval().setNull(); |
6506 | 0 | return true; |
6507 | 0 | } |
6508 | 0 | } |
6509 | | |
6510 | | MOZ_CAN_RUN_SCRIPT static bool |
6511 | | set_onwebkitanimationend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
6512 | 0 | { |
6513 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onwebkitanimationend", DOM, cx); |
6514 | 0 |
|
6515 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
6516 | 0 | if (args[0].isObject()) { |
6517 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
6518 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
6519 | 0 | } |
6520 | 0 | } else { |
6521 | 0 | arg0 = nullptr; |
6522 | 0 | } |
6523 | 0 | self->SetOnwebkitanimationend(Constify(arg0)); |
6524 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6525 | 0 |
|
6526 | 0 | return true; |
6527 | 0 | } |
6528 | | |
6529 | | static const JSJitInfo onwebkitanimationend_getterinfo = { |
6530 | | { (JSJitGetterOp)get_onwebkitanimationend }, |
6531 | | { prototypes::id::SVGElement }, |
6532 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6533 | | JSJitInfo::Getter, |
6534 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6535 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
6536 | | false, /* isInfallible. False in setters. */ |
6537 | | false, /* isMovable. Not relevant for setters. */ |
6538 | | false, /* isEliminatable. Not relevant for setters. */ |
6539 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6540 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6541 | | false, /* isTypedMethod. Only relevant for methods. */ |
6542 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6543 | | }; |
6544 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6545 | | static_assert(0 < 1, "There is no slot for us"); |
6546 | | static const JSJitInfo onwebkitanimationend_setterinfo = { |
6547 | | { (JSJitGetterOp)set_onwebkitanimationend }, |
6548 | | { prototypes::id::SVGElement }, |
6549 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6550 | | JSJitInfo::Setter, |
6551 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6552 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
6553 | | false, /* isInfallible. False in setters. */ |
6554 | | false, /* isMovable. Not relevant for setters. */ |
6555 | | false, /* isEliminatable. Not relevant for setters. */ |
6556 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6557 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6558 | | false, /* isTypedMethod. Only relevant for methods. */ |
6559 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6560 | | }; |
6561 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6562 | | static_assert(0 < 1, "There is no slot for us"); |
6563 | | |
6564 | | MOZ_CAN_RUN_SCRIPT static bool |
6565 | | get_onwebkitanimationiteration(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
6566 | 0 | { |
6567 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onwebkitanimationiteration", DOM, cx); |
6568 | 0 |
|
6569 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnwebkitanimationiteration()); |
6570 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6571 | 0 | if (result) { |
6572 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
6573 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
6574 | 0 | return false; |
6575 | 0 | } |
6576 | 0 | return true; |
6577 | 0 | } else { |
6578 | 0 | args.rval().setNull(); |
6579 | 0 | return true; |
6580 | 0 | } |
6581 | 0 | } |
6582 | | |
6583 | | MOZ_CAN_RUN_SCRIPT static bool |
6584 | | set_onwebkitanimationiteration(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
6585 | 0 | { |
6586 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onwebkitanimationiteration", DOM, cx); |
6587 | 0 |
|
6588 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
6589 | 0 | if (args[0].isObject()) { |
6590 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
6591 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
6592 | 0 | } |
6593 | 0 | } else { |
6594 | 0 | arg0 = nullptr; |
6595 | 0 | } |
6596 | 0 | self->SetOnwebkitanimationiteration(Constify(arg0)); |
6597 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6598 | 0 |
|
6599 | 0 | return true; |
6600 | 0 | } |
6601 | | |
6602 | | static const JSJitInfo onwebkitanimationiteration_getterinfo = { |
6603 | | { (JSJitGetterOp)get_onwebkitanimationiteration }, |
6604 | | { prototypes::id::SVGElement }, |
6605 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6606 | | JSJitInfo::Getter, |
6607 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6608 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
6609 | | false, /* isInfallible. False in setters. */ |
6610 | | false, /* isMovable. Not relevant for setters. */ |
6611 | | false, /* isEliminatable. Not relevant for setters. */ |
6612 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6613 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6614 | | false, /* isTypedMethod. Only relevant for methods. */ |
6615 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6616 | | }; |
6617 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6618 | | static_assert(0 < 1, "There is no slot for us"); |
6619 | | static const JSJitInfo onwebkitanimationiteration_setterinfo = { |
6620 | | { (JSJitGetterOp)set_onwebkitanimationiteration }, |
6621 | | { prototypes::id::SVGElement }, |
6622 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6623 | | JSJitInfo::Setter, |
6624 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6625 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
6626 | | false, /* isInfallible. False in setters. */ |
6627 | | false, /* isMovable. Not relevant for setters. */ |
6628 | | false, /* isEliminatable. Not relevant for setters. */ |
6629 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6630 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6631 | | false, /* isTypedMethod. Only relevant for methods. */ |
6632 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6633 | | }; |
6634 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6635 | | static_assert(0 < 1, "There is no slot for us"); |
6636 | | |
6637 | | MOZ_CAN_RUN_SCRIPT static bool |
6638 | | get_onwebkitanimationstart(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
6639 | 0 | { |
6640 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onwebkitanimationstart", DOM, cx); |
6641 | 0 |
|
6642 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnwebkitanimationstart()); |
6643 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6644 | 0 | if (result) { |
6645 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
6646 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
6647 | 0 | return false; |
6648 | 0 | } |
6649 | 0 | return true; |
6650 | 0 | } else { |
6651 | 0 | args.rval().setNull(); |
6652 | 0 | return true; |
6653 | 0 | } |
6654 | 0 | } |
6655 | | |
6656 | | MOZ_CAN_RUN_SCRIPT static bool |
6657 | | set_onwebkitanimationstart(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
6658 | 0 | { |
6659 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onwebkitanimationstart", DOM, cx); |
6660 | 0 |
|
6661 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
6662 | 0 | if (args[0].isObject()) { |
6663 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
6664 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
6665 | 0 | } |
6666 | 0 | } else { |
6667 | 0 | arg0 = nullptr; |
6668 | 0 | } |
6669 | 0 | self->SetOnwebkitanimationstart(Constify(arg0)); |
6670 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6671 | 0 |
|
6672 | 0 | return true; |
6673 | 0 | } |
6674 | | |
6675 | | static const JSJitInfo onwebkitanimationstart_getterinfo = { |
6676 | | { (JSJitGetterOp)get_onwebkitanimationstart }, |
6677 | | { prototypes::id::SVGElement }, |
6678 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6679 | | JSJitInfo::Getter, |
6680 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6681 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
6682 | | false, /* isInfallible. False in setters. */ |
6683 | | false, /* isMovable. Not relevant for setters. */ |
6684 | | false, /* isEliminatable. Not relevant for setters. */ |
6685 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6686 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6687 | | false, /* isTypedMethod. Only relevant for methods. */ |
6688 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6689 | | }; |
6690 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6691 | | static_assert(0 < 1, "There is no slot for us"); |
6692 | | static const JSJitInfo onwebkitanimationstart_setterinfo = { |
6693 | | { (JSJitGetterOp)set_onwebkitanimationstart }, |
6694 | | { prototypes::id::SVGElement }, |
6695 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6696 | | JSJitInfo::Setter, |
6697 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6698 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
6699 | | false, /* isInfallible. False in setters. */ |
6700 | | false, /* isMovable. Not relevant for setters. */ |
6701 | | false, /* isEliminatable. Not relevant for setters. */ |
6702 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6703 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6704 | | false, /* isTypedMethod. Only relevant for methods. */ |
6705 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6706 | | }; |
6707 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6708 | | static_assert(0 < 1, "There is no slot for us"); |
6709 | | |
6710 | | MOZ_CAN_RUN_SCRIPT static bool |
6711 | | get_onwebkittransitionend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
6712 | 0 | { |
6713 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onwebkittransitionend", DOM, cx); |
6714 | 0 |
|
6715 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnwebkittransitionend()); |
6716 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6717 | 0 | if (result) { |
6718 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
6719 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
6720 | 0 | return false; |
6721 | 0 | } |
6722 | 0 | return true; |
6723 | 0 | } else { |
6724 | 0 | args.rval().setNull(); |
6725 | 0 | return true; |
6726 | 0 | } |
6727 | 0 | } |
6728 | | |
6729 | | MOZ_CAN_RUN_SCRIPT static bool |
6730 | | set_onwebkittransitionend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
6731 | 0 | { |
6732 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onwebkittransitionend", DOM, cx); |
6733 | 0 |
|
6734 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
6735 | 0 | if (args[0].isObject()) { |
6736 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
6737 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
6738 | 0 | } |
6739 | 0 | } else { |
6740 | 0 | arg0 = nullptr; |
6741 | 0 | } |
6742 | 0 | self->SetOnwebkittransitionend(Constify(arg0)); |
6743 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6744 | 0 |
|
6745 | 0 | return true; |
6746 | 0 | } |
6747 | | |
6748 | | static const JSJitInfo onwebkittransitionend_getterinfo = { |
6749 | | { (JSJitGetterOp)get_onwebkittransitionend }, |
6750 | | { prototypes::id::SVGElement }, |
6751 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6752 | | JSJitInfo::Getter, |
6753 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6754 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
6755 | | false, /* isInfallible. False in setters. */ |
6756 | | false, /* isMovable. Not relevant for setters. */ |
6757 | | false, /* isEliminatable. Not relevant for setters. */ |
6758 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6759 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6760 | | false, /* isTypedMethod. Only relevant for methods. */ |
6761 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6762 | | }; |
6763 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6764 | | static_assert(0 < 1, "There is no slot for us"); |
6765 | | static const JSJitInfo onwebkittransitionend_setterinfo = { |
6766 | | { (JSJitGetterOp)set_onwebkittransitionend }, |
6767 | | { prototypes::id::SVGElement }, |
6768 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6769 | | JSJitInfo::Setter, |
6770 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6771 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
6772 | | false, /* isInfallible. False in setters. */ |
6773 | | false, /* isMovable. Not relevant for setters. */ |
6774 | | false, /* isEliminatable. Not relevant for setters. */ |
6775 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6776 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6777 | | false, /* isTypedMethod. Only relevant for methods. */ |
6778 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6779 | | }; |
6780 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6781 | | static_assert(0 < 1, "There is no slot for us"); |
6782 | | |
6783 | | MOZ_CAN_RUN_SCRIPT static bool |
6784 | | get_onerror(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
6785 | 0 | { |
6786 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.onerror", DOM, cx); |
6787 | 0 |
|
6788 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOnerror()); |
6789 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6790 | 0 | if (result) { |
6791 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
6792 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
6793 | 0 | return false; |
6794 | 0 | } |
6795 | 0 | return true; |
6796 | 0 | } else { |
6797 | 0 | args.rval().setNull(); |
6798 | 0 | return true; |
6799 | 0 | } |
6800 | 0 | } |
6801 | | |
6802 | | MOZ_CAN_RUN_SCRIPT static bool |
6803 | | set_onerror(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
6804 | 0 | { |
6805 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.onerror", DOM, cx); |
6806 | 0 |
|
6807 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
6808 | 0 | if (args[0].isObject()) { |
6809 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
6810 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
6811 | 0 | } |
6812 | 0 | } else { |
6813 | 0 | arg0 = nullptr; |
6814 | 0 | } |
6815 | 0 | self->SetOnerror(Constify(arg0)); |
6816 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6817 | 0 |
|
6818 | 0 | return true; |
6819 | 0 | } |
6820 | | |
6821 | | static const JSJitInfo onerror_getterinfo = { |
6822 | | { (JSJitGetterOp)get_onerror }, |
6823 | | { prototypes::id::SVGElement }, |
6824 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6825 | | JSJitInfo::Getter, |
6826 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6827 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
6828 | | false, /* isInfallible. False in setters. */ |
6829 | | false, /* isMovable. Not relevant for setters. */ |
6830 | | false, /* isEliminatable. Not relevant for setters. */ |
6831 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6832 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6833 | | false, /* isTypedMethod. Only relevant for methods. */ |
6834 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6835 | | }; |
6836 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6837 | | static_assert(0 < 1, "There is no slot for us"); |
6838 | | static const JSJitInfo onerror_setterinfo = { |
6839 | | { (JSJitGetterOp)set_onerror }, |
6840 | | { prototypes::id::SVGElement }, |
6841 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6842 | | JSJitInfo::Setter, |
6843 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6844 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
6845 | | false, /* isInfallible. False in setters. */ |
6846 | | false, /* isMovable. Not relevant for setters. */ |
6847 | | false, /* isEliminatable. Not relevant for setters. */ |
6848 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6849 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6850 | | false, /* isTypedMethod. Only relevant for methods. */ |
6851 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6852 | | }; |
6853 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6854 | | static_assert(0 < 1, "There is no slot for us"); |
6855 | | |
6856 | | MOZ_CAN_RUN_SCRIPT static bool |
6857 | | get_ontouchstart(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
6858 | 0 | { |
6859 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ontouchstart", DOM, cx); |
6860 | 0 |
|
6861 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOntouchstart()); |
6862 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6863 | 0 | if (result) { |
6864 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
6865 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
6866 | 0 | return false; |
6867 | 0 | } |
6868 | 0 | return true; |
6869 | 0 | } else { |
6870 | 0 | args.rval().setNull(); |
6871 | 0 | return true; |
6872 | 0 | } |
6873 | 0 | } |
6874 | | |
6875 | | MOZ_CAN_RUN_SCRIPT static bool |
6876 | | set_ontouchstart(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
6877 | 0 | { |
6878 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ontouchstart", DOM, cx); |
6879 | 0 |
|
6880 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
6881 | 0 | if (args[0].isObject()) { |
6882 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
6883 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
6884 | 0 | } |
6885 | 0 | } else { |
6886 | 0 | arg0 = nullptr; |
6887 | 0 | } |
6888 | 0 | self->SetOntouchstart(Constify(arg0)); |
6889 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6890 | 0 |
|
6891 | 0 | return true; |
6892 | 0 | } |
6893 | | |
6894 | | static const JSJitInfo ontouchstart_getterinfo = { |
6895 | | { (JSJitGetterOp)get_ontouchstart }, |
6896 | | { prototypes::id::SVGElement }, |
6897 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6898 | | JSJitInfo::Getter, |
6899 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6900 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
6901 | | false, /* isInfallible. False in setters. */ |
6902 | | false, /* isMovable. Not relevant for setters. */ |
6903 | | false, /* isEliminatable. Not relevant for setters. */ |
6904 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6905 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6906 | | false, /* isTypedMethod. Only relevant for methods. */ |
6907 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6908 | | }; |
6909 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6910 | | static_assert(0 < 1, "There is no slot for us"); |
6911 | | static const JSJitInfo ontouchstart_setterinfo = { |
6912 | | { (JSJitGetterOp)set_ontouchstart }, |
6913 | | { prototypes::id::SVGElement }, |
6914 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6915 | | JSJitInfo::Setter, |
6916 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6917 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
6918 | | false, /* isInfallible. False in setters. */ |
6919 | | false, /* isMovable. Not relevant for setters. */ |
6920 | | false, /* isEliminatable. Not relevant for setters. */ |
6921 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6922 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6923 | | false, /* isTypedMethod. Only relevant for methods. */ |
6924 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6925 | | }; |
6926 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6927 | | static_assert(0 < 1, "There is no slot for us"); |
6928 | | |
6929 | | MOZ_CAN_RUN_SCRIPT static bool |
6930 | | get_ontouchend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
6931 | 0 | { |
6932 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ontouchend", DOM, cx); |
6933 | 0 |
|
6934 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOntouchend()); |
6935 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6936 | 0 | if (result) { |
6937 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
6938 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
6939 | 0 | return false; |
6940 | 0 | } |
6941 | 0 | return true; |
6942 | 0 | } else { |
6943 | 0 | args.rval().setNull(); |
6944 | 0 | return true; |
6945 | 0 | } |
6946 | 0 | } |
6947 | | |
6948 | | MOZ_CAN_RUN_SCRIPT static bool |
6949 | | set_ontouchend(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
6950 | 0 | { |
6951 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ontouchend", DOM, cx); |
6952 | 0 |
|
6953 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
6954 | 0 | if (args[0].isObject()) { |
6955 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
6956 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
6957 | 0 | } |
6958 | 0 | } else { |
6959 | 0 | arg0 = nullptr; |
6960 | 0 | } |
6961 | 0 | self->SetOntouchend(Constify(arg0)); |
6962 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
6963 | 0 |
|
6964 | 0 | return true; |
6965 | 0 | } |
6966 | | |
6967 | | static const JSJitInfo ontouchend_getterinfo = { |
6968 | | { (JSJitGetterOp)get_ontouchend }, |
6969 | | { prototypes::id::SVGElement }, |
6970 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6971 | | JSJitInfo::Getter, |
6972 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6973 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
6974 | | false, /* isInfallible. False in setters. */ |
6975 | | false, /* isMovable. Not relevant for setters. */ |
6976 | | false, /* isEliminatable. Not relevant for setters. */ |
6977 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6978 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6979 | | false, /* isTypedMethod. Only relevant for methods. */ |
6980 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6981 | | }; |
6982 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
6983 | | static_assert(0 < 1, "There is no slot for us"); |
6984 | | static const JSJitInfo ontouchend_setterinfo = { |
6985 | | { (JSJitGetterOp)set_ontouchend }, |
6986 | | { prototypes::id::SVGElement }, |
6987 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
6988 | | JSJitInfo::Setter, |
6989 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
6990 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
6991 | | false, /* isInfallible. False in setters. */ |
6992 | | false, /* isMovable. Not relevant for setters. */ |
6993 | | false, /* isEliminatable. Not relevant for setters. */ |
6994 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
6995 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
6996 | | false, /* isTypedMethod. Only relevant for methods. */ |
6997 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
6998 | | }; |
6999 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
7000 | | static_assert(0 < 1, "There is no slot for us"); |
7001 | | |
7002 | | MOZ_CAN_RUN_SCRIPT static bool |
7003 | | get_ontouchmove(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
7004 | 0 | { |
7005 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ontouchmove", DOM, cx); |
7006 | 0 |
|
7007 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOntouchmove()); |
7008 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
7009 | 0 | if (result) { |
7010 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
7011 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
7012 | 0 | return false; |
7013 | 0 | } |
7014 | 0 | return true; |
7015 | 0 | } else { |
7016 | 0 | args.rval().setNull(); |
7017 | 0 | return true; |
7018 | 0 | } |
7019 | 0 | } |
7020 | | |
7021 | | MOZ_CAN_RUN_SCRIPT static bool |
7022 | | set_ontouchmove(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
7023 | 0 | { |
7024 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ontouchmove", DOM, cx); |
7025 | 0 |
|
7026 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
7027 | 0 | if (args[0].isObject()) { |
7028 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
7029 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
7030 | 0 | } |
7031 | 0 | } else { |
7032 | 0 | arg0 = nullptr; |
7033 | 0 | } |
7034 | 0 | self->SetOntouchmove(Constify(arg0)); |
7035 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
7036 | 0 |
|
7037 | 0 | return true; |
7038 | 0 | } |
7039 | | |
7040 | | static const JSJitInfo ontouchmove_getterinfo = { |
7041 | | { (JSJitGetterOp)get_ontouchmove }, |
7042 | | { prototypes::id::SVGElement }, |
7043 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
7044 | | JSJitInfo::Getter, |
7045 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
7046 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
7047 | | false, /* isInfallible. False in setters. */ |
7048 | | false, /* isMovable. Not relevant for setters. */ |
7049 | | false, /* isEliminatable. Not relevant for setters. */ |
7050 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
7051 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
7052 | | false, /* isTypedMethod. Only relevant for methods. */ |
7053 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
7054 | | }; |
7055 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
7056 | | static_assert(0 < 1, "There is no slot for us"); |
7057 | | static const JSJitInfo ontouchmove_setterinfo = { |
7058 | | { (JSJitGetterOp)set_ontouchmove }, |
7059 | | { prototypes::id::SVGElement }, |
7060 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
7061 | | JSJitInfo::Setter, |
7062 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
7063 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
7064 | | false, /* isInfallible. False in setters. */ |
7065 | | false, /* isMovable. Not relevant for setters. */ |
7066 | | false, /* isEliminatable. Not relevant for setters. */ |
7067 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
7068 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
7069 | | false, /* isTypedMethod. Only relevant for methods. */ |
7070 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
7071 | | }; |
7072 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
7073 | | static_assert(0 < 1, "There is no slot for us"); |
7074 | | |
7075 | | MOZ_CAN_RUN_SCRIPT static bool |
7076 | | get_ontouchcancel(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitGetterCallArgs args) |
7077 | 0 | { |
7078 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGElement.ontouchcancel", DOM, cx); |
7079 | 0 |
|
7080 | 0 | RefPtr<EventHandlerNonNull> result(self->GetOntouchcancel()); |
7081 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
7082 | 0 | if (result) { |
7083 | 0 | args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result)); |
7084 | 0 | if (!MaybeWrapObjectOrNullValue(cx, args.rval())) { |
7085 | 0 | return false; |
7086 | 0 | } |
7087 | 0 | return true; |
7088 | 0 | } else { |
7089 | 0 | args.rval().setNull(); |
7090 | 0 | return true; |
7091 | 0 | } |
7092 | 0 | } |
7093 | | |
7094 | | MOZ_CAN_RUN_SCRIPT static bool |
7095 | | set_ontouchcancel(JSContext* cx, JS::Handle<JSObject*> obj, nsSVGElement* self, JSJitSetterCallArgs args) |
7096 | 0 | { |
7097 | 0 | AUTO_PROFILER_LABEL_FAST("set SVGElement.ontouchcancel", DOM, cx); |
7098 | 0 |
|
7099 | 0 | RootedCallback<RefPtr<binding_detail::FastEventHandlerNonNull>> arg0(cx); |
7100 | 0 | if (args[0].isObject()) { |
7101 | 0 | { // scope for tempRoot and tempGlobalRoot if needed |
7102 | 0 | arg0 = new binding_detail::FastEventHandlerNonNull(&args[0].toObject(), JS::CurrentGlobalOrNull(cx)); |
7103 | 0 | } |
7104 | 0 | } else { |
7105 | 0 | arg0 = nullptr; |
7106 | 0 | } |
7107 | 0 | self->SetOntouchcancel(Constify(arg0)); |
7108 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
7109 | 0 |
|
7110 | 0 | return true; |
7111 | 0 | } |
7112 | | |
7113 | | static const JSJitInfo ontouchcancel_getterinfo = { |
7114 | | { (JSJitGetterOp)get_ontouchcancel }, |
7115 | | { prototypes::id::SVGElement }, |
7116 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
7117 | | JSJitInfo::Getter, |
7118 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
7119 | | JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */ |
7120 | | false, /* isInfallible. False in setters. */ |
7121 | | false, /* isMovable. Not relevant for setters. */ |
7122 | | false, /* isEliminatable. Not relevant for setters. */ |
7123 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
7124 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
7125 | | false, /* isTypedMethod. Only relevant for methods. */ |
7126 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
7127 | | }; |
7128 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
7129 | | static_assert(0 < 1, "There is no slot for us"); |
7130 | | static const JSJitInfo ontouchcancel_setterinfo = { |
7131 | | { (JSJitGetterOp)set_ontouchcancel }, |
7132 | | { prototypes::id::SVGElement }, |
7133 | | { PrototypeTraits<prototypes::id::SVGElement>::Depth }, |
7134 | | JSJitInfo::Setter, |
7135 | | JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */ |
7136 | | JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */ |
7137 | | false, /* isInfallible. False in setters. */ |
7138 | | false, /* isMovable. Not relevant for setters. */ |
7139 | | false, /* isEliminatable. Not relevant for setters. */ |
7140 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
7141 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
7142 | | false, /* isTypedMethod. Only relevant for methods. */ |
7143 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
7144 | | }; |
7145 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
7146 | | static_assert(0 < 1, "There is no slot for us"); |
7147 | | |
7148 | | static bool |
7149 | | _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val) |
7150 | 0 | { |
7151 | 0 | nsSVGElement* self = UnwrapPossiblyNotInitializedDOMObject<nsSVGElement>(obj); |
7152 | 0 | // We don't want to preserve if we don't have a wrapper, and we |
7153 | 0 | // obviously can't preserve if we're not initialized. |
7154 | 0 | if (self && self->GetWrapperPreserveColor()) { |
7155 | 0 | PreserveWrapper(self); |
7156 | 0 | } |
7157 | 0 | return true; |
7158 | 0 | } |
7159 | | |
7160 | | static void |
7161 | | _finalize(js::FreeOp* fop, JSObject* obj) |
7162 | 0 | { |
7163 | 0 | nsSVGElement* self = UnwrapPossiblyNotInitializedDOMObject<nsSVGElement>(obj); |
7164 | 0 | if (self) { |
7165 | 0 | ClearWrapper(self, self, obj); |
7166 | 0 | AddForDeferredFinalization<nsSVGElement>(self); |
7167 | 0 | } |
7168 | 0 | } |
7169 | | |
7170 | | static size_t |
7171 | | _objectMoved(JSObject* obj, JSObject* old) |
7172 | 0 | { |
7173 | 0 | nsSVGElement* self = UnwrapPossiblyNotInitializedDOMObject<nsSVGElement>(obj); |
7174 | 0 | if (self) { |
7175 | 0 | UpdateWrapper(self, self, obj, old); |
7176 | 0 | } |
7177 | 0 |
|
7178 | 0 | return 0; |
7179 | 0 | } |
7180 | | |
7181 | | // We deliberately use brace-elision to make Visual Studio produce better initalization code. |
7182 | | #if defined(__clang__) |
7183 | | #pragma clang diagnostic push |
7184 | | #pragma clang diagnostic ignored "-Wmissing-braces" |
7185 | | #endif |
7186 | | static const JSFunctionSpec sMethods_specs[] = { |
7187 | | JS_FNSPEC("focus", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&focus_methodinfo), 0, JSPROP_ENUMERATE, nullptr), |
7188 | | JS_FNSPEC("blur", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&blur_methodinfo), 0, JSPROP_ENUMERATE, nullptr), |
7189 | | JS_FS_END |
7190 | | }; |
7191 | | #if defined(__clang__) |
7192 | | #pragma clang diagnostic pop |
7193 | | #endif |
7194 | | |
7195 | | |
7196 | | static const Prefable<const JSFunctionSpec> sMethods[] = { |
7197 | | { nullptr, &sMethods_specs[0] }, |
7198 | | { nullptr, nullptr } |
7199 | | }; |
7200 | | |
7201 | | static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX, |
7202 | | "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)"); |
7203 | | static_assert(2 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX, |
7204 | | "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)"); |
7205 | | |
7206 | | // We deliberately use brace-elision to make Visual Studio produce better initalization code. |
7207 | | #if defined(__clang__) |
7208 | | #pragma clang diagnostic push |
7209 | | #pragma clang diagnostic ignored "-Wmissing-braces" |
7210 | | #endif |
7211 | | static const JSPropertySpec sAttributes_specs[] = { |
7212 | | { "id", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &id_getterinfo, GenericSetter<NormalThisPolicy>, &id_setterinfo }, |
7213 | | { "className", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &className_getterinfo, nullptr, nullptr }, |
7214 | | { "dataset", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &dataset_getterinfo, nullptr, nullptr }, |
7215 | | { "style", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &style_getterinfo, GenericSetter<NormalThisPolicy>, &style_setterinfo }, |
7216 | | { "ownerSVGElement", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ownerSVGElement_getterinfo, nullptr, nullptr }, |
7217 | | { "viewportElement", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &viewportElement_getterinfo, nullptr, nullptr }, |
7218 | | { "tabIndex", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &tabIndex_getterinfo, GenericSetter<NormalThisPolicy>, &tabIndex_setterinfo }, |
7219 | | { "oncopy", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &oncopy_getterinfo, GenericSetter<NormalThisPolicy>, &oncopy_setterinfo }, |
7220 | | { "oncut", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &oncut_getterinfo, GenericSetter<NormalThisPolicy>, &oncut_setterinfo }, |
7221 | | { "onpaste", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onpaste_getterinfo, GenericSetter<NormalThisPolicy>, &onpaste_setterinfo }, |
7222 | | { "onabort", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onabort_getterinfo, GenericSetter<NormalThisPolicy>, &onabort_setterinfo }, |
7223 | | { "onblur", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onblur_getterinfo, GenericSetter<NormalThisPolicy>, &onblur_setterinfo }, |
7224 | | { "onfocus", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onfocus_getterinfo, GenericSetter<NormalThisPolicy>, &onfocus_setterinfo }, |
7225 | | { "onauxclick", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onauxclick_getterinfo, GenericSetter<NormalThisPolicy>, &onauxclick_setterinfo }, |
7226 | | { "oncanplay", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &oncanplay_getterinfo, GenericSetter<NormalThisPolicy>, &oncanplay_setterinfo }, |
7227 | | { "oncanplaythrough", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &oncanplaythrough_getterinfo, GenericSetter<NormalThisPolicy>, &oncanplaythrough_setterinfo }, |
7228 | | { "onchange", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onchange_getterinfo, GenericSetter<NormalThisPolicy>, &onchange_setterinfo }, |
7229 | | { "onclick", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onclick_getterinfo, GenericSetter<NormalThisPolicy>, &onclick_setterinfo }, |
7230 | | { "onclose", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onclose_getterinfo, GenericSetter<NormalThisPolicy>, &onclose_setterinfo }, |
7231 | | { "oncontextmenu", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &oncontextmenu_getterinfo, GenericSetter<NormalThisPolicy>, &oncontextmenu_setterinfo }, |
7232 | | { "ondblclick", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ondblclick_getterinfo, GenericSetter<NormalThisPolicy>, &ondblclick_setterinfo }, |
7233 | | { "ondrag", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ondrag_getterinfo, GenericSetter<NormalThisPolicy>, &ondrag_setterinfo }, |
7234 | | { "ondragend", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ondragend_getterinfo, GenericSetter<NormalThisPolicy>, &ondragend_setterinfo }, |
7235 | | { "ondragenter", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ondragenter_getterinfo, GenericSetter<NormalThisPolicy>, &ondragenter_setterinfo }, |
7236 | | { "ondragexit", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ondragexit_getterinfo, GenericSetter<NormalThisPolicy>, &ondragexit_setterinfo }, |
7237 | | { "ondragleave", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ondragleave_getterinfo, GenericSetter<NormalThisPolicy>, &ondragleave_setterinfo }, |
7238 | | { "ondragover", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ondragover_getterinfo, GenericSetter<NormalThisPolicy>, &ondragover_setterinfo }, |
7239 | | { "ondragstart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ondragstart_getterinfo, GenericSetter<NormalThisPolicy>, &ondragstart_setterinfo }, |
7240 | | { "ondrop", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ondrop_getterinfo, GenericSetter<NormalThisPolicy>, &ondrop_setterinfo }, |
7241 | | { "ondurationchange", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ondurationchange_getterinfo, GenericSetter<NormalThisPolicy>, &ondurationchange_setterinfo }, |
7242 | | { "onemptied", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onemptied_getterinfo, GenericSetter<NormalThisPolicy>, &onemptied_setterinfo }, |
7243 | | { "onended", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onended_getterinfo, GenericSetter<NormalThisPolicy>, &onended_setterinfo }, |
7244 | | { "oninput", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &oninput_getterinfo, GenericSetter<NormalThisPolicy>, &oninput_setterinfo }, |
7245 | | { "oninvalid", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &oninvalid_getterinfo, GenericSetter<NormalThisPolicy>, &oninvalid_setterinfo }, |
7246 | | { "onkeydown", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onkeydown_getterinfo, GenericSetter<NormalThisPolicy>, &onkeydown_setterinfo }, |
7247 | | { "onkeypress", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onkeypress_getterinfo, GenericSetter<NormalThisPolicy>, &onkeypress_setterinfo }, |
7248 | | { "onkeyup", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onkeyup_getterinfo, GenericSetter<NormalThisPolicy>, &onkeyup_setterinfo }, |
7249 | | { "onload", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onload_getterinfo, GenericSetter<NormalThisPolicy>, &onload_setterinfo }, |
7250 | | { "onloadeddata", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onloadeddata_getterinfo, GenericSetter<NormalThisPolicy>, &onloadeddata_setterinfo }, |
7251 | | { "onloadedmetadata", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onloadedmetadata_getterinfo, GenericSetter<NormalThisPolicy>, &onloadedmetadata_setterinfo }, |
7252 | | { "onloadend", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onloadend_getterinfo, GenericSetter<NormalThisPolicy>, &onloadend_setterinfo }, |
7253 | | { "onloadstart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onloadstart_getterinfo, GenericSetter<NormalThisPolicy>, &onloadstart_setterinfo }, |
7254 | | { "onmousedown", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onmousedown_getterinfo, GenericSetter<NormalThisPolicy>, &onmousedown_setterinfo }, |
7255 | | { "onmouseenter", JSPROP_ENUMERATE, GenericGetter<LenientThisPolicy, ThrowExceptions>, &onmouseenter_getterinfo, GenericSetter<LenientThisPolicy>, &onmouseenter_setterinfo }, |
7256 | | { "onmouseleave", JSPROP_ENUMERATE, GenericGetter<LenientThisPolicy, ThrowExceptions>, &onmouseleave_getterinfo, GenericSetter<LenientThisPolicy>, &onmouseleave_setterinfo }, |
7257 | | { "onmousemove", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onmousemove_getterinfo, GenericSetter<NormalThisPolicy>, &onmousemove_setterinfo }, |
7258 | | { "onmouseout", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onmouseout_getterinfo, GenericSetter<NormalThisPolicy>, &onmouseout_setterinfo }, |
7259 | | { "onmouseover", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onmouseover_getterinfo, GenericSetter<NormalThisPolicy>, &onmouseover_setterinfo }, |
7260 | | { "onmouseup", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onmouseup_getterinfo, GenericSetter<NormalThisPolicy>, &onmouseup_setterinfo }, |
7261 | | { "onwheel", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onwheel_getterinfo, GenericSetter<NormalThisPolicy>, &onwheel_setterinfo }, |
7262 | | { "onpause", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onpause_getterinfo, GenericSetter<NormalThisPolicy>, &onpause_setterinfo }, |
7263 | | { "onplay", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onplay_getterinfo, GenericSetter<NormalThisPolicy>, &onplay_setterinfo }, |
7264 | | { "onplaying", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onplaying_getterinfo, GenericSetter<NormalThisPolicy>, &onplaying_setterinfo }, |
7265 | | { "onprogress", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onprogress_getterinfo, GenericSetter<NormalThisPolicy>, &onprogress_setterinfo }, |
7266 | | { "onratechange", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onratechange_getterinfo, GenericSetter<NormalThisPolicy>, &onratechange_setterinfo }, |
7267 | | { "onreset", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onreset_getterinfo, GenericSetter<NormalThisPolicy>, &onreset_setterinfo }, |
7268 | | { "onresize", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onresize_getterinfo, GenericSetter<NormalThisPolicy>, &onresize_setterinfo }, |
7269 | | { "onscroll", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onscroll_getterinfo, GenericSetter<NormalThisPolicy>, &onscroll_setterinfo }, |
7270 | | { "onseeked", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onseeked_getterinfo, GenericSetter<NormalThisPolicy>, &onseeked_setterinfo }, |
7271 | | { "onseeking", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onseeking_getterinfo, GenericSetter<NormalThisPolicy>, &onseeking_setterinfo }, |
7272 | | { "onselect", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onselect_getterinfo, GenericSetter<NormalThisPolicy>, &onselect_setterinfo }, |
7273 | | { "onshow", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onshow_getterinfo, GenericSetter<NormalThisPolicy>, &onshow_setterinfo }, |
7274 | | { "onstalled", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onstalled_getterinfo, GenericSetter<NormalThisPolicy>, &onstalled_setterinfo }, |
7275 | | { "onsubmit", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onsubmit_getterinfo, GenericSetter<NormalThisPolicy>, &onsubmit_setterinfo }, |
7276 | | { "onsuspend", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onsuspend_getterinfo, GenericSetter<NormalThisPolicy>, &onsuspend_setterinfo }, |
7277 | | { "ontimeupdate", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ontimeupdate_getterinfo, GenericSetter<NormalThisPolicy>, &ontimeupdate_setterinfo }, |
7278 | | { "onvolumechange", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onvolumechange_getterinfo, GenericSetter<NormalThisPolicy>, &onvolumechange_setterinfo }, |
7279 | | { "onwaiting", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onwaiting_getterinfo, GenericSetter<NormalThisPolicy>, &onwaiting_setterinfo }, |
7280 | | { nullptr, 0, nullptr, nullptr, nullptr, nullptr }, |
7281 | | { "onselectstart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onselectstart_getterinfo, GenericSetter<NormalThisPolicy>, &onselectstart_setterinfo }, |
7282 | | { nullptr, 0, nullptr, nullptr, nullptr, nullptr }, |
7283 | | { "ontoggle", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ontoggle_getterinfo, GenericSetter<NormalThisPolicy>, &ontoggle_setterinfo }, |
7284 | | { nullptr, 0, nullptr, nullptr, nullptr, nullptr }, |
7285 | | { "onpointercancel", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onpointercancel_getterinfo, GenericSetter<NormalThisPolicy>, &onpointercancel_setterinfo }, |
7286 | | { "onpointerdown", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onpointerdown_getterinfo, GenericSetter<NormalThisPolicy>, &onpointerdown_setterinfo }, |
7287 | | { "onpointerup", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onpointerup_getterinfo, GenericSetter<NormalThisPolicy>, &onpointerup_setterinfo }, |
7288 | | { "onpointermove", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onpointermove_getterinfo, GenericSetter<NormalThisPolicy>, &onpointermove_setterinfo }, |
7289 | | { "onpointerout", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onpointerout_getterinfo, GenericSetter<NormalThisPolicy>, &onpointerout_setterinfo }, |
7290 | | { "onpointerover", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onpointerover_getterinfo, GenericSetter<NormalThisPolicy>, &onpointerover_setterinfo }, |
7291 | | { "onpointerenter", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onpointerenter_getterinfo, GenericSetter<NormalThisPolicy>, &onpointerenter_setterinfo }, |
7292 | | { "onpointerleave", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onpointerleave_getterinfo, GenericSetter<NormalThisPolicy>, &onpointerleave_setterinfo }, |
7293 | | { "ongotpointercapture", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ongotpointercapture_getterinfo, GenericSetter<NormalThisPolicy>, &ongotpointercapture_setterinfo }, |
7294 | | { "onlostpointercapture", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onlostpointercapture_getterinfo, GenericSetter<NormalThisPolicy>, &onlostpointercapture_setterinfo }, |
7295 | | { nullptr, 0, nullptr, nullptr, nullptr, nullptr }, |
7296 | | { "onmozfullscreenchange", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onmozfullscreenchange_getterinfo, GenericSetter<NormalThisPolicy>, &onmozfullscreenchange_setterinfo }, |
7297 | | { "onmozfullscreenerror", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onmozfullscreenerror_getterinfo, GenericSetter<NormalThisPolicy>, &onmozfullscreenerror_setterinfo }, |
7298 | | { "onanimationcancel", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onanimationcancel_getterinfo, GenericSetter<NormalThisPolicy>, &onanimationcancel_setterinfo }, |
7299 | | { "onanimationend", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onanimationend_getterinfo, GenericSetter<NormalThisPolicy>, &onanimationend_setterinfo }, |
7300 | | { "onanimationiteration", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onanimationiteration_getterinfo, GenericSetter<NormalThisPolicy>, &onanimationiteration_setterinfo }, |
7301 | | { "onanimationstart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onanimationstart_getterinfo, GenericSetter<NormalThisPolicy>, &onanimationstart_setterinfo }, |
7302 | | { "ontransitioncancel", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ontransitioncancel_getterinfo, GenericSetter<NormalThisPolicy>, &ontransitioncancel_setterinfo }, |
7303 | | { "ontransitionend", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ontransitionend_getterinfo, GenericSetter<NormalThisPolicy>, &ontransitionend_setterinfo }, |
7304 | | { "ontransitionrun", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ontransitionrun_getterinfo, GenericSetter<NormalThisPolicy>, &ontransitionrun_setterinfo }, |
7305 | | { "ontransitionstart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ontransitionstart_getterinfo, GenericSetter<NormalThisPolicy>, &ontransitionstart_setterinfo }, |
7306 | | { "onwebkitanimationend", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onwebkitanimationend_getterinfo, GenericSetter<NormalThisPolicy>, &onwebkitanimationend_setterinfo }, |
7307 | | { "onwebkitanimationiteration", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onwebkitanimationiteration_getterinfo, GenericSetter<NormalThisPolicy>, &onwebkitanimationiteration_setterinfo }, |
7308 | | { "onwebkitanimationstart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onwebkitanimationstart_getterinfo, GenericSetter<NormalThisPolicy>, &onwebkitanimationstart_setterinfo }, |
7309 | | { "onwebkittransitionend", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onwebkittransitionend_getterinfo, GenericSetter<NormalThisPolicy>, &onwebkittransitionend_setterinfo }, |
7310 | | { "onerror", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &onerror_getterinfo, GenericSetter<NormalThisPolicy>, &onerror_setterinfo }, |
7311 | | { nullptr, 0, nullptr, nullptr, nullptr, nullptr }, |
7312 | | { "ontouchstart", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ontouchstart_getterinfo, GenericSetter<NormalThisPolicy>, &ontouchstart_setterinfo }, |
7313 | | { "ontouchend", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ontouchend_getterinfo, GenericSetter<NormalThisPolicy>, &ontouchend_setterinfo }, |
7314 | | { "ontouchmove", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ontouchmove_getterinfo, GenericSetter<NormalThisPolicy>, &ontouchmove_setterinfo }, |
7315 | | { "ontouchcancel", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ontouchcancel_getterinfo, GenericSetter<NormalThisPolicy>, &ontouchcancel_setterinfo }, |
7316 | | { nullptr, 0, nullptr, nullptr, nullptr, nullptr } |
7317 | | }; |
7318 | | #if defined(__clang__) |
7319 | | #pragma clang diagnostic pop |
7320 | | #endif |
7321 | | |
7322 | | // Can't be const because the pref-enabled boolean needs to be writable |
7323 | | static PrefableDisablers sAttributes_disablers69 = { |
7324 | | true, false, 0, nullptr |
7325 | | }; |
7326 | | |
7327 | | // Can't be const because the pref-enabled boolean needs to be writable |
7328 | | static PrefableDisablers sAttributes_disablers73 = { |
7329 | | true, false, 0, nullptr |
7330 | | }; |
7331 | | |
7332 | | // Can't be const because the pref-enabled boolean needs to be writable |
7333 | | static PrefableDisablers sAttributes_disablers100 = { |
7334 | | true, false, 0, &nsGenericHTMLElement::TouchEventsEnabled |
7335 | | }; |
7336 | | |
7337 | | static const Prefable<const JSPropertySpec> sAttributes[] = { |
7338 | | { nullptr, &sAttributes_specs[0] }, |
7339 | | { &sAttributes_disablers69, &sAttributes_specs[69] }, |
7340 | | { nullptr, &sAttributes_specs[71] }, |
7341 | | { &sAttributes_disablers73, &sAttributes_specs[73] }, |
7342 | | { nullptr, &sAttributes_specs[84] }, |
7343 | | { &sAttributes_disablers100, &sAttributes_specs[100] }, |
7344 | | { nullptr, nullptr } |
7345 | | }; |
7346 | | |
7347 | | static_assert(6 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX, |
7348 | | "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)"); |
7349 | | static_assert(68 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX, |
7350 | | "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)"); |
7351 | | |
7352 | | |
7353 | | static uint16_t sNativeProperties_sortedPropertyIndices[101]; |
7354 | | static PropertyInfo sNativeProperties_propertyInfos[101]; |
7355 | | |
7356 | | static const NativePropertiesN<2> sNativeProperties = { |
7357 | | false, 0, |
7358 | | false, 0, |
7359 | | true, 0 /* sMethods */, |
7360 | | true, 1 /* sAttributes */, |
7361 | | false, 0, |
7362 | | false, 0, |
7363 | | false, 0, |
7364 | | -1, |
7365 | | 101, |
7366 | | sNativeProperties_sortedPropertyIndices, |
7367 | | { |
7368 | | { sMethods, &sNativeProperties_propertyInfos[0] }, |
7369 | | { sAttributes, &sNativeProperties_propertyInfos[2] } |
7370 | | } |
7371 | | }; |
7372 | | static_assert(101 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount), |
7373 | | "We have a property info count that is oversized"); |
7374 | | |
7375 | | static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = { |
7376 | | { |
7377 | | "Function", |
7378 | | JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE), |
7379 | | &sBoringInterfaceObjectClassClassOps, |
7380 | | JS_NULL_CLASS_SPEC, |
7381 | | JS_NULL_CLASS_EXT, |
7382 | | &sInterfaceObjectClassObjectOps |
7383 | | }, |
7384 | | eInterface, |
7385 | | true, |
7386 | | prototypes::id::SVGElement, |
7387 | | PrototypeTraits<prototypes::id::SVGElement>::Depth, |
7388 | | sNativePropertyHooks, |
7389 | | "function SVGElement() {\n [native code]\n}", |
7390 | | Element_Binding::GetConstructorObject |
7391 | | }; |
7392 | | |
7393 | | static const DOMIfaceAndProtoJSClass sPrototypeClass = { |
7394 | | { |
7395 | | "SVGElementPrototype", |
7396 | | JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE), |
7397 | | JS_NULL_CLASS_OPS, |
7398 | | JS_NULL_CLASS_SPEC, |
7399 | | JS_NULL_CLASS_EXT, |
7400 | | JS_NULL_OBJECT_OPS |
7401 | | }, |
7402 | | eInterfacePrototype, |
7403 | | false, |
7404 | | prototypes::id::SVGElement, |
7405 | | PrototypeTraits<prototypes::id::SVGElement>::Depth, |
7406 | | sNativePropertyHooks, |
7407 | | "[object SVGElementPrototype]", |
7408 | | Element_Binding::GetProtoObject |
7409 | | }; |
7410 | | |
7411 | | static const js::ClassOps sClassOps = { |
7412 | | _addProperty, /* addProperty */ |
7413 | | nullptr, /* delProperty */ |
7414 | | nullptr, /* enumerate */ |
7415 | | nullptr, /* newEnumerate */ |
7416 | | nullptr, /* resolve */ |
7417 | | nullptr, /* mayResolve */ |
7418 | | _finalize, /* finalize */ |
7419 | | nullptr, /* call */ |
7420 | | nullptr, /* hasInstance */ |
7421 | | nullptr, /* construct */ |
7422 | | nullptr, /* trace */ |
7423 | | }; |
7424 | | |
7425 | | static const js::ClassExtension sClassExtension = { |
7426 | | nullptr, /* weakmapKeyDelegateOp */ |
7427 | | _objectMoved /* objectMovedOp */ |
7428 | | }; |
7429 | | |
7430 | | static const DOMJSClass sClass = { |
7431 | | { "SVGElement", |
7432 | | JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1), |
7433 | | &sClassOps, |
7434 | | JS_NULL_CLASS_SPEC, |
7435 | | &sClassExtension, |
7436 | | JS_NULL_OBJECT_OPS |
7437 | | }, |
7438 | | { prototypes::id::EventTarget, prototypes::id::Node, prototypes::id::Element, prototypes::id::SVGElement, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count }, |
7439 | | IsBaseOf<nsISupports, nsSVGElement >::value, |
7440 | | sNativePropertyHooks, |
7441 | | FindAssociatedGlobalForNative<nsSVGElement>::Get, |
7442 | | GetProtoObjectHandle, |
7443 | | GetCCParticipant<nsSVGElement>::Get() |
7444 | | }; |
7445 | | static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS, |
7446 | | "Must have the right minimal number of reserved slots."); |
7447 | | static_assert(1 >= 1, |
7448 | | "Must have enough reserved slots."); |
7449 | | |
7450 | | const JSClass* |
7451 | | GetJSClass() |
7452 | 0 | { |
7453 | 0 | return sClass.ToJSClass(); |
7454 | 0 | } |
7455 | | |
7456 | | bool |
7457 | | Wrap(JSContext* aCx, nsSVGElement* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector) |
7458 | 0 | { |
7459 | 0 | static_assert(!IsBaseOf<NonRefcountedDOMObject, nsSVGElement>::value, |
7460 | 0 | "Shouldn't have wrappercached things that are not refcounted."); |
7461 | 0 | MOZ_ASSERT(static_cast<nsSVGElement*>(aObject) == |
7462 | 0 | reinterpret_cast<nsSVGElement*>(aObject), |
7463 | 0 | "Multiple inheritance for nsSVGElement is broken."); |
7464 | 0 | MOZ_ASSERT(static_cast<mozilla::dom::Element*>(aObject) == |
7465 | 0 | reinterpret_cast<mozilla::dom::Element*>(aObject), |
7466 | 0 | "Multiple inheritance for mozilla::dom::Element is broken."); |
7467 | 0 | MOZ_ASSERT(static_cast<nsINode*>(aObject) == |
7468 | 0 | reinterpret_cast<nsINode*>(aObject), |
7469 | 0 | "Multiple inheritance for nsINode is broken."); |
7470 | 0 | MOZ_ASSERT(static_cast<mozilla::dom::EventTarget*>(aObject) == |
7471 | 0 | reinterpret_cast<mozilla::dom::EventTarget*>(aObject), |
7472 | 0 | "Multiple inheritance for mozilla::dom::EventTarget is broken."); |
7473 | 0 | MOZ_ASSERT(ToSupportsIsCorrect(aObject)); |
7474 | 0 | MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx)); |
7475 | 0 | MOZ_ASSERT(!aCache->GetWrapper(), |
7476 | 0 | "You should probably not be using Wrap() directly; use " |
7477 | 0 | "GetOrCreateDOMReflector instead"); |
7478 | 0 |
|
7479 | 0 | MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache), |
7480 | 0 | "nsISupports must be on our primary inheritance chain"); |
7481 | 0 |
|
7482 | 0 | JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject())); |
7483 | 0 | if (!global) { |
7484 | 0 | return false; |
7485 | 0 | } |
7486 | 0 | MOZ_ASSERT(JS_IsGlobalObject(global)); |
7487 | 0 | MOZ_ASSERT(JS::ObjectIsNotGray(global)); |
7488 | 0 |
|
7489 | 0 | // That might have ended up wrapping us already, due to the wonders |
7490 | 0 | // of XBL. Check for that, and bail out as needed. |
7491 | 0 | aReflector.set(aCache->GetWrapper()); |
7492 | 0 | if (aReflector) { |
7493 | | #ifdef DEBUG |
7494 | | AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto); |
7495 | | #endif // DEBUG |
7496 | | return true; |
7497 | 0 | } |
7498 | 0 |
|
7499 | 0 | JSAutoRealm ar(aCx, global); |
7500 | 0 | JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx); |
7501 | 0 | if (!canonicalProto) { |
7502 | 0 | return false; |
7503 | 0 | } |
7504 | 0 | JS::Rooted<JSObject*> proto(aCx); |
7505 | 0 | if (aGivenProto) { |
7506 | 0 | proto = aGivenProto; |
7507 | 0 | // Unfortunately, while aGivenProto was in the compartment of aCx |
7508 | 0 | // coming in, we changed compartments to that of "parent" so may need |
7509 | 0 | // to wrap the proto here. |
7510 | 0 | if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) { |
7511 | 0 | if (!JS_WrapObject(aCx, &proto)) { |
7512 | 0 | return false; |
7513 | 0 | } |
7514 | 0 | } |
7515 | 0 | } else { |
7516 | 0 | proto = canonicalProto; |
7517 | 0 | } |
7518 | 0 |
|
7519 | 0 | BindingJSObjectCreator<nsSVGElement> creator(aCx); |
7520 | 0 | creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector); |
7521 | 0 | if (!aReflector) { |
7522 | 0 | return false; |
7523 | 0 | } |
7524 | 0 | |
7525 | 0 | aCache->SetWrapper(aReflector); |
7526 | 0 | creator.InitializationSucceeded(); |
7527 | 0 |
|
7528 | 0 | MOZ_ASSERT(aCache->GetWrapperPreserveColor() && |
7529 | 0 | aCache->GetWrapperPreserveColor() == aReflector); |
7530 | 0 | // If proto != canonicalProto, we have to preserve our wrapper; |
7531 | 0 | // otherwise we won't be able to properly recreate it later, since |
7532 | 0 | // we won't know what proto to use. Note that we don't check |
7533 | 0 | // aGivenProto here, since it's entirely possible (and even |
7534 | 0 | // somewhat common) to have a non-null aGivenProto which is the |
7535 | 0 | // same as canonicalProto. |
7536 | 0 | if (proto != canonicalProto) { |
7537 | 0 | PreserveWrapper(aObject); |
7538 | 0 | } |
7539 | 0 |
|
7540 | 0 | return true; |
7541 | 0 | } |
7542 | | |
7543 | | const NativePropertyHooks sNativePropertyHooks[] = { { |
7544 | | nullptr, |
7545 | | nullptr, |
7546 | | nullptr, |
7547 | | { sNativeProperties.Upcast(), nullptr }, |
7548 | | prototypes::id::SVGElement, |
7549 | | constructors::id::SVGElement, |
7550 | | Element_Binding::sNativePropertyHooks, |
7551 | | &DefaultXrayExpandoObjectClass |
7552 | | } }; |
7553 | | |
7554 | | void |
7555 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal) |
7556 | 0 | { |
7557 | 0 | JS::Handle<JSObject*> parentProto(Element_Binding::GetProtoObjectHandle(aCx)); |
7558 | 0 | if (!parentProto) { |
7559 | 0 | return; |
7560 | 0 | } |
7561 | 0 | |
7562 | 0 | JS::Handle<JSObject*> constructorProto(Element_Binding::GetConstructorObjectHandle(aCx)); |
7563 | 0 | if (!constructorProto) { |
7564 | 0 | return; |
7565 | 0 | } |
7566 | 0 | |
7567 | 0 | static bool sIdsInited = false; |
7568 | 0 | if (!sIdsInited && NS_IsMainThread()) { |
7569 | 0 | if (!InitIds(aCx, sNativeProperties.Upcast())) { |
7570 | 0 | return; |
7571 | 0 | } |
7572 | 0 | sIdsInited = true; |
7573 | 0 | } |
7574 | 0 |
|
7575 | 0 | static bool sPrefCachesInited = false; |
7576 | 0 | if (!sPrefCachesInited && NS_IsMainThread()) { |
7577 | 0 | sPrefCachesInited = true; |
7578 | 0 | Preferences::AddBoolVarCache(&sAttributes[1].disablers->enabled, "dom.select_events.enabled"); |
7579 | 0 | Preferences::AddBoolVarCache(&sAttributes[3].disablers->enabled, "dom.w3c_pointer_events.enabled"); |
7580 | 0 | } |
7581 | 0 |
|
7582 | 0 | JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGElement); |
7583 | 0 | JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGElement); |
7584 | 0 | dom::CreateInterfaceObjects(aCx, aGlobal, parentProto, |
7585 | 0 | &sPrototypeClass.mBase, protoCache, |
7586 | 0 | nullptr, |
7587 | 0 | constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr, |
7588 | 0 | interfaceCache, |
7589 | 0 | sNativeProperties.Upcast(), |
7590 | 0 | nullptr, |
7591 | 0 | "SVGElement", aDefineOnGlobal, |
7592 | 0 | nullptr, |
7593 | 0 | false); |
7594 | 0 | } |
7595 | | |
7596 | | JSObject* |
7597 | | GetProtoObject(JSContext* aCx) |
7598 | 0 | { |
7599 | 0 | return GetProtoObjectHandle(aCx); |
7600 | 0 | } |
7601 | | |
7602 | | JSObject* |
7603 | | GetConstructorObject(JSContext* aCx) |
7604 | 0 | { |
7605 | 0 | return GetConstructorObjectHandle(aCx); |
7606 | 0 | } |
7607 | | |
7608 | | } // namespace SVGElement_Binding |
7609 | | |
7610 | | |
7611 | | |
7612 | | } // namespace dom |
7613 | | } // namespace mozilla |