Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/DOMQuadBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM DOMQuad.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_DOMQuadBinding_h
4
#define mozilla_dom_DOMQuadBinding_h
5
6
#include "DOMPointBinding.h"
7
#include "GeckoProfiler.h"
8
#include "js/RootingAPI.h"
9
#include "jspubtd.h"
10
#include "mozilla/ErrorResult.h"
11
#include "mozilla/dom/BindingDeclarations.h"
12
#include "mozilla/dom/DOMPoint.h"
13
#include "mozilla/dom/Nullable.h"
14
#include "mozilla/dom/PrototypeList.h"
15
16
namespace mozilla {
17
namespace dom {
18
19
class DOMPoint;
20
struct DOMPointInit;
21
class DOMQuad;
22
struct DOMQuadAtoms;
23
struct DOMQuadInitAtoms;
24
struct DOMQuadJSONAtoms;
25
struct NativePropertyHooks;
26
class ProtoAndIfaceCache;
27
28
} // namespace dom
29
} // namespace mozilla
30
31
namespace mozilla {
32
namespace dom {
33
34
struct DOMQuadInit : public DictionaryBase
35
{
36
  MOZ_INIT_OUTSIDE_CTOR DOMPointInit mP1;
37
  MOZ_INIT_OUTSIDE_CTOR DOMPointInit mP2;
38
  MOZ_INIT_OUTSIDE_CTOR DOMPointInit mP3;
39
  MOZ_INIT_OUTSIDE_CTOR DOMPointInit mP4;
40
41
  DOMQuadInit();
42
43
  explicit inline DOMQuadInit(const FastDictionaryInitializer& )
44
    : mP1(FastDictionaryInitializer()),
45
      mP2(FastDictionaryInitializer()),
46
      mP3(FastDictionaryInitializer()),
47
      mP4(FastDictionaryInitializer())
48
0
  {
49
0
    // Do nothing here; this is used by our "Fast" subclass
50
0
  }
51
52
  explicit inline DOMQuadInit(const DOMQuadInit& aOther)
53
    : mP1(FastDictionaryInitializer()),
54
      mP2(FastDictionaryInitializer()),
55
      mP3(FastDictionaryInitializer()),
56
      mP4(FastDictionaryInitializer())
57
0
  {
58
0
    *this = aOther;
59
0
  }
60
61
  bool
62
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
63
64
  bool
65
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
66
67
  void
68
  TraceDictionary(JSTracer* trc);
69
70
  DOMQuadInit&
71
  operator=(const DOMQuadInit& aOther);
72
73
private:
74
  static bool
75
  InitIds(JSContext* cx, DOMQuadInitAtoms* atomsCache);
76
};
77
78
namespace binding_detail {
79
struct FastDOMQuadInit : public DOMQuadInit
80
{
81
  inline FastDOMQuadInit()
82
    : DOMQuadInit(FastDictionaryInitializer())
83
0
  {
84
0
    // Doesn't matter what int we pass to the parent constructor
85
0
  }
86
};
87
} // namespace binding_detail
88
89
90
struct DOMQuadJSON : public DictionaryBase
91
{
92
  MOZ_INIT_OUTSIDE_CTOR Optional<OwningNonNull<mozilla::dom::DOMPoint>> mP1;
93
  MOZ_INIT_OUTSIDE_CTOR Optional<OwningNonNull<mozilla::dom::DOMPoint>> mP2;
94
  MOZ_INIT_OUTSIDE_CTOR Optional<OwningNonNull<mozilla::dom::DOMPoint>> mP3;
95
  MOZ_INIT_OUTSIDE_CTOR Optional<OwningNonNull<mozilla::dom::DOMPoint>> mP4;
96
97
  DOMQuadJSON();
98
99
  explicit inline DOMQuadJSON(const FastDictionaryInitializer& )
100
0
  {
101
0
    // Do nothing here; this is used by our "Fast" subclass
102
0
  }
103
104
  explicit inline DOMQuadJSON(const DOMQuadJSON& aOther)
105
0
  {
106
0
    *this = aOther;
107
0
  }
108
109
  bool
110
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
111
112
  bool
113
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
114
115
  void
116
  TraceDictionary(JSTracer* trc);
117
118
  inline void
119
  TraverseForCC(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags)
120
0
  {
121
0
    ImplCycleCollectionTraverse(aCallback, mP1, "mP1", aFlags);
122
0
    ImplCycleCollectionTraverse(aCallback, mP2, "mP2", aFlags);
123
0
    ImplCycleCollectionTraverse(aCallback, mP3, "mP3", aFlags);
124
0
    ImplCycleCollectionTraverse(aCallback, mP4, "mP4", aFlags);
125
0
  }
126
127
  inline void
128
  UnlinkForCC()
129
0
  {
130
0
    ImplCycleCollectionUnlink(mP1);
131
0
    ImplCycleCollectionUnlink(mP2);
132
0
    ImplCycleCollectionUnlink(mP3);
133
0
    ImplCycleCollectionUnlink(mP4);
134
0
  }
135
136
  DOMQuadJSON&
137
  operator=(const DOMQuadJSON& aOther);
138
139
private:
140
  static bool
141
  InitIds(JSContext* cx, DOMQuadJSONAtoms* atomsCache);
142
};
143
144
namespace binding_detail {
145
struct FastDOMQuadJSON : public DOMQuadJSON
146
{
147
  inline FastDOMQuadJSON()
148
    : DOMQuadJSON(FastDictionaryInitializer())
149
0
  {
150
0
    // Doesn't matter what int we pass to the parent constructor
151
0
  }
152
};
153
} // namespace binding_detail
154
155
156
namespace DOMQuad_Binding {
157
158
  typedef mozilla::dom::DOMQuad NativeType;
159
160
  bool
161
  ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
162
163
  const JSClass*
164
  GetJSClass();
165
166
  bool
167
  Wrap(JSContext* aCx, mozilla::dom::DOMQuad* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
168
169
  template <class T>
170
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
171
0
  {
172
0
    JS::Rooted<JSObject*> reflector(aCx);
173
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
174
0
  }
175
176
  // We declare this as an array so that retrieving a pointer to this
177
  // binding's property hooks only requires compile/link-time resolvable
178
  // address arithmetic.  Declaring it as a pointer instead would require
179
  // doing a run-time load to fetch a pointer to this binding's property
180
  // hooks.  And then structures which embedded a pointer to this structure
181
  // would require a run-time load for proper initialization, which would
182
  // then induce static constructors.  Lots of static constructors.
183
  extern const NativePropertyHooks sNativePropertyHooks[];
184
185
  void
186
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
187
188
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
189
0
  {
190
0
    /* Get the interface prototype object for this class.  This will create the
191
0
       object as needed. */
192
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::DOMQuad,
193
0
                                       &CreateInterfaceObjects,
194
0
                                       /* aDefineOnGlobal = */ true);
195
0
196
0
  }
197
198
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
199
0
  {
200
0
    /* Get the interface object for this class.  This will create the object as
201
0
       needed. */
202
0
203
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::DOMQuad,
204
0
                                       &CreateInterfaceObjects,
205
0
                                       aDefineOnGlobal);
206
0
  }
207
208
  JSObject*
209
  GetConstructorObject(JSContext* aCx);
210
211
} // namespace DOMQuad_Binding
212
213
214
215
} // namespace dom
216
} // namespace mozilla
217
218
#endif // mozilla_dom_DOMQuadBinding_h