/work/obj-fuzz/dist/include/mozilla/dom/MozSharedMapBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM MozSharedMap.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_MozSharedMapBinding_h |
4 | | #define mozilla_dom_MozSharedMapBinding_h |
5 | | |
6 | | #include "EventBinding.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/IterableIterator.h" |
13 | | #include "mozilla/dom/Nullable.h" |
14 | | #include "mozilla/dom/PrototypeList.h" |
15 | | |
16 | | namespace mozilla { |
17 | | namespace dom { |
18 | | |
19 | | struct MozSharedMapChangeEventInitAtoms; |
20 | | struct NativePropertyHooks; |
21 | | class ProtoAndIfaceCache; |
22 | | |
23 | | namespace ipc { |
24 | | |
25 | | class SharedMap; |
26 | | struct SharedMapAtoms; |
27 | | class SharedMapChangeEvent; |
28 | | struct SharedMapChangeEventAtoms; |
29 | | class WritableSharedMap; |
30 | | struct WritableSharedMapAtoms; |
31 | | |
32 | | } // namespace ipc |
33 | | |
34 | | } // namespace dom |
35 | | } // namespace mozilla |
36 | | |
37 | | namespace mozilla { |
38 | | namespace dom { |
39 | | |
40 | | struct MozSharedMapChangeEventInit : public EventInit |
41 | | { |
42 | | MOZ_INIT_OUTSIDE_CTOR Sequence<nsString> mChangedKeys; |
43 | | |
44 | | MozSharedMapChangeEventInit(); |
45 | | |
46 | | explicit inline MozSharedMapChangeEventInit(const FastDictionaryInitializer& ) |
47 | | : EventInit(FastDictionaryInitializer()) |
48 | 0 | { |
49 | 0 | // Do nothing here; this is used by our "Fast" subclass |
50 | 0 | } |
51 | | |
52 | | explicit inline MozSharedMapChangeEventInit(const MozSharedMapChangeEventInit& aOther) |
53 | 0 | { |
54 | 0 | *this = aOther; |
55 | 0 | } |
56 | | |
57 | | bool |
58 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
59 | | |
60 | | bool |
61 | | Init(const nsAString& aJSON); |
62 | | |
63 | | bool |
64 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
65 | | |
66 | | bool |
67 | | ToJSON(nsAString& aJSON) const; |
68 | | |
69 | | void |
70 | | TraceDictionary(JSTracer* trc); |
71 | | |
72 | | MozSharedMapChangeEventInit& |
73 | | operator=(const MozSharedMapChangeEventInit& aOther); |
74 | | |
75 | | private: |
76 | | static bool |
77 | | InitIds(JSContext* cx, MozSharedMapChangeEventInitAtoms* atomsCache); |
78 | | }; |
79 | | |
80 | | namespace binding_detail { |
81 | | struct FastMozSharedMapChangeEventInit : public MozSharedMapChangeEventInit |
82 | | { |
83 | | inline FastMozSharedMapChangeEventInit() |
84 | | : MozSharedMapChangeEventInit(FastDictionaryInitializer()) |
85 | 0 | { |
86 | 0 | // Doesn't matter what int we pass to the parent constructor |
87 | 0 | } |
88 | | }; |
89 | | } // namespace binding_detail |
90 | | |
91 | | |
92 | | namespace MozSharedMap_Binding { |
93 | | |
94 | | typedef mozilla::dom::ipc::SharedMap NativeType; |
95 | | |
96 | | bool |
97 | | ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj); |
98 | | |
99 | | const JSClass* |
100 | | GetJSClass(); |
101 | | |
102 | | bool |
103 | | Wrap(JSContext* aCx, mozilla::dom::ipc::SharedMap* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
104 | | |
105 | | template <class T> |
106 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
107 | 0 | { |
108 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
109 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
110 | 0 | } |
111 | | |
112 | | // We declare this as an array so that retrieving a pointer to this |
113 | | // binding's property hooks only requires compile/link-time resolvable |
114 | | // address arithmetic. Declaring it as a pointer instead would require |
115 | | // doing a run-time load to fetch a pointer to this binding's property |
116 | | // hooks. And then structures which embedded a pointer to this structure |
117 | | // would require a run-time load for proper initialization, which would |
118 | | // then induce static constructors. Lots of static constructors. |
119 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
120 | | |
121 | | void |
122 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
123 | | |
124 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
125 | 0 | { |
126 | 0 | /* Get the interface prototype object for this class. This will create the |
127 | 0 | object as needed. */ |
128 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::MozSharedMap, |
129 | 0 | &CreateInterfaceObjects, |
130 | 0 | /* aDefineOnGlobal = */ true); |
131 | 0 |
|
132 | 0 | } |
133 | | |
134 | | JSObject* |
135 | | GetProtoObject(JSContext* aCx); |
136 | | |
137 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
138 | 0 | { |
139 | 0 | /* Get the interface object for this class. This will create the object as |
140 | 0 | needed. */ |
141 | 0 |
|
142 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::MozSharedMap, |
143 | 0 | &CreateInterfaceObjects, |
144 | 0 | aDefineOnGlobal); |
145 | 0 | } |
146 | | |
147 | | JSObject* |
148 | | GetConstructorObject(JSContext* aCx); |
149 | | |
150 | | } // namespace MozSharedMap_Binding |
151 | | |
152 | | |
153 | | |
154 | | namespace MozSharedMapChangeEvent_Binding { |
155 | | |
156 | | typedef mozilla::dom::ipc::SharedMapChangeEvent NativeType; |
157 | | |
158 | | bool |
159 | | ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj); |
160 | | |
161 | | const JSClass* |
162 | | GetJSClass(); |
163 | | |
164 | | bool |
165 | | Wrap(JSContext* aCx, mozilla::dom::ipc::SharedMapChangeEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
166 | | |
167 | | template <class T> |
168 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
169 | 0 | { |
170 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
171 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
172 | 0 | } |
173 | | |
174 | | // We declare this as an array so that retrieving a pointer to this |
175 | | // binding's property hooks only requires compile/link-time resolvable |
176 | | // address arithmetic. Declaring it as a pointer instead would require |
177 | | // doing a run-time load to fetch a pointer to this binding's property |
178 | | // hooks. And then structures which embedded a pointer to this structure |
179 | | // would require a run-time load for proper initialization, which would |
180 | | // then induce static constructors. Lots of static constructors. |
181 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
182 | | |
183 | | void |
184 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
185 | | |
186 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
187 | 0 | { |
188 | 0 | /* Get the interface prototype object for this class. This will create the |
189 | 0 | object as needed. */ |
190 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::MozSharedMapChangeEvent, |
191 | 0 | &CreateInterfaceObjects, |
192 | 0 | /* aDefineOnGlobal = */ true); |
193 | 0 |
|
194 | 0 | } |
195 | | |
196 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
197 | 0 | { |
198 | 0 | /* Get the interface object for this class. This will create the object as |
199 | 0 | needed. */ |
200 | 0 |
|
201 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::MozSharedMapChangeEvent, |
202 | 0 | &CreateInterfaceObjects, |
203 | 0 | aDefineOnGlobal); |
204 | 0 | } |
205 | | |
206 | | JSObject* |
207 | | GetConstructorObject(JSContext* aCx); |
208 | | |
209 | | } // namespace MozSharedMapChangeEvent_Binding |
210 | | |
211 | | |
212 | | |
213 | | namespace MozSharedMapIterator_Binding { |
214 | | |
215 | | typedef mozilla::dom::IterableIterator<mozilla::dom::ipc::SharedMap> NativeType; |
216 | | |
217 | | const JSClass* |
218 | | GetJSClass(); |
219 | | |
220 | | bool |
221 | | Wrap(JSContext* aCx, mozilla::dom::IterableIterator<mozilla::dom::ipc::SharedMap>* aObject, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
222 | | |
223 | | // We declare this as an array so that retrieving a pointer to this |
224 | | // binding's property hooks only requires compile/link-time resolvable |
225 | | // address arithmetic. Declaring it as a pointer instead would require |
226 | | // doing a run-time load to fetch a pointer to this binding's property |
227 | | // hooks. And then structures which embedded a pointer to this structure |
228 | | // would require a run-time load for proper initialization, which would |
229 | | // then induce static constructors. Lots of static constructors. |
230 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
231 | | |
232 | | void |
233 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
234 | | |
235 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
236 | 0 | { |
237 | 0 | /* Get the interface prototype object for this class. This will create the |
238 | 0 | object as needed. */ |
239 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::MozSharedMapIterator, |
240 | 0 | &CreateInterfaceObjects, |
241 | 0 | /* aDefineOnGlobal = */ true); |
242 | 0 |
|
243 | 0 | } |
244 | | |
245 | | } // namespace MozSharedMapIterator_Binding |
246 | | |
247 | | |
248 | | |
249 | | namespace MozWritableSharedMap_Binding { |
250 | | |
251 | | typedef mozilla::dom::ipc::WritableSharedMap NativeType; |
252 | | |
253 | | bool |
254 | | ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj); |
255 | | |
256 | | const JSClass* |
257 | | GetJSClass(); |
258 | | |
259 | | bool |
260 | | Wrap(JSContext* aCx, mozilla::dom::ipc::WritableSharedMap* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
261 | | |
262 | | template <class T> |
263 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
264 | 0 | { |
265 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
266 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
267 | 0 | } |
268 | | |
269 | | // We declare this as an array so that retrieving a pointer to this |
270 | | // binding's property hooks only requires compile/link-time resolvable |
271 | | // address arithmetic. Declaring it as a pointer instead would require |
272 | | // doing a run-time load to fetch a pointer to this binding's property |
273 | | // hooks. And then structures which embedded a pointer to this structure |
274 | | // would require a run-time load for proper initialization, which would |
275 | | // then induce static constructors. Lots of static constructors. |
276 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
277 | | |
278 | | void |
279 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
280 | | |
281 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
282 | 0 | { |
283 | 0 | /* Get the interface prototype object for this class. This will create the |
284 | 0 | object as needed. */ |
285 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::MozWritableSharedMap, |
286 | 0 | &CreateInterfaceObjects, |
287 | 0 | /* aDefineOnGlobal = */ true); |
288 | 0 |
|
289 | 0 | } |
290 | | |
291 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
292 | 0 | { |
293 | 0 | /* Get the interface object for this class. This will create the object as |
294 | 0 | needed. */ |
295 | 0 |
|
296 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::MozWritableSharedMap, |
297 | 0 | &CreateInterfaceObjects, |
298 | 0 | aDefineOnGlobal); |
299 | 0 | } |
300 | | |
301 | | JSObject* |
302 | | GetConstructorObject(JSContext* aCx); |
303 | | |
304 | | } // namespace MozWritableSharedMap_Binding |
305 | | |
306 | | |
307 | | |
308 | | } // namespace dom |
309 | | } // namespace mozilla |
310 | | |
311 | | #endif // mozilla_dom_MozSharedMapBinding_h |