Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dom/bindings/SVGFEDiffuseLightingElementBinding.cpp
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM SVGFEDiffuseLightingElement.webidl BY Codegen.py - DO NOT EDIT */
2
3
#include "SVGElementBinding.h"
4
#include "SVGFEDiffuseLightingElementBinding.h"
5
#include "WrapperFactory.h"
6
#include "mozilla/OwningNonNull.h"
7
#include "mozilla/dom/BindingUtils.h"
8
#include "mozilla/dom/DOMJSClass.h"
9
#include "mozilla/dom/NonRefcountedDOMObject.h"
10
#include "mozilla/dom/SVGAnimatedLength.h"
11
#include "mozilla/dom/SVGAnimatedNumber.h"
12
#include "mozilla/dom/SVGAnimatedString.h"
13
#include "mozilla/dom/SVGFEDiffuseLightingElement.h"
14
#include "mozilla/dom/XrayExpandoClass.h"
15
16
namespace mozilla {
17
namespace dom {
18
19
namespace binding_detail {}; // Just to make sure it's known as a namespace
20
using namespace mozilla::dom::binding_detail;
21
22
23
namespace SVGFEDiffuseLightingElement_Binding {
24
25
static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGElement_Binding::NativeType>::value,
26
              "Can't inherit from an interface with a different ownership model.");
27
28
MOZ_CAN_RUN_SCRIPT static bool
29
get_in1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEDiffuseLightingElement* self, JSJitGetterCallArgs args)
30
0
{
31
0
  AUTO_PROFILER_LABEL_FAST("get SVGFEDiffuseLightingElement.in1", DOM, cx);
32
0
33
0
  auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedString>(self->In1()));
34
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
35
0
  if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
36
0
    MOZ_ASSERT(JS_IsExceptionPending(cx));
37
0
    return false;
38
0
  }
39
0
  return true;
40
0
}
41
42
static const JSJitInfo in1_getterinfo = {
43
  { (JSJitGetterOp)get_in1 },
44
  { prototypes::id::SVGFEDiffuseLightingElement },
45
  { PrototypeTraits<prototypes::id::SVGFEDiffuseLightingElement>::Depth },
46
  JSJitInfo::Getter,
47
  JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
48
  JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
49
  false,  /* isInfallible. False in setters. */
50
  true,  /* isMovable.  Not relevant for setters. */
51
  true, /* isEliminatable.  Not relevant for setters. */
52
  false, /* isAlwaysInSlot.  Only relevant for getters. */
53
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
54
  false,  /* isTypedMethod.  Only relevant for methods. */
55
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
56
};
57
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
58
static_assert(0 < 1, "There is no slot for us");
59
60
MOZ_CAN_RUN_SCRIPT static bool
61
get_surfaceScale(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEDiffuseLightingElement* self, JSJitGetterCallArgs args)
62
0
{
63
0
  AUTO_PROFILER_LABEL_FAST("get SVGFEDiffuseLightingElement.surfaceScale", DOM, cx);
64
0
65
0
  auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedNumber>(self->SurfaceScale()));
66
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
67
0
  if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
68
0
    MOZ_ASSERT(JS_IsExceptionPending(cx));
69
0
    return false;
70
0
  }
71
0
  return true;
72
0
}
73
74
static const JSJitInfo surfaceScale_getterinfo = {
75
  { (JSJitGetterOp)get_surfaceScale },
76
  { prototypes::id::SVGFEDiffuseLightingElement },
77
  { PrototypeTraits<prototypes::id::SVGFEDiffuseLightingElement>::Depth },
78
  JSJitInfo::Getter,
79
  JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
80
  JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
81
  false,  /* isInfallible. False in setters. */
82
  true,  /* isMovable.  Not relevant for setters. */
83
  true, /* isEliminatable.  Not relevant for setters. */
84
  false, /* isAlwaysInSlot.  Only relevant for getters. */
85
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
86
  false,  /* isTypedMethod.  Only relevant for methods. */
87
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
88
};
89
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
90
static_assert(0 < 1, "There is no slot for us");
91
92
MOZ_CAN_RUN_SCRIPT static bool
93
get_diffuseConstant(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEDiffuseLightingElement* self, JSJitGetterCallArgs args)
94
0
{
95
0
  AUTO_PROFILER_LABEL_FAST("get SVGFEDiffuseLightingElement.diffuseConstant", DOM, cx);
96
0
97
0
  auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedNumber>(self->DiffuseConstant()));
98
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
99
0
  if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
100
0
    MOZ_ASSERT(JS_IsExceptionPending(cx));
101
0
    return false;
102
0
  }
103
0
  return true;
104
0
}
105
106
static const JSJitInfo diffuseConstant_getterinfo = {
107
  { (JSJitGetterOp)get_diffuseConstant },
108
  { prototypes::id::SVGFEDiffuseLightingElement },
109
  { PrototypeTraits<prototypes::id::SVGFEDiffuseLightingElement>::Depth },
110
  JSJitInfo::Getter,
111
  JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
112
  JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
113
  false,  /* isInfallible. False in setters. */
114
  true,  /* isMovable.  Not relevant for setters. */
115
  true, /* isEliminatable.  Not relevant for setters. */
116
  false, /* isAlwaysInSlot.  Only relevant for getters. */
117
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
118
  false,  /* isTypedMethod.  Only relevant for methods. */
119
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
120
};
121
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
122
static_assert(0 < 1, "There is no slot for us");
123
124
MOZ_CAN_RUN_SCRIPT static bool
125
get_kernelUnitLengthX(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEDiffuseLightingElement* self, JSJitGetterCallArgs args)
126
0
{
127
0
  AUTO_PROFILER_LABEL_FAST("get SVGFEDiffuseLightingElement.kernelUnitLengthX", DOM, cx);
128
0
129
0
  auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedNumber>(self->KernelUnitLengthX()));
130
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
131
0
  if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
132
0
    MOZ_ASSERT(JS_IsExceptionPending(cx));
133
0
    return false;
134
0
  }
135
0
  return true;
136
0
}
137
138
static const JSJitInfo kernelUnitLengthX_getterinfo = {
139
  { (JSJitGetterOp)get_kernelUnitLengthX },
140
  { prototypes::id::SVGFEDiffuseLightingElement },
141
  { PrototypeTraits<prototypes::id::SVGFEDiffuseLightingElement>::Depth },
142
  JSJitInfo::Getter,
143
  JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
144
  JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
145
  false,  /* isInfallible. False in setters. */
146
  true,  /* isMovable.  Not relevant for setters. */
147
  true, /* isEliminatable.  Not relevant for setters. */
148
  false, /* isAlwaysInSlot.  Only relevant for getters. */
149
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
150
  false,  /* isTypedMethod.  Only relevant for methods. */
151
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
152
};
153
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
154
static_assert(0 < 1, "There is no slot for us");
155
156
MOZ_CAN_RUN_SCRIPT static bool
157
get_kernelUnitLengthY(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEDiffuseLightingElement* self, JSJitGetterCallArgs args)
158
0
{
159
0
  AUTO_PROFILER_LABEL_FAST("get SVGFEDiffuseLightingElement.kernelUnitLengthY", DOM, cx);
160
0
161
0
  auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedNumber>(self->KernelUnitLengthY()));
162
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
163
0
  if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
164
0
    MOZ_ASSERT(JS_IsExceptionPending(cx));
165
0
    return false;
166
0
  }
167
0
  return true;
168
0
}
169
170
static const JSJitInfo kernelUnitLengthY_getterinfo = {
171
  { (JSJitGetterOp)get_kernelUnitLengthY },
172
  { prototypes::id::SVGFEDiffuseLightingElement },
173
  { PrototypeTraits<prototypes::id::SVGFEDiffuseLightingElement>::Depth },
174
  JSJitInfo::Getter,
175
  JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
176
  JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
177
  false,  /* isInfallible. False in setters. */
178
  true,  /* isMovable.  Not relevant for setters. */
179
  true, /* isEliminatable.  Not relevant for setters. */
180
  false, /* isAlwaysInSlot.  Only relevant for getters. */
181
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
182
  false,  /* isTypedMethod.  Only relevant for methods. */
183
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
184
};
185
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
186
static_assert(0 < 1, "There is no slot for us");
187
188
MOZ_CAN_RUN_SCRIPT static bool
189
get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEDiffuseLightingElement* self, JSJitGetterCallArgs args)
190
0
{
191
0
  AUTO_PROFILER_LABEL_FAST("get SVGFEDiffuseLightingElement.x", DOM, cx);
192
0
193
0
  auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedLength>(self->X()));
194
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
195
0
  if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
196
0
    MOZ_ASSERT(JS_IsExceptionPending(cx));
197
0
    return false;
198
0
  }
199
0
  return true;
200
0
}
201
202
static const JSJitInfo x_getterinfo = {
203
  { (JSJitGetterOp)get_x },
204
  { prototypes::id::SVGFEDiffuseLightingElement },
205
  { PrototypeTraits<prototypes::id::SVGFEDiffuseLightingElement>::Depth },
206
  JSJitInfo::Getter,
207
  JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
208
  JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
209
  false,  /* isInfallible. False in setters. */
210
  true,  /* isMovable.  Not relevant for setters. */
211
  true, /* isEliminatable.  Not relevant for setters. */
212
  false, /* isAlwaysInSlot.  Only relevant for getters. */
213
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
214
  false,  /* isTypedMethod.  Only relevant for methods. */
215
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
216
};
217
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
218
static_assert(0 < 1, "There is no slot for us");
219
220
MOZ_CAN_RUN_SCRIPT static bool
221
get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEDiffuseLightingElement* self, JSJitGetterCallArgs args)
222
0
{
223
0
  AUTO_PROFILER_LABEL_FAST("get SVGFEDiffuseLightingElement.y", DOM, cx);
224
0
225
0
  auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedLength>(self->Y()));
226
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
227
0
  if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
228
0
    MOZ_ASSERT(JS_IsExceptionPending(cx));
229
0
    return false;
230
0
  }
231
0
  return true;
232
0
}
233
234
static const JSJitInfo y_getterinfo = {
235
  { (JSJitGetterOp)get_y },
236
  { prototypes::id::SVGFEDiffuseLightingElement },
237
  { PrototypeTraits<prototypes::id::SVGFEDiffuseLightingElement>::Depth },
238
  JSJitInfo::Getter,
239
  JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
240
  JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
241
  false,  /* isInfallible. False in setters. */
242
  true,  /* isMovable.  Not relevant for setters. */
243
  true, /* isEliminatable.  Not relevant for setters. */
244
  false, /* isAlwaysInSlot.  Only relevant for getters. */
245
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
246
  false,  /* isTypedMethod.  Only relevant for methods. */
247
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
248
};
249
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
250
static_assert(0 < 1, "There is no slot for us");
251
252
MOZ_CAN_RUN_SCRIPT static bool
253
get_width(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEDiffuseLightingElement* self, JSJitGetterCallArgs args)
254
0
{
255
0
  AUTO_PROFILER_LABEL_FAST("get SVGFEDiffuseLightingElement.width", DOM, cx);
256
0
257
0
  auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedLength>(self->Width()));
258
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
259
0
  if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
260
0
    MOZ_ASSERT(JS_IsExceptionPending(cx));
261
0
    return false;
262
0
  }
263
0
  return true;
264
0
}
265
266
static const JSJitInfo width_getterinfo = {
267
  { (JSJitGetterOp)get_width },
268
  { prototypes::id::SVGFEDiffuseLightingElement },
269
  { PrototypeTraits<prototypes::id::SVGFEDiffuseLightingElement>::Depth },
270
  JSJitInfo::Getter,
271
  JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
272
  JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
273
  false,  /* isInfallible. False in setters. */
274
  true,  /* isMovable.  Not relevant for setters. */
275
  true, /* isEliminatable.  Not relevant for setters. */
276
  false, /* isAlwaysInSlot.  Only relevant for getters. */
277
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
278
  false,  /* isTypedMethod.  Only relevant for methods. */
279
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
280
};
281
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
282
static_assert(0 < 1, "There is no slot for us");
283
284
MOZ_CAN_RUN_SCRIPT static bool
285
get_height(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEDiffuseLightingElement* self, JSJitGetterCallArgs args)
286
0
{
287
0
  AUTO_PROFILER_LABEL_FAST("get SVGFEDiffuseLightingElement.height", DOM, cx);
288
0
289
0
  auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedLength>(self->Height()));
290
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
291
0
  if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
292
0
    MOZ_ASSERT(JS_IsExceptionPending(cx));
293
0
    return false;
294
0
  }
295
0
  return true;
296
0
}
297
298
static const JSJitInfo height_getterinfo = {
299
  { (JSJitGetterOp)get_height },
300
  { prototypes::id::SVGFEDiffuseLightingElement },
301
  { PrototypeTraits<prototypes::id::SVGFEDiffuseLightingElement>::Depth },
302
  JSJitInfo::Getter,
303
  JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
304
  JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
305
  false,  /* isInfallible. False in setters. */
306
  true,  /* isMovable.  Not relevant for setters. */
307
  true, /* isEliminatable.  Not relevant for setters. */
308
  false, /* isAlwaysInSlot.  Only relevant for getters. */
309
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
310
  false,  /* isTypedMethod.  Only relevant for methods. */
311
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
312
};
313
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
314
static_assert(0 < 1, "There is no slot for us");
315
316
MOZ_CAN_RUN_SCRIPT static bool
317
get_result(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEDiffuseLightingElement* self, JSJitGetterCallArgs args)
318
0
{
319
0
  AUTO_PROFILER_LABEL_FAST("get SVGFEDiffuseLightingElement.result", DOM, cx);
320
0
321
0
  auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedString>(self->Result()));
322
0
  MOZ_ASSERT(!JS_IsExceptionPending(cx));
323
0
  if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
324
0
    MOZ_ASSERT(JS_IsExceptionPending(cx));
325
0
    return false;
326
0
  }
327
0
  return true;
328
0
}
329
330
static const JSJitInfo result_getterinfo = {
331
  { (JSJitGetterOp)get_result },
332
  { prototypes::id::SVGFEDiffuseLightingElement },
333
  { PrototypeTraits<prototypes::id::SVGFEDiffuseLightingElement>::Depth },
334
  JSJitInfo::Getter,
335
  JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
336
  JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
337
  false,  /* isInfallible. False in setters. */
338
  true,  /* isMovable.  Not relevant for setters. */
339
  true, /* isEliminatable.  Not relevant for setters. */
340
  false, /* isAlwaysInSlot.  Only relevant for getters. */
341
  false, /* isLazilyCachedInSlot.  Only relevant for getters. */
342
  false,  /* isTypedMethod.  Only relevant for methods. */
343
  0   /* Reserved slot index, if we're stored in a slot, else 0. */
344
};
345
static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
346
static_assert(0 < 1, "There is no slot for us");
347
348
static bool
349
_addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
350
0
{
351
0
  mozilla::dom::SVGFEDiffuseLightingElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::SVGFEDiffuseLightingElement>(obj);
352
0
  // We don't want to preserve if we don't have a wrapper, and we
353
0
  // obviously can't preserve if we're not initialized.
354
0
  if (self && self->GetWrapperPreserveColor()) {
355
0
    PreserveWrapper(self);
356
0
  }
357
0
  return true;
358
0
}
359
360
static void
361
_finalize(js::FreeOp* fop, JSObject* obj)
362
0
{
363
0
  mozilla::dom::SVGFEDiffuseLightingElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::SVGFEDiffuseLightingElement>(obj);
364
0
  if (self) {
365
0
    ClearWrapper(self, self, obj);
366
0
    AddForDeferredFinalization<mozilla::dom::SVGFEDiffuseLightingElement>(self);
367
0
  }
368
0
}
369
370
static size_t
371
_objectMoved(JSObject* obj, JSObject* old)
372
0
{
373
0
  mozilla::dom::SVGFEDiffuseLightingElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::SVGFEDiffuseLightingElement>(obj);
374
0
  if (self) {
375
0
    UpdateWrapper(self, self, obj, old);
376
0
  }
377
0
378
0
  return 0;
379
0
}
380
381
// We deliberately use brace-elision to make Visual Studio produce better initalization code.
382
#if defined(__clang__)
383
#pragma clang diagnostic push
384
#pragma clang diagnostic ignored "-Wmissing-braces"
385
#endif
386
static const JSPropertySpec sAttributes_specs[] = {
387
  { "in1", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &in1_getterinfo, nullptr, nullptr },
388
  { "surfaceScale", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &surfaceScale_getterinfo, nullptr, nullptr },
389
  { "diffuseConstant", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &diffuseConstant_getterinfo, nullptr, nullptr },
390
  { "kernelUnitLengthX", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &kernelUnitLengthX_getterinfo, nullptr, nullptr },
391
  { "kernelUnitLengthY", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &kernelUnitLengthY_getterinfo, nullptr, nullptr },
392
  { "x", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &x_getterinfo, nullptr, nullptr },
393
  { "y", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &y_getterinfo, nullptr, nullptr },
394
  { "width", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &width_getterinfo, nullptr, nullptr },
395
  { "height", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &height_getterinfo, nullptr, nullptr },
396
  { "result", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &result_getterinfo, nullptr, nullptr },
397
  { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
398
};
399
#if defined(__clang__)
400
#pragma clang diagnostic pop
401
#endif
402
403
404
static const Prefable<const JSPropertySpec> sAttributes[] = {
405
  { nullptr, &sAttributes_specs[0] },
406
  { nullptr, nullptr }
407
};
408
409
static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
410
    "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
411
static_assert(10 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
412
    "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
413
414
415
static uint16_t sNativeProperties_sortedPropertyIndices[10];
416
static PropertyInfo sNativeProperties_propertyInfos[10];
417
418
static const NativePropertiesN<1> sNativeProperties = {
419
  false, 0,
420
  false, 0,
421
  false, 0,
422
  true,  0 /* sAttributes */,
423
  false, 0,
424
  false, 0,
425
  false, 0,
426
  -1,
427
  10,
428
  sNativeProperties_sortedPropertyIndices,
429
  {
430
    { sAttributes, &sNativeProperties_propertyInfos[0] }
431
  }
432
};
433
static_assert(10 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
434
    "We have a property info count that is oversized");
435
436
static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
437
  {
438
    "Function",
439
    JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
440
    &sBoringInterfaceObjectClassClassOps,
441
    JS_NULL_CLASS_SPEC,
442
    JS_NULL_CLASS_EXT,
443
    &sInterfaceObjectClassObjectOps
444
  },
445
  eInterface,
446
  true,
447
  prototypes::id::SVGFEDiffuseLightingElement,
448
  PrototypeTraits<prototypes::id::SVGFEDiffuseLightingElement>::Depth,
449
  sNativePropertyHooks,
450
  "function SVGFEDiffuseLightingElement() {\n    [native code]\n}",
451
  SVGElement_Binding::GetConstructorObject
452
};
453
454
static const DOMIfaceAndProtoJSClass sPrototypeClass = {
455
  {
456
    "SVGFEDiffuseLightingElementPrototype",
457
    JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
458
    JS_NULL_CLASS_OPS,
459
    JS_NULL_CLASS_SPEC,
460
    JS_NULL_CLASS_EXT,
461
    JS_NULL_OBJECT_OPS
462
  },
463
  eInterfacePrototype,
464
  false,
465
  prototypes::id::SVGFEDiffuseLightingElement,
466
  PrototypeTraits<prototypes::id::SVGFEDiffuseLightingElement>::Depth,
467
  sNativePropertyHooks,
468
  "[object SVGFEDiffuseLightingElementPrototype]",
469
  SVGElement_Binding::GetProtoObject
470
};
471
472
static const js::ClassOps sClassOps = {
473
  _addProperty, /* addProperty */
474
  nullptr,               /* delProperty */
475
  nullptr,               /* enumerate */
476
  nullptr, /* newEnumerate */
477
  nullptr, /* resolve */
478
  nullptr, /* mayResolve */
479
  _finalize, /* finalize */
480
  nullptr, /* call */
481
  nullptr,               /* hasInstance */
482
  nullptr,               /* construct */
483
  nullptr, /* trace */
484
};
485
486
static const js::ClassExtension sClassExtension = {
487
  nullptr, /* weakmapKeyDelegateOp */
488
  _objectMoved /* objectMovedOp */
489
};
490
491
static const DOMJSClass sClass = {
492
  { "SVGFEDiffuseLightingElement",
493
    JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
494
    &sClassOps,
495
    JS_NULL_CLASS_SPEC,
496
    &sClassExtension,
497
    JS_NULL_OBJECT_OPS
498
  },
499
  { prototypes::id::EventTarget, prototypes::id::Node, prototypes::id::Element, prototypes::id::SVGElement, prototypes::id::SVGFEDiffuseLightingElement, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
500
  IsBaseOf<nsISupports, mozilla::dom::SVGFEDiffuseLightingElement >::value,
501
  sNativePropertyHooks,
502
  FindAssociatedGlobalForNative<mozilla::dom::SVGFEDiffuseLightingElement>::Get,
503
  GetProtoObjectHandle,
504
  GetCCParticipant<mozilla::dom::SVGFEDiffuseLightingElement>::Get()
505
};
506
static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
507
              "Must have the right minimal number of reserved slots.");
508
static_assert(1 >= 1,
509
              "Must have enough reserved slots.");
510
511
const JSClass*
512
GetJSClass()
513
0
{
514
0
  return sClass.ToJSClass();
515
0
}
516
517
bool
518
Wrap(JSContext* aCx, mozilla::dom::SVGFEDiffuseLightingElement* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
519
0
{
520
0
  static_assert(!IsBaseOf<NonRefcountedDOMObject, mozilla::dom::SVGFEDiffuseLightingElement>::value,
521
0
                "Shouldn't have wrappercached things that are not refcounted.");
522
0
  MOZ_ASSERT(static_cast<mozilla::dom::SVGFEDiffuseLightingElement*>(aObject) ==
523
0
             reinterpret_cast<mozilla::dom::SVGFEDiffuseLightingElement*>(aObject),
524
0
             "Multiple inheritance for mozilla::dom::SVGFEDiffuseLightingElement is broken.");
525
0
  MOZ_ASSERT(static_cast<nsSVGElement*>(aObject) ==
526
0
             reinterpret_cast<nsSVGElement*>(aObject),
527
0
             "Multiple inheritance for nsSVGElement is broken.");
528
0
  MOZ_ASSERT(static_cast<mozilla::dom::Element*>(aObject) ==
529
0
             reinterpret_cast<mozilla::dom::Element*>(aObject),
530
0
             "Multiple inheritance for mozilla::dom::Element is broken.");
531
0
  MOZ_ASSERT(static_cast<nsINode*>(aObject) ==
532
0
             reinterpret_cast<nsINode*>(aObject),
533
0
             "Multiple inheritance for nsINode is broken.");
534
0
  MOZ_ASSERT(static_cast<mozilla::dom::EventTarget*>(aObject) ==
535
0
             reinterpret_cast<mozilla::dom::EventTarget*>(aObject),
536
0
             "Multiple inheritance for mozilla::dom::EventTarget is broken.");
537
0
  MOZ_ASSERT(ToSupportsIsCorrect(aObject));
538
0
  MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
539
0
  MOZ_ASSERT(!aCache->GetWrapper(),
540
0
             "You should probably not be using Wrap() directly; use "
541
0
             "GetOrCreateDOMReflector instead");
542
0
543
0
  MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
544
0
             "nsISupports must be on our primary inheritance chain");
545
0
546
0
  JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
547
0
  if (!global) {
548
0
    return false;
549
0
  }
550
0
  MOZ_ASSERT(JS_IsGlobalObject(global));
551
0
  MOZ_ASSERT(JS::ObjectIsNotGray(global));
552
0
553
0
  // That might have ended up wrapping us already, due to the wonders
554
0
  // of XBL.  Check for that, and bail out as needed.
555
0
  aReflector.set(aCache->GetWrapper());
556
0
  if (aReflector) {
557
#ifdef DEBUG
558
    AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
559
#endif // DEBUG
560
    return true;
561
0
  }
562
0
563
0
  JSAutoRealm ar(aCx, global);
564
0
  JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
565
0
  if (!canonicalProto) {
566
0
    return false;
567
0
  }
568
0
  JS::Rooted<JSObject*> proto(aCx);
569
0
  if (aGivenProto) {
570
0
    proto = aGivenProto;
571
0
    // Unfortunately, while aGivenProto was in the compartment of aCx
572
0
    // coming in, we changed compartments to that of "parent" so may need
573
0
    // to wrap the proto here.
574
0
    if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
575
0
      if (!JS_WrapObject(aCx, &proto)) {
576
0
        return false;
577
0
      }
578
0
    }
579
0
  } else {
580
0
    proto = canonicalProto;
581
0
  }
582
0
583
0
  BindingJSObjectCreator<mozilla::dom::SVGFEDiffuseLightingElement> creator(aCx);
584
0
  creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
585
0
  if (!aReflector) {
586
0
    return false;
587
0
  }
588
0
589
0
  aCache->SetWrapper(aReflector);
590
0
  creator.InitializationSucceeded();
591
0
592
0
  MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
593
0
             aCache->GetWrapperPreserveColor() == aReflector);
594
0
  // If proto != canonicalProto, we have to preserve our wrapper;
595
0
  // otherwise we won't be able to properly recreate it later, since
596
0
  // we won't know what proto to use.  Note that we don't check
597
0
  // aGivenProto here, since it's entirely possible (and even
598
0
  // somewhat common) to have a non-null aGivenProto which is the
599
0
  // same as canonicalProto.
600
0
  if (proto != canonicalProto) {
601
0
    PreserveWrapper(aObject);
602
0
  }
603
0
604
0
  return true;
605
0
}
606
607
const NativePropertyHooks sNativePropertyHooks[] = { {
608
  nullptr,
609
  nullptr,
610
  nullptr,
611
  { sNativeProperties.Upcast(), nullptr },
612
  prototypes::id::SVGFEDiffuseLightingElement,
613
  constructors::id::SVGFEDiffuseLightingElement,
614
  SVGElement_Binding::sNativePropertyHooks,
615
  &DefaultXrayExpandoObjectClass
616
} };
617
618
void
619
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
620
0
{
621
0
  JS::Handle<JSObject*> parentProto(SVGElement_Binding::GetProtoObjectHandle(aCx));
622
0
  if (!parentProto) {
623
0
    return;
624
0
  }
625
0
626
0
  JS::Handle<JSObject*> constructorProto(SVGElement_Binding::GetConstructorObjectHandle(aCx));
627
0
  if (!constructorProto) {
628
0
    return;
629
0
  }
630
0
631
0
  static bool sIdsInited = false;
632
0
  if (!sIdsInited && NS_IsMainThread()) {
633
0
    if (!InitIds(aCx, sNativeProperties.Upcast())) {
634
0
      return;
635
0
    }
636
0
    sIdsInited = true;
637
0
  }
638
0
639
0
  JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGFEDiffuseLightingElement);
640
0
  JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGFEDiffuseLightingElement);
641
0
  dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
642
0
                              &sPrototypeClass.mBase, protoCache,
643
0
                              nullptr,
644
0
                              constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
645
0
                              interfaceCache,
646
0
                              sNativeProperties.Upcast(),
647
0
                              nullptr,
648
0
                              "SVGFEDiffuseLightingElement", aDefineOnGlobal,
649
0
                              nullptr,
650
0
                              false);
651
0
}
652
653
JSObject*
654
GetConstructorObject(JSContext* aCx)
655
0
{
656
0
  return GetConstructorObjectHandle(aCx);
657
0
}
658
659
} // namespace SVGFEDiffuseLightingElement_Binding
660
661
662
663
} // namespace dom
664
} // namespace mozilla