/work/obj-fuzz/dom/bindings/SVGFEConvolveMatrixElementBinding.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM SVGFEConvolveMatrixElement.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #include "DOMSVGAnimatedNumberList.h" |
4 | | #include "SVGElementBinding.h" |
5 | | #include "SVGFEConvolveMatrixElementBinding.h" |
6 | | #include "WrapperFactory.h" |
7 | | #include "mozilla/OwningNonNull.h" |
8 | | #include "mozilla/dom/BindingUtils.h" |
9 | | #include "mozilla/dom/DOMJSClass.h" |
10 | | #include "mozilla/dom/NonRefcountedDOMObject.h" |
11 | | #include "mozilla/dom/SVGAnimatedBoolean.h" |
12 | | #include "mozilla/dom/SVGAnimatedEnumeration.h" |
13 | | #include "mozilla/dom/SVGAnimatedInteger.h" |
14 | | #include "mozilla/dom/SVGAnimatedLength.h" |
15 | | #include "mozilla/dom/SVGAnimatedNumber.h" |
16 | | #include "mozilla/dom/SVGAnimatedString.h" |
17 | | #include "mozilla/dom/SVGFEConvolveMatrixElement.h" |
18 | | #include "mozilla/dom/XrayExpandoClass.h" |
19 | | |
20 | | namespace mozilla { |
21 | | namespace dom { |
22 | | |
23 | | namespace binding_detail {}; // Just to make sure it's known as a namespace |
24 | | using namespace mozilla::dom::binding_detail; |
25 | | |
26 | | |
27 | | namespace SVGFEConvolveMatrixElement_Binding { |
28 | | |
29 | | static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGElement_Binding::NativeType>::value, |
30 | | "Can't inherit from an interface with a different ownership model."); |
31 | | |
32 | | MOZ_CAN_RUN_SCRIPT static bool |
33 | | get_in1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
34 | 0 | { |
35 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.in1", DOM, cx); |
36 | 0 |
|
37 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedString>(self->In1())); |
38 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
39 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
40 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
41 | 0 | return false; |
42 | 0 | } |
43 | 0 | return true; |
44 | 0 | } |
45 | | |
46 | | static const JSJitInfo in1_getterinfo = { |
47 | | { (JSJitGetterOp)get_in1 }, |
48 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
49 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
50 | | JSJitInfo::Getter, |
51 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
52 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
53 | | false, /* isInfallible. False in setters. */ |
54 | | true, /* isMovable. Not relevant for setters. */ |
55 | | true, /* isEliminatable. Not relevant for setters. */ |
56 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
57 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
58 | | false, /* isTypedMethod. Only relevant for methods. */ |
59 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
60 | | }; |
61 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
62 | | static_assert(0 < 1, "There is no slot for us"); |
63 | | |
64 | | MOZ_CAN_RUN_SCRIPT static bool |
65 | | get_orderX(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
66 | 0 | { |
67 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.orderX", DOM, cx); |
68 | 0 |
|
69 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedInteger>(self->OrderX())); |
70 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
71 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
72 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
73 | 0 | return false; |
74 | 0 | } |
75 | 0 | return true; |
76 | 0 | } |
77 | | |
78 | | static const JSJitInfo orderX_getterinfo = { |
79 | | { (JSJitGetterOp)get_orderX }, |
80 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
81 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
82 | | JSJitInfo::Getter, |
83 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
84 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
85 | | false, /* isInfallible. False in setters. */ |
86 | | true, /* isMovable. Not relevant for setters. */ |
87 | | true, /* isEliminatable. Not relevant for setters. */ |
88 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
89 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
90 | | false, /* isTypedMethod. Only relevant for methods. */ |
91 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
92 | | }; |
93 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
94 | | static_assert(0 < 1, "There is no slot for us"); |
95 | | |
96 | | MOZ_CAN_RUN_SCRIPT static bool |
97 | | get_orderY(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
98 | 0 | { |
99 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.orderY", DOM, cx); |
100 | 0 |
|
101 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedInteger>(self->OrderY())); |
102 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
103 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
104 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
105 | 0 | return false; |
106 | 0 | } |
107 | 0 | return true; |
108 | 0 | } |
109 | | |
110 | | static const JSJitInfo orderY_getterinfo = { |
111 | | { (JSJitGetterOp)get_orderY }, |
112 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
113 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
114 | | JSJitInfo::Getter, |
115 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
116 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
117 | | false, /* isInfallible. False in setters. */ |
118 | | true, /* isMovable. Not relevant for setters. */ |
119 | | true, /* isEliminatable. Not relevant for setters. */ |
120 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
121 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
122 | | false, /* isTypedMethod. Only relevant for methods. */ |
123 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
124 | | }; |
125 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
126 | | static_assert(0 < 1, "There is no slot for us"); |
127 | | |
128 | | MOZ_CAN_RUN_SCRIPT static bool |
129 | | get_kernelMatrix(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
130 | 0 | { |
131 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.kernelMatrix", DOM, cx); |
132 | 0 |
|
133 | 0 | auto result(StrongOrRawPtr<mozilla::DOMSVGAnimatedNumberList>(self->KernelMatrix())); |
134 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
135 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
136 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
137 | 0 | return false; |
138 | 0 | } |
139 | 0 | return true; |
140 | 0 | } |
141 | | |
142 | | static const JSJitInfo kernelMatrix_getterinfo = { |
143 | | { (JSJitGetterOp)get_kernelMatrix }, |
144 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
145 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
146 | | JSJitInfo::Getter, |
147 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
148 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
149 | | false, /* isInfallible. False in setters. */ |
150 | | true, /* isMovable. Not relevant for setters. */ |
151 | | true, /* isEliminatable. Not relevant for setters. */ |
152 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
153 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
154 | | false, /* isTypedMethod. Only relevant for methods. */ |
155 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
156 | | }; |
157 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
158 | | static_assert(0 < 1, "There is no slot for us"); |
159 | | |
160 | | MOZ_CAN_RUN_SCRIPT static bool |
161 | | get_divisor(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
162 | 0 | { |
163 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.divisor", DOM, cx); |
164 | 0 |
|
165 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedNumber>(self->Divisor())); |
166 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
167 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
168 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
169 | 0 | return false; |
170 | 0 | } |
171 | 0 | return true; |
172 | 0 | } |
173 | | |
174 | | static const JSJitInfo divisor_getterinfo = { |
175 | | { (JSJitGetterOp)get_divisor }, |
176 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
177 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
178 | | JSJitInfo::Getter, |
179 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
180 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
181 | | false, /* isInfallible. False in setters. */ |
182 | | true, /* isMovable. Not relevant for setters. */ |
183 | | true, /* isEliminatable. Not relevant for setters. */ |
184 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
185 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
186 | | false, /* isTypedMethod. Only relevant for methods. */ |
187 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
188 | | }; |
189 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
190 | | static_assert(0 < 1, "There is no slot for us"); |
191 | | |
192 | | MOZ_CAN_RUN_SCRIPT static bool |
193 | | get_bias(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
194 | 0 | { |
195 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.bias", DOM, cx); |
196 | 0 |
|
197 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedNumber>(self->Bias())); |
198 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
199 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
200 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
201 | 0 | return false; |
202 | 0 | } |
203 | 0 | return true; |
204 | 0 | } |
205 | | |
206 | | static const JSJitInfo bias_getterinfo = { |
207 | | { (JSJitGetterOp)get_bias }, |
208 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
209 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
210 | | JSJitInfo::Getter, |
211 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
212 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
213 | | false, /* isInfallible. False in setters. */ |
214 | | true, /* isMovable. Not relevant for setters. */ |
215 | | true, /* isEliminatable. Not relevant for setters. */ |
216 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
217 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
218 | | false, /* isTypedMethod. Only relevant for methods. */ |
219 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
220 | | }; |
221 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
222 | | static_assert(0 < 1, "There is no slot for us"); |
223 | | |
224 | | MOZ_CAN_RUN_SCRIPT static bool |
225 | | get_targetX(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
226 | 0 | { |
227 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.targetX", DOM, cx); |
228 | 0 |
|
229 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedInteger>(self->TargetX())); |
230 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
231 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
232 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
233 | 0 | return false; |
234 | 0 | } |
235 | 0 | return true; |
236 | 0 | } |
237 | | |
238 | | static const JSJitInfo targetX_getterinfo = { |
239 | | { (JSJitGetterOp)get_targetX }, |
240 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
241 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
242 | | JSJitInfo::Getter, |
243 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
244 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
245 | | false, /* isInfallible. False in setters. */ |
246 | | true, /* isMovable. Not relevant for setters. */ |
247 | | true, /* isEliminatable. Not relevant for setters. */ |
248 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
249 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
250 | | false, /* isTypedMethod. Only relevant for methods. */ |
251 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
252 | | }; |
253 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
254 | | static_assert(0 < 1, "There is no slot for us"); |
255 | | |
256 | | MOZ_CAN_RUN_SCRIPT static bool |
257 | | get_targetY(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
258 | 0 | { |
259 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.targetY", DOM, cx); |
260 | 0 |
|
261 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedInteger>(self->TargetY())); |
262 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
263 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
264 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
265 | 0 | return false; |
266 | 0 | } |
267 | 0 | return true; |
268 | 0 | } |
269 | | |
270 | | static const JSJitInfo targetY_getterinfo = { |
271 | | { (JSJitGetterOp)get_targetY }, |
272 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
273 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
274 | | JSJitInfo::Getter, |
275 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
276 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
277 | | false, /* isInfallible. False in setters. */ |
278 | | true, /* isMovable. Not relevant for setters. */ |
279 | | true, /* isEliminatable. Not relevant for setters. */ |
280 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
281 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
282 | | false, /* isTypedMethod. Only relevant for methods. */ |
283 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
284 | | }; |
285 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
286 | | static_assert(0 < 1, "There is no slot for us"); |
287 | | |
288 | | MOZ_CAN_RUN_SCRIPT static bool |
289 | | get_edgeMode(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
290 | 0 | { |
291 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.edgeMode", DOM, cx); |
292 | 0 |
|
293 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedEnumeration>(self->EdgeMode())); |
294 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
295 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
296 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
297 | 0 | return false; |
298 | 0 | } |
299 | 0 | return true; |
300 | 0 | } |
301 | | |
302 | | static const JSJitInfo edgeMode_getterinfo = { |
303 | | { (JSJitGetterOp)get_edgeMode }, |
304 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
305 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
306 | | JSJitInfo::Getter, |
307 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
308 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
309 | | false, /* isInfallible. False in setters. */ |
310 | | true, /* isMovable. Not relevant for setters. */ |
311 | | true, /* isEliminatable. Not relevant for setters. */ |
312 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
313 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
314 | | false, /* isTypedMethod. Only relevant for methods. */ |
315 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
316 | | }; |
317 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
318 | | static_assert(0 < 1, "There is no slot for us"); |
319 | | |
320 | | MOZ_CAN_RUN_SCRIPT static bool |
321 | | get_kernelUnitLengthX(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
322 | 0 | { |
323 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.kernelUnitLengthX", DOM, cx); |
324 | 0 |
|
325 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedNumber>(self->KernelUnitLengthX())); |
326 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
327 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
328 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
329 | 0 | return false; |
330 | 0 | } |
331 | 0 | return true; |
332 | 0 | } |
333 | | |
334 | | static const JSJitInfo kernelUnitLengthX_getterinfo = { |
335 | | { (JSJitGetterOp)get_kernelUnitLengthX }, |
336 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
337 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
338 | | JSJitInfo::Getter, |
339 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
340 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
341 | | false, /* isInfallible. False in setters. */ |
342 | | true, /* isMovable. Not relevant for setters. */ |
343 | | true, /* isEliminatable. Not relevant for setters. */ |
344 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
345 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
346 | | false, /* isTypedMethod. Only relevant for methods. */ |
347 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
348 | | }; |
349 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
350 | | static_assert(0 < 1, "There is no slot for us"); |
351 | | |
352 | | MOZ_CAN_RUN_SCRIPT static bool |
353 | | get_kernelUnitLengthY(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
354 | 0 | { |
355 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.kernelUnitLengthY", DOM, cx); |
356 | 0 |
|
357 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedNumber>(self->KernelUnitLengthY())); |
358 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
359 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
360 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
361 | 0 | return false; |
362 | 0 | } |
363 | 0 | return true; |
364 | 0 | } |
365 | | |
366 | | static const JSJitInfo kernelUnitLengthY_getterinfo = { |
367 | | { (JSJitGetterOp)get_kernelUnitLengthY }, |
368 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
369 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
370 | | JSJitInfo::Getter, |
371 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
372 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
373 | | false, /* isInfallible. False in setters. */ |
374 | | true, /* isMovable. Not relevant for setters. */ |
375 | | true, /* isEliminatable. Not relevant for setters. */ |
376 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
377 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
378 | | false, /* isTypedMethod. Only relevant for methods. */ |
379 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
380 | | }; |
381 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
382 | | static_assert(0 < 1, "There is no slot for us"); |
383 | | |
384 | | MOZ_CAN_RUN_SCRIPT static bool |
385 | | get_preserveAlpha(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
386 | 0 | { |
387 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.preserveAlpha", DOM, cx); |
388 | 0 |
|
389 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedBoolean>(self->PreserveAlpha())); |
390 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
391 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
392 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
393 | 0 | return false; |
394 | 0 | } |
395 | 0 | return true; |
396 | 0 | } |
397 | | |
398 | | static const JSJitInfo preserveAlpha_getterinfo = { |
399 | | { (JSJitGetterOp)get_preserveAlpha }, |
400 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
401 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
402 | | JSJitInfo::Getter, |
403 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
404 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
405 | | false, /* isInfallible. False in setters. */ |
406 | | true, /* isMovable. Not relevant for setters. */ |
407 | | true, /* isEliminatable. Not relevant for setters. */ |
408 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
409 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
410 | | false, /* isTypedMethod. Only relevant for methods. */ |
411 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
412 | | }; |
413 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
414 | | static_assert(0 < 1, "There is no slot for us"); |
415 | | |
416 | | MOZ_CAN_RUN_SCRIPT static bool |
417 | | get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
418 | 0 | { |
419 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.x", DOM, cx); |
420 | 0 |
|
421 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedLength>(self->X())); |
422 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
423 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
424 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
425 | 0 | return false; |
426 | 0 | } |
427 | 0 | return true; |
428 | 0 | } |
429 | | |
430 | | static const JSJitInfo x_getterinfo = { |
431 | | { (JSJitGetterOp)get_x }, |
432 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
433 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
434 | | JSJitInfo::Getter, |
435 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
436 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
437 | | false, /* isInfallible. False in setters. */ |
438 | | true, /* isMovable. Not relevant for setters. */ |
439 | | true, /* isEliminatable. Not relevant for setters. */ |
440 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
441 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
442 | | false, /* isTypedMethod. Only relevant for methods. */ |
443 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
444 | | }; |
445 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
446 | | static_assert(0 < 1, "There is no slot for us"); |
447 | | |
448 | | MOZ_CAN_RUN_SCRIPT static bool |
449 | | get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
450 | 0 | { |
451 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.y", DOM, cx); |
452 | 0 |
|
453 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedLength>(self->Y())); |
454 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
455 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
456 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
457 | 0 | return false; |
458 | 0 | } |
459 | 0 | return true; |
460 | 0 | } |
461 | | |
462 | | static const JSJitInfo y_getterinfo = { |
463 | | { (JSJitGetterOp)get_y }, |
464 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
465 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
466 | | JSJitInfo::Getter, |
467 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
468 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
469 | | false, /* isInfallible. False in setters. */ |
470 | | true, /* isMovable. Not relevant for setters. */ |
471 | | true, /* isEliminatable. Not relevant for setters. */ |
472 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
473 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
474 | | false, /* isTypedMethod. Only relevant for methods. */ |
475 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
476 | | }; |
477 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
478 | | static_assert(0 < 1, "There is no slot for us"); |
479 | | |
480 | | MOZ_CAN_RUN_SCRIPT static bool |
481 | | get_width(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
482 | 0 | { |
483 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.width", DOM, cx); |
484 | 0 |
|
485 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedLength>(self->Width())); |
486 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
487 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
488 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
489 | 0 | return false; |
490 | 0 | } |
491 | 0 | return true; |
492 | 0 | } |
493 | | |
494 | | static const JSJitInfo width_getterinfo = { |
495 | | { (JSJitGetterOp)get_width }, |
496 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
497 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
498 | | JSJitInfo::Getter, |
499 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
500 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
501 | | false, /* isInfallible. False in setters. */ |
502 | | true, /* isMovable. Not relevant for setters. */ |
503 | | true, /* isEliminatable. Not relevant for setters. */ |
504 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
505 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
506 | | false, /* isTypedMethod. Only relevant for methods. */ |
507 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
508 | | }; |
509 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
510 | | static_assert(0 < 1, "There is no slot for us"); |
511 | | |
512 | | MOZ_CAN_RUN_SCRIPT static bool |
513 | | get_height(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
514 | 0 | { |
515 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.height", DOM, cx); |
516 | 0 |
|
517 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedLength>(self->Height())); |
518 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
519 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
520 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
521 | 0 | return false; |
522 | 0 | } |
523 | 0 | return true; |
524 | 0 | } |
525 | | |
526 | | static const JSJitInfo height_getterinfo = { |
527 | | { (JSJitGetterOp)get_height }, |
528 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
529 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
530 | | JSJitInfo::Getter, |
531 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
532 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
533 | | false, /* isInfallible. False in setters. */ |
534 | | true, /* isMovable. Not relevant for setters. */ |
535 | | true, /* isEliminatable. Not relevant for setters. */ |
536 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
537 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
538 | | false, /* isTypedMethod. Only relevant for methods. */ |
539 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
540 | | }; |
541 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
542 | | static_assert(0 < 1, "There is no slot for us"); |
543 | | |
544 | | MOZ_CAN_RUN_SCRIPT static bool |
545 | | get_result(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args) |
546 | 0 | { |
547 | 0 | AUTO_PROFILER_LABEL_FAST("get SVGFEConvolveMatrixElement.result", DOM, cx); |
548 | 0 |
|
549 | 0 | auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedString>(self->Result())); |
550 | 0 | MOZ_ASSERT(!JS_IsExceptionPending(cx)); |
551 | 0 | if (!GetOrCreateDOMReflector(cx, result, args.rval())) { |
552 | 0 | MOZ_ASSERT(JS_IsExceptionPending(cx)); |
553 | 0 | return false; |
554 | 0 | } |
555 | 0 | return true; |
556 | 0 | } |
557 | | |
558 | | static const JSJitInfo result_getterinfo = { |
559 | | { (JSJitGetterOp)get_result }, |
560 | | { prototypes::id::SVGFEConvolveMatrixElement }, |
561 | | { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth }, |
562 | | JSJitInfo::Getter, |
563 | | JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */ |
564 | | JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */ |
565 | | false, /* isInfallible. False in setters. */ |
566 | | true, /* isMovable. Not relevant for setters. */ |
567 | | true, /* isEliminatable. Not relevant for setters. */ |
568 | | false, /* isAlwaysInSlot. Only relevant for getters. */ |
569 | | false, /* isLazilyCachedInSlot. Only relevant for getters. */ |
570 | | false, /* isTypedMethod. Only relevant for methods. */ |
571 | | 0 /* Reserved slot index, if we're stored in a slot, else 0. */ |
572 | | }; |
573 | | static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit"); |
574 | | static_assert(0 < 1, "There is no slot for us"); |
575 | | |
576 | | static bool |
577 | | _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val) |
578 | 0 | { |
579 | 0 | mozilla::dom::SVGFEConvolveMatrixElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::SVGFEConvolveMatrixElement>(obj); |
580 | 0 | // We don't want to preserve if we don't have a wrapper, and we |
581 | 0 | // obviously can't preserve if we're not initialized. |
582 | 0 | if (self && self->GetWrapperPreserveColor()) { |
583 | 0 | PreserveWrapper(self); |
584 | 0 | } |
585 | 0 | return true; |
586 | 0 | } |
587 | | |
588 | | static void |
589 | | _finalize(js::FreeOp* fop, JSObject* obj) |
590 | 0 | { |
591 | 0 | mozilla::dom::SVGFEConvolveMatrixElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::SVGFEConvolveMatrixElement>(obj); |
592 | 0 | if (self) { |
593 | 0 | ClearWrapper(self, self, obj); |
594 | 0 | AddForDeferredFinalization<mozilla::dom::SVGFEConvolveMatrixElement>(self); |
595 | 0 | } |
596 | 0 | } |
597 | | |
598 | | static size_t |
599 | | _objectMoved(JSObject* obj, JSObject* old) |
600 | 0 | { |
601 | 0 | mozilla::dom::SVGFEConvolveMatrixElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::SVGFEConvolveMatrixElement>(obj); |
602 | 0 | if (self) { |
603 | 0 | UpdateWrapper(self, self, obj, old); |
604 | 0 | } |
605 | 0 |
|
606 | 0 | return 0; |
607 | 0 | } |
608 | | |
609 | | // We deliberately use brace-elision to make Visual Studio produce better initalization code. |
610 | | #if defined(__clang__) |
611 | | #pragma clang diagnostic push |
612 | | #pragma clang diagnostic ignored "-Wmissing-braces" |
613 | | #endif |
614 | | static const JSPropertySpec sAttributes_specs[] = { |
615 | | { "in1", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &in1_getterinfo, nullptr, nullptr }, |
616 | | { "orderX", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &orderX_getterinfo, nullptr, nullptr }, |
617 | | { "orderY", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &orderY_getterinfo, nullptr, nullptr }, |
618 | | { "kernelMatrix", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &kernelMatrix_getterinfo, nullptr, nullptr }, |
619 | | { "divisor", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &divisor_getterinfo, nullptr, nullptr }, |
620 | | { "bias", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &bias_getterinfo, nullptr, nullptr }, |
621 | | { "targetX", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &targetX_getterinfo, nullptr, nullptr }, |
622 | | { "targetY", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &targetY_getterinfo, nullptr, nullptr }, |
623 | | { "edgeMode", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &edgeMode_getterinfo, nullptr, nullptr }, |
624 | | { "kernelUnitLengthX", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &kernelUnitLengthX_getterinfo, nullptr, nullptr }, |
625 | | { "kernelUnitLengthY", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &kernelUnitLengthY_getterinfo, nullptr, nullptr }, |
626 | | { "preserveAlpha", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &preserveAlpha_getterinfo, nullptr, nullptr }, |
627 | | { "x", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &x_getterinfo, nullptr, nullptr }, |
628 | | { "y", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &y_getterinfo, nullptr, nullptr }, |
629 | | { "width", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &width_getterinfo, nullptr, nullptr }, |
630 | | { "height", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &height_getterinfo, nullptr, nullptr }, |
631 | | { "result", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &result_getterinfo, nullptr, nullptr }, |
632 | | { nullptr, 0, nullptr, nullptr, nullptr, nullptr } |
633 | | }; |
634 | | #if defined(__clang__) |
635 | | #pragma clang diagnostic pop |
636 | | #endif |
637 | | |
638 | | |
639 | | static const Prefable<const JSPropertySpec> sAttributes[] = { |
640 | | { nullptr, &sAttributes_specs[0] }, |
641 | | { nullptr, nullptr } |
642 | | }; |
643 | | |
644 | | static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX, |
645 | | "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)"); |
646 | | static_assert(17 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX, |
647 | | "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)"); |
648 | | |
649 | | // We deliberately use brace-elision to make Visual Studio produce better initalization code. |
650 | | #if defined(__clang__) |
651 | | #pragma clang diagnostic push |
652 | | #pragma clang diagnostic ignored "-Wmissing-braces" |
653 | | #endif |
654 | | static const ConstantSpec sConstants_specs[] = { |
655 | | { "SVG_EDGEMODE_UNKNOWN", JS::Int32Value(0) }, |
656 | | { "SVG_EDGEMODE_DUPLICATE", JS::Int32Value(1) }, |
657 | | { "SVG_EDGEMODE_WRAP", JS::Int32Value(2) }, |
658 | | { "SVG_EDGEMODE_NONE", JS::Int32Value(3) }, |
659 | | { 0, JS::UndefinedValue() } |
660 | | }; |
661 | | #if defined(__clang__) |
662 | | #pragma clang diagnostic pop |
663 | | #endif |
664 | | |
665 | | |
666 | | static const Prefable<const ConstantSpec> sConstants[] = { |
667 | | { nullptr, &sConstants_specs[0] }, |
668 | | { nullptr, nullptr } |
669 | | }; |
670 | | |
671 | | static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX, |
672 | | "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)"); |
673 | | static_assert(4 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX, |
674 | | "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)"); |
675 | | |
676 | | |
677 | | static uint16_t sNativeProperties_sortedPropertyIndices[21]; |
678 | | static PropertyInfo sNativeProperties_propertyInfos[21]; |
679 | | |
680 | | static const NativePropertiesN<2> sNativeProperties = { |
681 | | false, 0, |
682 | | false, 0, |
683 | | false, 0, |
684 | | true, 0 /* sAttributes */, |
685 | | false, 0, |
686 | | false, 0, |
687 | | true, 1 /* sConstants */, |
688 | | -1, |
689 | | 21, |
690 | | sNativeProperties_sortedPropertyIndices, |
691 | | { |
692 | | { sAttributes, &sNativeProperties_propertyInfos[0] }, |
693 | | { sConstants, &sNativeProperties_propertyInfos[17] } |
694 | | } |
695 | | }; |
696 | | static_assert(21 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount), |
697 | | "We have a property info count that is oversized"); |
698 | | |
699 | | static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = { |
700 | | { |
701 | | "Function", |
702 | | JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE), |
703 | | &sBoringInterfaceObjectClassClassOps, |
704 | | JS_NULL_CLASS_SPEC, |
705 | | JS_NULL_CLASS_EXT, |
706 | | &sInterfaceObjectClassObjectOps |
707 | | }, |
708 | | eInterface, |
709 | | true, |
710 | | prototypes::id::SVGFEConvolveMatrixElement, |
711 | | PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth, |
712 | | sNativePropertyHooks, |
713 | | "function SVGFEConvolveMatrixElement() {\n [native code]\n}", |
714 | | SVGElement_Binding::GetConstructorObject |
715 | | }; |
716 | | |
717 | | static const DOMIfaceAndProtoJSClass sPrototypeClass = { |
718 | | { |
719 | | "SVGFEConvolveMatrixElementPrototype", |
720 | | JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE), |
721 | | JS_NULL_CLASS_OPS, |
722 | | JS_NULL_CLASS_SPEC, |
723 | | JS_NULL_CLASS_EXT, |
724 | | JS_NULL_OBJECT_OPS |
725 | | }, |
726 | | eInterfacePrototype, |
727 | | false, |
728 | | prototypes::id::SVGFEConvolveMatrixElement, |
729 | | PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth, |
730 | | sNativePropertyHooks, |
731 | | "[object SVGFEConvolveMatrixElementPrototype]", |
732 | | SVGElement_Binding::GetProtoObject |
733 | | }; |
734 | | |
735 | | static const js::ClassOps sClassOps = { |
736 | | _addProperty, /* addProperty */ |
737 | | nullptr, /* delProperty */ |
738 | | nullptr, /* enumerate */ |
739 | | nullptr, /* newEnumerate */ |
740 | | nullptr, /* resolve */ |
741 | | nullptr, /* mayResolve */ |
742 | | _finalize, /* finalize */ |
743 | | nullptr, /* call */ |
744 | | nullptr, /* hasInstance */ |
745 | | nullptr, /* construct */ |
746 | | nullptr, /* trace */ |
747 | | }; |
748 | | |
749 | | static const js::ClassExtension sClassExtension = { |
750 | | nullptr, /* weakmapKeyDelegateOp */ |
751 | | _objectMoved /* objectMovedOp */ |
752 | | }; |
753 | | |
754 | | static const DOMJSClass sClass = { |
755 | | { "SVGFEConvolveMatrixElement", |
756 | | JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1), |
757 | | &sClassOps, |
758 | | JS_NULL_CLASS_SPEC, |
759 | | &sClassExtension, |
760 | | JS_NULL_OBJECT_OPS |
761 | | }, |
762 | | { prototypes::id::EventTarget, prototypes::id::Node, prototypes::id::Element, prototypes::id::SVGElement, prototypes::id::SVGFEConvolveMatrixElement, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count }, |
763 | | IsBaseOf<nsISupports, mozilla::dom::SVGFEConvolveMatrixElement >::value, |
764 | | sNativePropertyHooks, |
765 | | FindAssociatedGlobalForNative<mozilla::dom::SVGFEConvolveMatrixElement>::Get, |
766 | | GetProtoObjectHandle, |
767 | | GetCCParticipant<mozilla::dom::SVGFEConvolveMatrixElement>::Get() |
768 | | }; |
769 | | static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS, |
770 | | "Must have the right minimal number of reserved slots."); |
771 | | static_assert(1 >= 1, |
772 | | "Must have enough reserved slots."); |
773 | | |
774 | | const JSClass* |
775 | | GetJSClass() |
776 | 0 | { |
777 | 0 | return sClass.ToJSClass(); |
778 | 0 | } |
779 | | |
780 | | bool |
781 | | Wrap(JSContext* aCx, mozilla::dom::SVGFEConvolveMatrixElement* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector) |
782 | 0 | { |
783 | 0 | static_assert(!IsBaseOf<NonRefcountedDOMObject, mozilla::dom::SVGFEConvolveMatrixElement>::value, |
784 | 0 | "Shouldn't have wrappercached things that are not refcounted."); |
785 | 0 | MOZ_ASSERT(static_cast<mozilla::dom::SVGFEConvolveMatrixElement*>(aObject) == |
786 | 0 | reinterpret_cast<mozilla::dom::SVGFEConvolveMatrixElement*>(aObject), |
787 | 0 | "Multiple inheritance for mozilla::dom::SVGFEConvolveMatrixElement is broken."); |
788 | 0 | MOZ_ASSERT(static_cast<nsSVGElement*>(aObject) == |
789 | 0 | reinterpret_cast<nsSVGElement*>(aObject), |
790 | 0 | "Multiple inheritance for nsSVGElement is broken."); |
791 | 0 | MOZ_ASSERT(static_cast<mozilla::dom::Element*>(aObject) == |
792 | 0 | reinterpret_cast<mozilla::dom::Element*>(aObject), |
793 | 0 | "Multiple inheritance for mozilla::dom::Element is broken."); |
794 | 0 | MOZ_ASSERT(static_cast<nsINode*>(aObject) == |
795 | 0 | reinterpret_cast<nsINode*>(aObject), |
796 | 0 | "Multiple inheritance for nsINode is broken."); |
797 | 0 | MOZ_ASSERT(static_cast<mozilla::dom::EventTarget*>(aObject) == |
798 | 0 | reinterpret_cast<mozilla::dom::EventTarget*>(aObject), |
799 | 0 | "Multiple inheritance for mozilla::dom::EventTarget is broken."); |
800 | 0 | MOZ_ASSERT(ToSupportsIsCorrect(aObject)); |
801 | 0 | MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx)); |
802 | 0 | MOZ_ASSERT(!aCache->GetWrapper(), |
803 | 0 | "You should probably not be using Wrap() directly; use " |
804 | 0 | "GetOrCreateDOMReflector instead"); |
805 | 0 |
|
806 | 0 | MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache), |
807 | 0 | "nsISupports must be on our primary inheritance chain"); |
808 | 0 |
|
809 | 0 | JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject())); |
810 | 0 | if (!global) { |
811 | 0 | return false; |
812 | 0 | } |
813 | 0 | MOZ_ASSERT(JS_IsGlobalObject(global)); |
814 | 0 | MOZ_ASSERT(JS::ObjectIsNotGray(global)); |
815 | 0 |
|
816 | 0 | // That might have ended up wrapping us already, due to the wonders |
817 | 0 | // of XBL. Check for that, and bail out as needed. |
818 | 0 | aReflector.set(aCache->GetWrapper()); |
819 | 0 | if (aReflector) { |
820 | | #ifdef DEBUG |
821 | | AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto); |
822 | | #endif // DEBUG |
823 | | return true; |
824 | 0 | } |
825 | 0 |
|
826 | 0 | JSAutoRealm ar(aCx, global); |
827 | 0 | JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx); |
828 | 0 | if (!canonicalProto) { |
829 | 0 | return false; |
830 | 0 | } |
831 | 0 | JS::Rooted<JSObject*> proto(aCx); |
832 | 0 | if (aGivenProto) { |
833 | 0 | proto = aGivenProto; |
834 | 0 | // Unfortunately, while aGivenProto was in the compartment of aCx |
835 | 0 | // coming in, we changed compartments to that of "parent" so may need |
836 | 0 | // to wrap the proto here. |
837 | 0 | if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) { |
838 | 0 | if (!JS_WrapObject(aCx, &proto)) { |
839 | 0 | return false; |
840 | 0 | } |
841 | 0 | } |
842 | 0 | } else { |
843 | 0 | proto = canonicalProto; |
844 | 0 | } |
845 | 0 |
|
846 | 0 | BindingJSObjectCreator<mozilla::dom::SVGFEConvolveMatrixElement> creator(aCx); |
847 | 0 | creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector); |
848 | 0 | if (!aReflector) { |
849 | 0 | return false; |
850 | 0 | } |
851 | 0 | |
852 | 0 | aCache->SetWrapper(aReflector); |
853 | 0 | creator.InitializationSucceeded(); |
854 | 0 |
|
855 | 0 | MOZ_ASSERT(aCache->GetWrapperPreserveColor() && |
856 | 0 | aCache->GetWrapperPreserveColor() == aReflector); |
857 | 0 | // If proto != canonicalProto, we have to preserve our wrapper; |
858 | 0 | // otherwise we won't be able to properly recreate it later, since |
859 | 0 | // we won't know what proto to use. Note that we don't check |
860 | 0 | // aGivenProto here, since it's entirely possible (and even |
861 | 0 | // somewhat common) to have a non-null aGivenProto which is the |
862 | 0 | // same as canonicalProto. |
863 | 0 | if (proto != canonicalProto) { |
864 | 0 | PreserveWrapper(aObject); |
865 | 0 | } |
866 | 0 |
|
867 | 0 | return true; |
868 | 0 | } |
869 | | |
870 | | const NativePropertyHooks sNativePropertyHooks[] = { { |
871 | | nullptr, |
872 | | nullptr, |
873 | | nullptr, |
874 | | { sNativeProperties.Upcast(), nullptr }, |
875 | | prototypes::id::SVGFEConvolveMatrixElement, |
876 | | constructors::id::SVGFEConvolveMatrixElement, |
877 | | SVGElement_Binding::sNativePropertyHooks, |
878 | | &DefaultXrayExpandoObjectClass |
879 | | } }; |
880 | | |
881 | | void |
882 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal) |
883 | 0 | { |
884 | 0 | JS::Handle<JSObject*> parentProto(SVGElement_Binding::GetProtoObjectHandle(aCx)); |
885 | 0 | if (!parentProto) { |
886 | 0 | return; |
887 | 0 | } |
888 | 0 | |
889 | 0 | JS::Handle<JSObject*> constructorProto(SVGElement_Binding::GetConstructorObjectHandle(aCx)); |
890 | 0 | if (!constructorProto) { |
891 | 0 | return; |
892 | 0 | } |
893 | 0 | |
894 | 0 | static bool sIdsInited = false; |
895 | 0 | if (!sIdsInited && NS_IsMainThread()) { |
896 | 0 | if (!InitIds(aCx, sNativeProperties.Upcast())) { |
897 | 0 | return; |
898 | 0 | } |
899 | 0 | sIdsInited = true; |
900 | 0 | } |
901 | 0 |
|
902 | 0 | JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGFEConvolveMatrixElement); |
903 | 0 | JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGFEConvolveMatrixElement); |
904 | 0 | dom::CreateInterfaceObjects(aCx, aGlobal, parentProto, |
905 | 0 | &sPrototypeClass.mBase, protoCache, |
906 | 0 | nullptr, |
907 | 0 | constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr, |
908 | 0 | interfaceCache, |
909 | 0 | sNativeProperties.Upcast(), |
910 | 0 | nullptr, |
911 | 0 | "SVGFEConvolveMatrixElement", aDefineOnGlobal, |
912 | 0 | nullptr, |
913 | 0 | false); |
914 | 0 | } |
915 | | |
916 | | JSObject* |
917 | | GetConstructorObject(JSContext* aCx) |
918 | 0 | { |
919 | 0 | return GetConstructorObjectHandle(aCx); |
920 | 0 | } |
921 | | |
922 | | } // namespace SVGFEConvolveMatrixElement_Binding |
923 | | |
924 | | |
925 | | |
926 | | } // namespace dom |
927 | | } // namespace mozilla |