/work/obj-fuzz/ipc/ipdl/PFilePicker.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // |
2 | | // Automatically generated by ipdlc. |
3 | | // Edit at your own risk |
4 | | // |
5 | | |
6 | | |
7 | | #include "mozilla/dom/PBrowserParent.h" |
8 | | #include "mozilla/dom/PBrowserChild.h" |
9 | | #include "mozilla/ipc/PChildToParentStreamParent.h" |
10 | | #include "mozilla/ipc/PChildToParentStreamChild.h" |
11 | | #include "mozilla/ipc/PIPCBlobInputStreamParent.h" |
12 | | #include "mozilla/ipc/PIPCBlobInputStreamChild.h" |
13 | | #include "mozilla/ipc/PFileDescriptorSetParent.h" |
14 | | #include "mozilla/ipc/PFileDescriptorSetChild.h" |
15 | | #include "mozilla/ipc/PParentToChildStreamParent.h" |
16 | | #include "mozilla/ipc/PParentToChildStreamChild.h" |
17 | | #include "mozilla/dom/PFilePicker.h" |
18 | | |
19 | | namespace mozilla { |
20 | | namespace dom { |
21 | | namespace PFilePicker { |
22 | | |
23 | | nsresult |
24 | | CreateEndpoints( |
25 | | base::ProcessId aParentDestPid, |
26 | | base::ProcessId aChildDestPid, |
27 | | mozilla::ipc::Endpoint<mozilla::dom::PFilePickerParent>* aParent, |
28 | | mozilla::ipc::Endpoint<mozilla::dom::PFilePickerChild>* aChild) |
29 | 0 | { |
30 | 0 | return mozilla::ipc::CreateEndpoints(mozilla::ipc::PrivateIPDLInterface(), aParentDestPid, aChildDestPid, aParent, aChild); |
31 | 0 | } |
32 | | IPC::Message* |
33 | | Msg_Open(int32_t routingId) |
34 | 0 | { |
35 | 0 | return IPC::Message::IPDLMessage(routingId, Msg_Open__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY)); |
36 | 0 | } |
37 | | IPC::Message* |
38 | | Msg___delete__(int32_t routingId) |
39 | 0 | { |
40 | 0 | return IPC::Message::IPDLMessage(routingId, Msg___delete____ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY)); |
41 | 0 | } |
42 | | IPC::Message* |
43 | | Reply___delete__(int32_t routingId) |
44 | 0 | { |
45 | 0 | return IPC::Message::IPDLMessage(routingId, Reply___delete____ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::REPLY)); |
46 | 0 | } |
47 | | |
48 | | } // namespace PFilePicker |
49 | | } // namespace dom |
50 | | } // namespace mozilla |
51 | | |
52 | | //----------------------------------------------------------------------------- |
53 | | // Method definitions for the IPDL type |struct InputBlobs| |
54 | | // |
55 | | namespace mozilla { |
56 | | namespace dom { |
57 | | auto InputBlobs::operator==(const InputBlobs& _o) const -> bool |
58 | 0 | { |
59 | 0 | if ((!((blobs()) == ((_o).blobs())))) { |
60 | 0 | return false; |
61 | 0 | } |
62 | 0 | return true; |
63 | 0 | } |
64 | | |
65 | | auto InputBlobs::operator!=(const InputBlobs& _o) const -> bool |
66 | 0 | { |
67 | 0 | return (!(operator==(_o))); |
68 | 0 | } |
69 | | |
70 | | } // namespace dom |
71 | | } // namespace mozilla |
72 | | |
73 | | namespace mozilla { |
74 | | namespace ipc { |
75 | | auto IPDLParamTraits<mozilla::dom::InputBlobs>::Write( |
76 | | IPC::Message* aMsg, |
77 | | mozilla::ipc::IProtocol* aActor, |
78 | | const paramType& aVar) -> void |
79 | 0 | { |
80 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).blobs()); |
81 | 0 | // Sentinel = 'blobs' |
82 | 0 | (aMsg)->WriteSentinel(635500709); |
83 | 0 | } |
84 | | |
85 | | auto IPDLParamTraits<mozilla::dom::InputBlobs>::Read( |
86 | | const IPC::Message* aMsg, |
87 | | PickleIterator* aIter, |
88 | | mozilla::ipc::IProtocol* aActor, |
89 | | paramType* aVar) -> bool |
90 | 0 | { |
91 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->blobs())))))) { |
92 | 0 | (aActor)->FatalError("Error deserializing 'blobs' (IPCBlob[]) member of 'InputBlobs'"); |
93 | 0 | return false; |
94 | 0 | } |
95 | 0 | // Sentinel = 'blobs' |
96 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 635500709)))) { |
97 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'blobs' (IPCBlob[]) member of 'InputBlobs'"); |
98 | 0 | return false; |
99 | 0 | } |
100 | 0 | return true; |
101 | 0 | } |
102 | | |
103 | | } // namespace ipc |
104 | | } // namespace mozilla |
105 | | |
106 | | //----------------------------------------------------------------------------- |
107 | | // Method definitions for the IPDL type |struct InputDirectory| |
108 | | // |
109 | | namespace mozilla { |
110 | | namespace dom { |
111 | | auto InputDirectory::operator==(const InputDirectory& _o) const -> bool |
112 | 0 | { |
113 | 0 | if ((!((directoryPath()) == ((_o).directoryPath())))) { |
114 | 0 | return false; |
115 | 0 | } |
116 | 0 | return true; |
117 | 0 | } |
118 | | |
119 | | auto InputDirectory::operator!=(const InputDirectory& _o) const -> bool |
120 | 0 | { |
121 | 0 | return (!(operator==(_o))); |
122 | 0 | } |
123 | | |
124 | | } // namespace dom |
125 | | } // namespace mozilla |
126 | | |
127 | | namespace mozilla { |
128 | | namespace ipc { |
129 | | auto IPDLParamTraits<mozilla::dom::InputDirectory>::Write( |
130 | | IPC::Message* aMsg, |
131 | | mozilla::ipc::IProtocol* aActor, |
132 | | const paramType& aVar) -> void |
133 | 0 | { |
134 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).directoryPath()); |
135 | 0 | // Sentinel = 'directoryPath' |
136 | 0 | (aMsg)->WriteSentinel(3260914177); |
137 | 0 | } |
138 | | |
139 | | auto IPDLParamTraits<mozilla::dom::InputDirectory>::Read( |
140 | | const IPC::Message* aMsg, |
141 | | PickleIterator* aIter, |
142 | | mozilla::ipc::IProtocol* aActor, |
143 | | paramType* aVar) -> bool |
144 | 0 | { |
145 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->directoryPath())))))) { |
146 | 0 | (aActor)->FatalError("Error deserializing 'directoryPath' (nsString) member of 'InputDirectory'"); |
147 | 0 | return false; |
148 | 0 | } |
149 | 0 | // Sentinel = 'directoryPath' |
150 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3260914177)))) { |
151 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'directoryPath' (nsString) member of 'InputDirectory'"); |
152 | 0 | return false; |
153 | 0 | } |
154 | 0 | return true; |
155 | 0 | } |
156 | | |
157 | | } // namespace ipc |
158 | | } // namespace mozilla |
159 | | |
160 | | //----------------------------------------------------------------------------- |
161 | | // Method definitions for the IPDL type |union MaybeInputData| |
162 | | // |
163 | | namespace mozilla { |
164 | | namespace dom { |
165 | | auto MaybeInputData::MaybeDestroy(Type aNewType) -> bool |
166 | 0 | { |
167 | 0 | if ((mType) == (T__None)) { |
168 | 0 | return true; |
169 | 0 | } |
170 | 0 | if ((mType) == (aNewType)) { |
171 | 0 | return false; |
172 | 0 | } |
173 | 0 | switch (mType) { |
174 | 0 | case TInputBlobs: |
175 | 0 | { |
176 | 0 | (ptr_InputBlobs())->~InputBlobs__tdef(); |
177 | 0 | break; |
178 | 0 | } |
179 | 0 | case TInputDirectory: |
180 | 0 | { |
181 | 0 | (ptr_InputDirectory())->~InputDirectory__tdef(); |
182 | 0 | break; |
183 | 0 | } |
184 | 0 | case Tvoid_t: |
185 | 0 | { |
186 | 0 | (ptr_void_t())->~void_t__tdef(); |
187 | 0 | break; |
188 | 0 | } |
189 | 0 | default: |
190 | 0 | { |
191 | 0 | mozilla::ipc::LogicError("not reached"); |
192 | 0 | break; |
193 | 0 | } |
194 | 0 | } |
195 | 0 | return true; |
196 | 0 | } |
197 | | |
198 | | MOZ_IMPLICIT MaybeInputData::MaybeInputData(const InputBlobs& aOther) |
199 | 0 | { |
200 | 0 | new (mozilla::KnownNotNull, ptr_InputBlobs()) InputBlobs(aOther); |
201 | 0 | mType = TInputBlobs; |
202 | 0 | } |
203 | | |
204 | | MOZ_IMPLICIT MaybeInputData::MaybeInputData(InputBlobs&& aOther) |
205 | 0 | { |
206 | 0 | new (mozilla::KnownNotNull, ptr_InputBlobs()) InputBlobs(std::move(aOther)); |
207 | 0 | mType = TInputBlobs; |
208 | 0 | } |
209 | | |
210 | | MOZ_IMPLICIT MaybeInputData::MaybeInputData(const InputDirectory& aOther) |
211 | 0 | { |
212 | 0 | new (mozilla::KnownNotNull, ptr_InputDirectory()) InputDirectory(aOther); |
213 | 0 | mType = TInputDirectory; |
214 | 0 | } |
215 | | |
216 | | MOZ_IMPLICIT MaybeInputData::MaybeInputData(InputDirectory&& aOther) |
217 | 0 | { |
218 | 0 | new (mozilla::KnownNotNull, ptr_InputDirectory()) InputDirectory(std::move(aOther)); |
219 | 0 | mType = TInputDirectory; |
220 | 0 | } |
221 | | |
222 | | MOZ_IMPLICIT MaybeInputData::MaybeInputData(const void_t& aOther) |
223 | 0 | { |
224 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t(aOther); |
225 | 0 | mType = Tvoid_t; |
226 | 0 | } |
227 | | |
228 | | MOZ_IMPLICIT MaybeInputData::MaybeInputData(void_t&& aOther) |
229 | 0 | { |
230 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move(aOther)); |
231 | 0 | mType = Tvoid_t; |
232 | 0 | } |
233 | | |
234 | | MOZ_IMPLICIT MaybeInputData::MaybeInputData(const MaybeInputData& aOther) |
235 | 0 | { |
236 | 0 | (aOther).AssertSanity(); |
237 | 0 | switch ((aOther).type()) { |
238 | 0 | case TInputBlobs: |
239 | 0 | { |
240 | 0 | new (mozilla::KnownNotNull, ptr_InputBlobs()) InputBlobs((aOther).get_InputBlobs()); |
241 | 0 | break; |
242 | 0 | } |
243 | 0 | case TInputDirectory: |
244 | 0 | { |
245 | 0 | new (mozilla::KnownNotNull, ptr_InputDirectory()) InputDirectory((aOther).get_InputDirectory()); |
246 | 0 | break; |
247 | 0 | } |
248 | 0 | case Tvoid_t: |
249 | 0 | { |
250 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t((aOther).get_void_t()); |
251 | 0 | break; |
252 | 0 | } |
253 | 0 | case T__None: |
254 | 0 | { |
255 | 0 | break; |
256 | 0 | } |
257 | 0 | default: |
258 | 0 | { |
259 | 0 | mozilla::ipc::LogicError("unreached"); |
260 | 0 | return; |
261 | 0 | } |
262 | 0 | } |
263 | 0 | mType = (aOther).type(); |
264 | 0 | } |
265 | | |
266 | | MOZ_IMPLICIT MaybeInputData::MaybeInputData(MaybeInputData&& aOther) |
267 | 0 | { |
268 | 0 | (aOther).AssertSanity(); |
269 | 0 | Type t = (aOther).type(); |
270 | 0 | switch (t) { |
271 | 0 | case TInputBlobs: |
272 | 0 | { |
273 | 0 | new (mozilla::KnownNotNull, ptr_InputBlobs()) InputBlobs(std::move((aOther).get_InputBlobs())); |
274 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
275 | 0 | break; |
276 | 0 | } |
277 | 0 | case TInputDirectory: |
278 | 0 | { |
279 | 0 | new (mozilla::KnownNotNull, ptr_InputDirectory()) InputDirectory(std::move((aOther).get_InputDirectory())); |
280 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
281 | 0 | break; |
282 | 0 | } |
283 | 0 | case Tvoid_t: |
284 | 0 | { |
285 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move((aOther).get_void_t())); |
286 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
287 | 0 | break; |
288 | 0 | } |
289 | 0 | case T__None: |
290 | 0 | { |
291 | 0 | break; |
292 | 0 | } |
293 | 0 | default: |
294 | 0 | { |
295 | 0 | mozilla::ipc::LogicError("unreached"); |
296 | 0 | return; |
297 | 0 | } |
298 | 0 | } |
299 | 0 | (aOther).mType = T__None; |
300 | 0 | mType = t; |
301 | 0 | } |
302 | | |
303 | | MaybeInputData::~MaybeInputData() |
304 | 0 | { |
305 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
306 | 0 | } |
307 | | |
308 | | auto MaybeInputData::operator=(const InputBlobs& aRhs) -> MaybeInputData& |
309 | 0 | { |
310 | 0 | if (MaybeDestroy(TInputBlobs)) { |
311 | 0 | new (mozilla::KnownNotNull, ptr_InputBlobs()) InputBlobs; |
312 | 0 | } |
313 | 0 | (*(ptr_InputBlobs())) = aRhs; |
314 | 0 | mType = TInputBlobs; |
315 | 0 | return (*(this)); |
316 | 0 | } |
317 | | |
318 | | auto MaybeInputData::operator=(InputBlobs&& aRhs) -> MaybeInputData& |
319 | 0 | { |
320 | 0 | if (MaybeDestroy(TInputBlobs)) { |
321 | 0 | new (mozilla::KnownNotNull, ptr_InputBlobs()) InputBlobs; |
322 | 0 | } |
323 | 0 | (*(ptr_InputBlobs())) = std::move(aRhs); |
324 | 0 | mType = TInputBlobs; |
325 | 0 | return (*(this)); |
326 | 0 | } |
327 | | |
328 | | auto MaybeInputData::operator=(const InputDirectory& aRhs) -> MaybeInputData& |
329 | 0 | { |
330 | 0 | if (MaybeDestroy(TInputDirectory)) { |
331 | 0 | new (mozilla::KnownNotNull, ptr_InputDirectory()) InputDirectory; |
332 | 0 | } |
333 | 0 | (*(ptr_InputDirectory())) = aRhs; |
334 | 0 | mType = TInputDirectory; |
335 | 0 | return (*(this)); |
336 | 0 | } |
337 | | |
338 | | auto MaybeInputData::operator=(InputDirectory&& aRhs) -> MaybeInputData& |
339 | 0 | { |
340 | 0 | if (MaybeDestroy(TInputDirectory)) { |
341 | 0 | new (mozilla::KnownNotNull, ptr_InputDirectory()) InputDirectory; |
342 | 0 | } |
343 | 0 | (*(ptr_InputDirectory())) = std::move(aRhs); |
344 | 0 | mType = TInputDirectory; |
345 | 0 | return (*(this)); |
346 | 0 | } |
347 | | |
348 | | auto MaybeInputData::operator=(const void_t& aRhs) -> MaybeInputData& |
349 | 0 | { |
350 | 0 | if (MaybeDestroy(Tvoid_t)) { |
351 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
352 | 0 | } |
353 | 0 | (*(ptr_void_t())) = aRhs; |
354 | 0 | mType = Tvoid_t; |
355 | 0 | return (*(this)); |
356 | 0 | } |
357 | | |
358 | | auto MaybeInputData::operator=(void_t&& aRhs) -> MaybeInputData& |
359 | 0 | { |
360 | 0 | if (MaybeDestroy(Tvoid_t)) { |
361 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
362 | 0 | } |
363 | 0 | (*(ptr_void_t())) = std::move(aRhs); |
364 | 0 | mType = Tvoid_t; |
365 | 0 | return (*(this)); |
366 | 0 | } |
367 | | |
368 | | auto MaybeInputData::operator=(const MaybeInputData& aRhs) -> MaybeInputData& |
369 | 0 | { |
370 | 0 | (aRhs).AssertSanity(); |
371 | 0 | Type t = (aRhs).type(); |
372 | 0 | switch (t) { |
373 | 0 | case TInputBlobs: |
374 | 0 | { |
375 | 0 | if (MaybeDestroy(t)) { |
376 | 0 | new (mozilla::KnownNotNull, ptr_InputBlobs()) InputBlobs; |
377 | 0 | } |
378 | 0 | (*(ptr_InputBlobs())) = (aRhs).get_InputBlobs(); |
379 | 0 | break; |
380 | 0 | } |
381 | 0 | case TInputDirectory: |
382 | 0 | { |
383 | 0 | if (MaybeDestroy(t)) { |
384 | 0 | new (mozilla::KnownNotNull, ptr_InputDirectory()) InputDirectory; |
385 | 0 | } |
386 | 0 | (*(ptr_InputDirectory())) = (aRhs).get_InputDirectory(); |
387 | 0 | break; |
388 | 0 | } |
389 | 0 | case Tvoid_t: |
390 | 0 | { |
391 | 0 | if (MaybeDestroy(t)) { |
392 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
393 | 0 | } |
394 | 0 | (*(ptr_void_t())) = (aRhs).get_void_t(); |
395 | 0 | break; |
396 | 0 | } |
397 | 0 | case T__None: |
398 | 0 | { |
399 | 0 | static_cast<void>(MaybeDestroy(t)); |
400 | 0 | break; |
401 | 0 | } |
402 | 0 | default: |
403 | 0 | { |
404 | 0 | mozilla::ipc::LogicError("unreached"); |
405 | 0 | break; |
406 | 0 | } |
407 | 0 | } |
408 | 0 | mType = t; |
409 | 0 | return (*(this)); |
410 | 0 | } |
411 | | |
412 | | auto MaybeInputData::operator=(MaybeInputData&& aRhs) -> MaybeInputData& |
413 | 0 | { |
414 | 0 | (aRhs).AssertSanity(); |
415 | 0 | Type t = (aRhs).type(); |
416 | 0 | switch (t) { |
417 | 0 | case TInputBlobs: |
418 | 0 | { |
419 | 0 | if (MaybeDestroy(t)) { |
420 | 0 | new (mozilla::KnownNotNull, ptr_InputBlobs()) InputBlobs; |
421 | 0 | } |
422 | 0 | (*(ptr_InputBlobs())) = std::move((aRhs).get_InputBlobs()); |
423 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
424 | 0 | break; |
425 | 0 | } |
426 | 0 | case TInputDirectory: |
427 | 0 | { |
428 | 0 | if (MaybeDestroy(t)) { |
429 | 0 | new (mozilla::KnownNotNull, ptr_InputDirectory()) InputDirectory; |
430 | 0 | } |
431 | 0 | (*(ptr_InputDirectory())) = std::move((aRhs).get_InputDirectory()); |
432 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
433 | 0 | break; |
434 | 0 | } |
435 | 0 | case Tvoid_t: |
436 | 0 | { |
437 | 0 | if (MaybeDestroy(t)) { |
438 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
439 | 0 | } |
440 | 0 | (*(ptr_void_t())) = std::move((aRhs).get_void_t()); |
441 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
442 | 0 | break; |
443 | 0 | } |
444 | 0 | case T__None: |
445 | 0 | { |
446 | 0 | static_cast<void>(MaybeDestroy(t)); |
447 | 0 | break; |
448 | 0 | } |
449 | 0 | default: |
450 | 0 | { |
451 | 0 | mozilla::ipc::LogicError("unreached"); |
452 | 0 | break; |
453 | 0 | } |
454 | 0 | } |
455 | 0 | (aRhs).mType = T__None; |
456 | 0 | mType = t; |
457 | 0 | return (*(this)); |
458 | 0 | } |
459 | | |
460 | | auto MaybeInputData::operator==(const InputBlobs& aRhs) const -> bool |
461 | 0 | { |
462 | 0 | return (get_InputBlobs()) == (aRhs); |
463 | 0 | } |
464 | | |
465 | | auto MaybeInputData::operator==(const InputDirectory& aRhs) const -> bool |
466 | 0 | { |
467 | 0 | return (get_InputDirectory()) == (aRhs); |
468 | 0 | } |
469 | | |
470 | | auto MaybeInputData::operator==(const void_t& aRhs) const -> bool |
471 | 0 | { |
472 | 0 | return (get_void_t()) == (aRhs); |
473 | 0 | } |
474 | | |
475 | | auto MaybeInputData::operator==(const MaybeInputData& aRhs) const -> bool |
476 | 0 | { |
477 | 0 | if ((type()) != ((aRhs).type())) { |
478 | 0 | return false; |
479 | 0 | } |
480 | 0 | |
481 | 0 | switch (type()) { |
482 | 0 | case TInputBlobs: |
483 | 0 | { |
484 | 0 | return (get_InputBlobs()) == ((aRhs).get_InputBlobs()); |
485 | 0 | } |
486 | 0 | case TInputDirectory: |
487 | 0 | { |
488 | 0 | return (get_InputDirectory()) == ((aRhs).get_InputDirectory()); |
489 | 0 | } |
490 | 0 | case Tvoid_t: |
491 | 0 | { |
492 | 0 | return (get_void_t()) == ((aRhs).get_void_t()); |
493 | 0 | } |
494 | 0 | default: |
495 | 0 | { |
496 | 0 | mozilla::ipc::LogicError("unreached"); |
497 | 0 | return false; |
498 | 0 | } |
499 | 0 | } |
500 | 0 | } |
501 | | |
502 | | auto MaybeInputData::get(InputBlobs* aOutValue) const -> void |
503 | 0 | { |
504 | 0 | (*(aOutValue)) = get_InputBlobs(); |
505 | 0 | } |
506 | | |
507 | | auto MaybeInputData::get(InputDirectory* aOutValue) const -> void |
508 | 0 | { |
509 | 0 | (*(aOutValue)) = get_InputDirectory(); |
510 | 0 | } |
511 | | |
512 | | auto MaybeInputData::get(void_t* aOutValue) const -> void |
513 | 0 | { |
514 | 0 | (*(aOutValue)) = get_void_t(); |
515 | 0 | } |
516 | | |
517 | | } // namespace dom |
518 | | } // namespace mozilla |
519 | | |
520 | | namespace mozilla { |
521 | | namespace ipc { |
522 | | auto IPDLParamTraits<mozilla::dom::MaybeInputData>::Write( |
523 | | IPC::Message* aMsg, |
524 | | mozilla::ipc::IProtocol* aActor, |
525 | | const paramType& aVar) -> void |
526 | | { |
527 | | typedef mozilla::dom::MaybeInputData union__; |
528 | | int type; |
529 | | type = (aVar).type(); |
530 | | WriteIPDLParam(aMsg, aActor, type); |
531 | | // Sentinel = 'MaybeInputData' |
532 | | (aMsg)->WriteSentinel(1327357166); |
533 | | |
534 | | switch (type) { |
535 | | case union__::TInputBlobs: |
536 | | { |
537 | | WriteIPDLParam(aMsg, aActor, (aVar).get_InputBlobs()); |
538 | | // Sentinel = 'TInputBlobs' |
539 | | (aMsg)->WriteSentinel(1636803371); |
540 | | return; |
541 | | } |
542 | | case union__::TInputDirectory: |
543 | | { |
544 | | WriteIPDLParam(aMsg, aActor, (aVar).get_InputDirectory()); |
545 | | // Sentinel = 'TInputDirectory' |
546 | | (aMsg)->WriteSentinel(4032479102); |
547 | | return; |
548 | | } |
549 | | case union__::Tvoid_t: |
550 | | { |
551 | | WriteIPDLParam(aMsg, aActor, (aVar).get_void_t()); |
552 | | // Sentinel = 'Tvoid_t' |
553 | | (aMsg)->WriteSentinel(3041273328); |
554 | | return; |
555 | | } |
556 | | default: |
557 | | { |
558 | | (aActor)->FatalError("unknown union type"); |
559 | | return; |
560 | | } |
561 | | } |
562 | | } |
563 | | |
564 | | auto IPDLParamTraits<mozilla::dom::MaybeInputData>::Read( |
565 | | const IPC::Message* aMsg, |
566 | | PickleIterator* aIter, |
567 | | mozilla::ipc::IProtocol* aActor, |
568 | | paramType* aVar) -> bool |
569 | 0 | { |
570 | 0 | typedef mozilla::dom::MaybeInputData union__; |
571 | 0 | int type; |
572 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) { |
573 | 0 | (aActor)->FatalError("Error deserializing type of union MaybeInputData"); |
574 | 0 | return false; |
575 | 0 | } |
576 | 0 | // Sentinel = 'MaybeInputData' |
577 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1327357166)))) { |
578 | 0 | mozilla::ipc::SentinelReadError("Error deserializing type of union MaybeInputData"); |
579 | 0 | return false; |
580 | 0 | } |
581 | 0 | |
582 | 0 | switch (type) { |
583 | 0 | case union__::TInputBlobs: |
584 | 0 | { |
585 | 0 | mozilla::dom::InputBlobs tmp = mozilla::dom::InputBlobs(); |
586 | 0 | (*(aVar)) = tmp; |
587 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_InputBlobs())))))) { |
588 | 0 | (aActor)->FatalError("Error deserializing variant TInputBlobs of union MaybeInputData"); |
589 | 0 | return false; |
590 | 0 | } |
591 | 0 | // Sentinel = 'TInputBlobs' |
592 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1636803371)))) { |
593 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TInputBlobs of union MaybeInputData"); |
594 | 0 | return false; |
595 | 0 | } |
596 | 0 | return true; |
597 | 0 | } |
598 | 0 | case union__::TInputDirectory: |
599 | 0 | { |
600 | 0 | mozilla::dom::InputDirectory tmp = mozilla::dom::InputDirectory(); |
601 | 0 | (*(aVar)) = tmp; |
602 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_InputDirectory())))))) { |
603 | 0 | (aActor)->FatalError("Error deserializing variant TInputDirectory of union MaybeInputData"); |
604 | 0 | return false; |
605 | 0 | } |
606 | 0 | // Sentinel = 'TInputDirectory' |
607 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4032479102)))) { |
608 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TInputDirectory of union MaybeInputData"); |
609 | 0 | return false; |
610 | 0 | } |
611 | 0 | return true; |
612 | 0 | } |
613 | 0 | case union__::Tvoid_t: |
614 | 0 | { |
615 | 0 | mozilla::void_t tmp = mozilla::void_t(); |
616 | 0 | (*(aVar)) = tmp; |
617 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_void_t())))))) { |
618 | 0 | (aActor)->FatalError("Error deserializing variant Tvoid_t of union MaybeInputData"); |
619 | 0 | return false; |
620 | 0 | } |
621 | 0 | // Sentinel = 'Tvoid_t' |
622 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3041273328)))) { |
623 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant Tvoid_t of union MaybeInputData"); |
624 | 0 | return false; |
625 | 0 | } |
626 | 0 | return true; |
627 | 0 | } |
628 | 0 | default: |
629 | 0 | { |
630 | 0 | (aActor)->FatalError("unknown union type"); |
631 | 0 | return false; |
632 | 0 | } |
633 | 0 | } |
634 | 0 | } |
635 | | |
636 | | } // namespace ipc |
637 | | } // namespace mozilla |