Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/PMessagePortParent.h"
8 : #include "ipc/IPCMessageUtils.h"
9 :
10 : #include "mozilla/ipc/PBackgroundParent.h"
11 : #include "mozilla/ipc/PChildToParentStreamParent.h"
12 : #include "mozilla/ipc/PFileDescriptorSetParent.h"
13 : #include "mozilla/ipc/PIPCBlobInputStreamParent.h"
14 : #include "mozilla/ipc/PParentToChildStreamParent.h"
15 :
16 : #include "nsIFile.h"
17 : #include "GeckoProfiler.h"
18 :
19 : namespace mozilla {
20 : namespace dom {
21 :
22 :
23 :
24 0 : MOZ_IMPLICIT PMessagePortParent::PMessagePortParent() :
25 : mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
26 0 : mState(PMessagePort::__Dead)
27 : {
28 0 : MOZ_COUNT_CTOR(PMessagePortParent);
29 0 : }
30 :
31 0 : PMessagePortParent::~PMessagePortParent()
32 : {
33 0 : MOZ_COUNT_DTOR(PMessagePortParent);
34 0 : }
35 :
36 0 : auto PMessagePortParent::Manager() const -> PBackgroundParent*
37 : {
38 0 : return static_cast<PBackgroundParent*>(IProtocol::Manager());
39 : }
40 :
41 0 : auto PMessagePortParent::SendEntangled(const nsTArray<ClonedMessageData>& messages) -> bool
42 : {
43 0 : IPC::Message* msg__ = PMessagePort::Msg_Entangled(Id());
44 :
45 0 : Write(messages, msg__);
46 : // Sentinel = 'messages'
47 0 : (msg__)->WriteSentinel(4217553644);
48 :
49 :
50 :
51 :
52 0 : if (mozilla::ipc::LoggingEnabledFor("PMessagePortParent")) {
53 0 : mozilla::ipc::LogMessageForProtocol("PMessagePortParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
54 : }
55 0 : AUTO_PROFILER_LABEL("PMessagePort::Msg_Entangled", OTHER);
56 0 : PMessagePort::Transition(PMessagePort::Msg_Entangled__ID, (&(mState)));
57 :
58 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
59 0 : return sendok__;
60 : }
61 :
62 0 : auto PMessagePortParent::SendReceiveData(const nsTArray<ClonedMessageData>& messages) -> bool
63 : {
64 0 : IPC::Message* msg__ = PMessagePort::Msg_ReceiveData(Id());
65 :
66 0 : Write(messages, msg__);
67 : // Sentinel = 'messages'
68 0 : (msg__)->WriteSentinel(4217553644);
69 :
70 :
71 :
72 :
73 0 : if (mozilla::ipc::LoggingEnabledFor("PMessagePortParent")) {
74 0 : mozilla::ipc::LogMessageForProtocol("PMessagePortParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
75 : }
76 0 : AUTO_PROFILER_LABEL("PMessagePort::Msg_ReceiveData", OTHER);
77 0 : PMessagePort::Transition(PMessagePort::Msg_ReceiveData__ID, (&(mState)));
78 :
79 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
80 0 : return sendok__;
81 : }
82 :
83 0 : auto PMessagePortParent::SendStopSendingDataConfirmed() -> bool
84 : {
85 0 : IPC::Message* msg__ = PMessagePort::Msg_StopSendingDataConfirmed(Id());
86 :
87 :
88 :
89 :
90 :
91 0 : if (mozilla::ipc::LoggingEnabledFor("PMessagePortParent")) {
92 0 : mozilla::ipc::LogMessageForProtocol("PMessagePortParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
93 : }
94 0 : AUTO_PROFILER_LABEL("PMessagePort::Msg_StopSendingDataConfirmed", OTHER);
95 0 : PMessagePort::Transition(PMessagePort::Msg_StopSendingDataConfirmed__ID, (&(mState)));
96 :
97 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
98 0 : return sendok__;
99 : }
100 :
101 0 : auto PMessagePortParent::Send__delete__(PMessagePortParent* actor) -> bool
102 : {
103 0 : if ((!(actor))) {
104 0 : return false;
105 : }
106 :
107 0 : IPC::Message* msg__ = PMessagePort::Msg___delete__((actor)->Id());
108 :
109 0 : (actor)->Write(actor, msg__, false);
110 : // Sentinel = 'actor'
111 0 : (msg__)->WriteSentinel(875202478);
112 :
113 :
114 :
115 0 : if (mozilla::ipc::LoggingEnabledFor("PMessagePortParent")) {
116 0 : mozilla::ipc::LogMessageForProtocol("PMessagePortParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
117 : }
118 0 : AUTO_PROFILER_LABEL("PMessagePort::Msg___delete__", OTHER);
119 0 : PMessagePort::Transition(PMessagePort::Msg___delete____ID, (&((actor)->mState)));
120 :
121 0 : bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
122 :
123 0 : IProtocol* mgr = (actor)->Manager();
124 0 : (actor)->DestroySubtree(Deletion);
125 0 : (actor)->DeallocSubtree();
126 0 : (mgr)->RemoveManagee(PMessagePortMsgStart, actor);
127 0 : return sendok__;
128 : }
129 :
130 0 : auto PMessagePortParent::RemoveManagee(
131 : int32_t aProtocolId,
132 : ProtocolBase* aListener) -> void
133 : {
134 0 : FatalError("unreached");
135 0 : return;
136 : }
137 :
138 0 : auto PMessagePortParent::OnMessageReceived(const Message& msg__) -> PMessagePortParent::Result
139 : {
140 0 : switch ((msg__).type()) {
141 : case PMessagePort::Msg_PostMessages__ID:
142 : {
143 0 : if (mozilla::ipc::LoggingEnabledFor("PMessagePortParent")) {
144 0 : mozilla::ipc::LogMessageForProtocol("PMessagePortParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
145 : }
146 0 : AUTO_PROFILER_LABEL("PMessagePort::Msg_PostMessages", OTHER);
147 :
148 0 : PickleIterator iter__(msg__);
149 0 : nsTArray<ClonedMessageData> messages;
150 :
151 0 : if ((!(Read((&(messages)), (&(msg__)), (&(iter__)))))) {
152 0 : FatalError("Error deserializing 'nsTArray'");
153 0 : return MsgValueError;
154 : }
155 : // Sentinel = 'messages'
156 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4217553644)))) {
157 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'");
158 0 : return MsgValueError;
159 : }
160 0 : (msg__).EndRead(iter__, (msg__).type());
161 0 : PMessagePort::Transition(PMessagePort::Msg_PostMessages__ID, (&(mState)));
162 0 : if ((!(RecvPostMessages(mozilla::Move(messages))))) {
163 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
164 : // Error handled in mozilla::ipc::IPCResult
165 0 : return MsgProcessingError;
166 : }
167 :
168 0 : return MsgProcessed;
169 : }
170 : case PMessagePort::Msg_Disentangle__ID:
171 : {
172 0 : if (mozilla::ipc::LoggingEnabledFor("PMessagePortParent")) {
173 0 : mozilla::ipc::LogMessageForProtocol("PMessagePortParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
174 : }
175 0 : AUTO_PROFILER_LABEL("PMessagePort::Msg_Disentangle", OTHER);
176 :
177 0 : PickleIterator iter__(msg__);
178 0 : nsTArray<ClonedMessageData> messages;
179 :
180 0 : if ((!(Read((&(messages)), (&(msg__)), (&(iter__)))))) {
181 0 : FatalError("Error deserializing 'nsTArray'");
182 0 : return MsgValueError;
183 : }
184 : // Sentinel = 'messages'
185 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4217553644)))) {
186 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'");
187 0 : return MsgValueError;
188 : }
189 0 : (msg__).EndRead(iter__, (msg__).type());
190 0 : PMessagePort::Transition(PMessagePort::Msg_Disentangle__ID, (&(mState)));
191 0 : if ((!(RecvDisentangle(mozilla::Move(messages))))) {
192 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
193 : // Error handled in mozilla::ipc::IPCResult
194 0 : return MsgProcessingError;
195 : }
196 :
197 0 : return MsgProcessed;
198 : }
199 : case PMessagePort::Msg_StopSendingData__ID:
200 : {
201 0 : if (mozilla::ipc::LoggingEnabledFor("PMessagePortParent")) {
202 0 : mozilla::ipc::LogMessageForProtocol("PMessagePortParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
203 : }
204 0 : AUTO_PROFILER_LABEL("PMessagePort::Msg_StopSendingData", OTHER);
205 :
206 0 : PMessagePort::Transition(PMessagePort::Msg_StopSendingData__ID, (&(mState)));
207 0 : if ((!(RecvStopSendingData()))) {
208 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
209 : // Error handled in mozilla::ipc::IPCResult
210 0 : return MsgProcessingError;
211 : }
212 :
213 0 : return MsgProcessed;
214 : }
215 : case PMessagePort::Msg_Close__ID:
216 : {
217 0 : if (mozilla::ipc::LoggingEnabledFor("PMessagePortParent")) {
218 0 : mozilla::ipc::LogMessageForProtocol("PMessagePortParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
219 : }
220 0 : AUTO_PROFILER_LABEL("PMessagePort::Msg_Close", OTHER);
221 :
222 0 : PMessagePort::Transition(PMessagePort::Msg_Close__ID, (&(mState)));
223 0 : if ((!(RecvClose()))) {
224 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
225 : // Error handled in mozilla::ipc::IPCResult
226 0 : return MsgProcessingError;
227 : }
228 :
229 0 : return MsgProcessed;
230 : }
231 : case PMessagePort::Reply___delete____ID:
232 : {
233 0 : return MsgProcessed;
234 : }
235 : default:
236 : {
237 0 : return MsgNotKnown;
238 : }
239 : }
240 : }
241 :
242 0 : auto PMessagePortParent::OnMessageReceived(
243 : const Message& msg__,
244 : Message*& reply__) -> PMessagePortParent::Result
245 : {
246 0 : return MsgNotKnown;
247 : }
248 :
249 0 : auto PMessagePortParent::OnCallReceived(
250 : const Message& msg__,
251 : Message*& reply__) -> PMessagePortParent::Result
252 : {
253 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
254 : return MsgNotKnown;
255 : }
256 :
257 0 : auto PMessagePortParent::GetProtocolTypeId() -> int32_t
258 : {
259 0 : return PMessagePortMsgStart;
260 : }
261 :
262 0 : auto PMessagePortParent::ProtocolName() const -> const char*
263 : {
264 0 : return "PMessagePortParent";
265 : }
266 :
267 0 : auto PMessagePortParent::DestroySubtree(ActorDestroyReason why) -> void
268 : {
269 : // Unregister from our manager.
270 0 : Unregister(Id());
271 :
272 : // Reject owning pending promises.
273 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
274 :
275 : // Finally, destroy "us".
276 0 : ActorDestroy(why);
277 0 : }
278 :
279 0 : auto PMessagePortParent::DeallocSubtree() -> void
280 : {
281 0 : }
282 :
283 0 : auto PMessagePortParent::Write(
284 : const nsTArray<InputStreamParams>& v__,
285 : Message* msg__) -> void
286 : {
287 0 : uint32_t length = (v__).Length();
288 0 : Write(length, msg__);
289 : // Sentinel = ('length', 'InputStreamParams[]')
290 0 : (msg__)->WriteSentinel(348334258);
291 :
292 0 : for (auto& elem : v__) {
293 0 : Write(elem, msg__);
294 : // Sentinel = 'InputStreamParams[]'
295 0 : (msg__)->WriteSentinel(2927715197);
296 : }
297 0 : }
298 :
299 0 : auto PMessagePortParent::Read(
300 : nsTArray<InputStreamParams>* v__,
301 : const Message* msg__,
302 : PickleIterator* iter__) -> bool
303 : {
304 0 : nsTArray<InputStreamParams> fa;
305 : uint32_t length;
306 0 : if ((!(Read((&(length)), msg__, iter__)))) {
307 0 : mozilla::ipc::ArrayLengthReadError("InputStreamParams[]");
308 0 : return false;
309 : }
310 : // Sentinel = ('length', 'InputStreamParams[]')
311 0 : if ((!((msg__)->ReadSentinel(iter__, 348334258)))) {
312 0 : mozilla::ipc::SentinelReadError("InputStreamParams[]");
313 0 : return false;
314 : }
315 :
316 0 : InputStreamParams* elems = (fa).AppendElements(length);
317 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
318 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
319 0 : FatalError("Error deserializing 'InputStreamParams[i]'");
320 0 : return false;
321 : }
322 : // Sentinel = 'InputStreamParams[]'
323 0 : if ((!((msg__)->ReadSentinel(iter__, 2927715197)))) {
324 0 : mozilla::ipc::SentinelReadError("Error deserializing 'InputStreamParams[i]'");
325 0 : return false;
326 : }
327 : }
328 0 : (v__)->SwapElements(fa);
329 0 : return true;
330 : }
331 :
332 0 : auto PMessagePortParent::Write(
333 : const nsTArray<FileDescriptor>& v__,
334 : Message* msg__) -> void
335 : {
336 0 : uint32_t length = (v__).Length();
337 0 : Write(length, msg__);
338 : // Sentinel = ('length', 'FileDescriptor[]')
339 0 : (msg__)->WriteSentinel(1697726450);
340 :
341 0 : for (auto& elem : v__) {
342 0 : Write(elem, msg__);
343 : // Sentinel = 'FileDescriptor[]'
344 0 : (msg__)->WriteSentinel(1630221245);
345 : }
346 0 : }
347 :
348 0 : auto PMessagePortParent::Read(
349 : nsTArray<FileDescriptor>* v__,
350 : const Message* msg__,
351 : PickleIterator* iter__) -> bool
352 : {
353 0 : nsTArray<FileDescriptor> fa;
354 : uint32_t length;
355 0 : if ((!(Read((&(length)), msg__, iter__)))) {
356 0 : mozilla::ipc::ArrayLengthReadError("FileDescriptor[]");
357 0 : return false;
358 : }
359 : // Sentinel = ('length', 'FileDescriptor[]')
360 0 : if ((!((msg__)->ReadSentinel(iter__, 1697726450)))) {
361 0 : mozilla::ipc::SentinelReadError("FileDescriptor[]");
362 0 : return false;
363 : }
364 :
365 0 : FileDescriptor* elems = (fa).AppendElements(length);
366 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
367 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
368 0 : FatalError("Error deserializing 'FileDescriptor[i]'");
369 0 : return false;
370 : }
371 : // Sentinel = 'FileDescriptor[]'
372 0 : if ((!((msg__)->ReadSentinel(iter__, 1630221245)))) {
373 0 : mozilla::ipc::SentinelReadError("Error deserializing 'FileDescriptor[i]'");
374 0 : return false;
375 : }
376 : }
377 0 : (v__)->SwapElements(fa);
378 0 : return true;
379 : }
380 :
381 0 : auto PMessagePortParent::Write(
382 : const nsTArray<MessagePortIdentifier>& v__,
383 : Message* msg__) -> void
384 : {
385 0 : uint32_t length = (v__).Length();
386 0 : Write(length, msg__);
387 : // Sentinel = ('length', 'MessagePortIdentifier[]')
388 0 : (msg__)->WriteSentinel(680130807);
389 :
390 0 : for (auto& elem : v__) {
391 0 : Write(elem, msg__);
392 : // Sentinel = 'MessagePortIdentifier[]'
393 0 : (msg__)->WriteSentinel(1200404786);
394 : }
395 0 : }
396 :
397 0 : auto PMessagePortParent::Read(
398 : nsTArray<MessagePortIdentifier>* v__,
399 : const Message* msg__,
400 : PickleIterator* iter__) -> bool
401 : {
402 0 : nsTArray<MessagePortIdentifier> fa;
403 : uint32_t length;
404 0 : if ((!(Read((&(length)), msg__, iter__)))) {
405 0 : mozilla::ipc::ArrayLengthReadError("MessagePortIdentifier[]");
406 0 : return false;
407 : }
408 : // Sentinel = ('length', 'MessagePortIdentifier[]')
409 0 : if ((!((msg__)->ReadSentinel(iter__, 680130807)))) {
410 0 : mozilla::ipc::SentinelReadError("MessagePortIdentifier[]");
411 0 : return false;
412 : }
413 :
414 0 : MessagePortIdentifier* elems = (fa).AppendElements(length);
415 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
416 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
417 0 : FatalError("Error deserializing 'MessagePortIdentifier[i]'");
418 0 : return false;
419 : }
420 : // Sentinel = 'MessagePortIdentifier[]'
421 0 : if ((!((msg__)->ReadSentinel(iter__, 1200404786)))) {
422 0 : mozilla::ipc::SentinelReadError("Error deserializing 'MessagePortIdentifier[i]'");
423 0 : return false;
424 : }
425 : }
426 0 : (v__)->SwapElements(fa);
427 0 : return true;
428 : }
429 :
430 0 : auto PMessagePortParent::Write(
431 : const OptionalInputStreamParams& v__,
432 : Message* msg__) -> void
433 : {
434 : typedef OptionalInputStreamParams type__;
435 0 : Write(int((v__).type()), msg__);
436 : // Sentinel = 'OptionalInputStreamParams'
437 0 : (msg__)->WriteSentinel(1355174443);
438 :
439 0 : switch ((v__).type()) {
440 : case type__::Tvoid_t:
441 : {
442 0 : Write((v__).get_void_t(), msg__);
443 : // Sentinel = 'Tvoid_t'
444 0 : (msg__)->WriteSentinel(3041273328);
445 0 : return;
446 : }
447 : case type__::TInputStreamParams:
448 : {
449 0 : Write((v__).get_InputStreamParams(), msg__);
450 : // Sentinel = 'TInputStreamParams'
451 0 : (msg__)->WriteSentinel(55652096);
452 0 : return;
453 : }
454 : default:
455 : {
456 0 : FatalError("unknown union type");
457 0 : return;
458 : }
459 : }
460 : }
461 :
462 0 : auto PMessagePortParent::Read(
463 : OptionalInputStreamParams* v__,
464 : const Message* msg__,
465 : PickleIterator* iter__) -> bool
466 : {
467 : typedef OptionalInputStreamParams type__;
468 : int type;
469 0 : if ((!(Read((&(type)), msg__, iter__)))) {
470 0 : mozilla::ipc::UnionTypeReadError("OptionalInputStreamParams");
471 0 : return false;
472 : }
473 : // Sentinel = 'OptionalInputStreamParams'
474 0 : if ((!((msg__)->ReadSentinel(iter__, 1355174443)))) {
475 0 : mozilla::ipc::SentinelReadError("OptionalInputStreamParams");
476 0 : return false;
477 : }
478 :
479 0 : switch (type) {
480 : case type__::Tvoid_t:
481 : {
482 : void_t tmp = void_t();
483 0 : (*(v__)) = tmp;
484 0 : if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
485 0 : FatalError("Error deserializing Union type");
486 0 : return false;
487 : }
488 : // Sentinel = 'Tvoid_t'
489 0 : if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
490 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
491 0 : return false;
492 : }
493 0 : return true;
494 : }
495 : case type__::TInputStreamParams:
496 : {
497 0 : InputStreamParams tmp = InputStreamParams();
498 0 : (*(v__)) = tmp;
499 0 : if ((!(Read((&((v__)->get_InputStreamParams())), msg__, iter__)))) {
500 0 : FatalError("Error deserializing Union type");
501 0 : return false;
502 : }
503 : // Sentinel = 'TInputStreamParams'
504 0 : if ((!((msg__)->ReadSentinel(iter__, 55652096)))) {
505 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
506 0 : return false;
507 : }
508 0 : return true;
509 : }
510 : default:
511 : {
512 0 : FatalError("unknown union type");
513 0 : return false;
514 : }
515 : }
516 : }
517 :
518 0 : auto PMessagePortParent::Write(
519 : const IPCRemoteStream& v__,
520 : Message* msg__) -> void
521 : {
522 0 : Write((v__).delayedStart(), msg__);
523 : // Sentinel = 'delayedStart'
524 0 : (msg__)->WriteSentinel(1491822294);
525 0 : Write((v__).stream(), msg__);
526 : // Sentinel = 'stream'
527 0 : (msg__)->WriteSentinel(4152748422);
528 0 : }
529 :
530 0 : auto PMessagePortParent::Read(
531 : IPCRemoteStream* v__,
532 : const Message* msg__,
533 : PickleIterator* iter__) -> bool
534 : {
535 0 : if ((!(Read((&((v__)->delayedStart())), msg__, iter__)))) {
536 0 : FatalError("Error deserializing 'delayedStart' (bool) member of 'IPCRemoteStream'");
537 0 : return false;
538 : }
539 : // Sentinel = 'delayedStart'
540 0 : if ((!((msg__)->ReadSentinel(iter__, 1491822294)))) {
541 0 : mozilla::ipc::SentinelReadError("Error deserializing 'delayedStart' (bool) member of 'IPCRemoteStream'");
542 0 : return false;
543 : }
544 0 : if ((!(Read((&((v__)->stream())), msg__, iter__)))) {
545 0 : FatalError("Error deserializing 'stream' (IPCRemoteStreamType) member of 'IPCRemoteStream'");
546 0 : return false;
547 : }
548 : // Sentinel = 'stream'
549 0 : if ((!((msg__)->ReadSentinel(iter__, 4152748422)))) {
550 0 : mozilla::ipc::SentinelReadError("Error deserializing 'stream' (IPCRemoteStreamType) member of 'IPCRemoteStream'");
551 0 : return false;
552 : }
553 0 : return true;
554 : }
555 :
556 0 : auto PMessagePortParent::Write(
557 : const FileInputStreamParams& v__,
558 : Message* msg__) -> void
559 : {
560 0 : Write((v__).fileDescriptorIndex(), msg__);
561 : // Sentinel = 'fileDescriptorIndex'
562 0 : (msg__)->WriteSentinel(587329112);
563 0 : Write((v__).behaviorFlags(), msg__);
564 : // Sentinel = 'behaviorFlags'
565 0 : (msg__)->WriteSentinel(2404401962);
566 0 : Write((v__).ioFlags(), msg__);
567 : // Sentinel = 'ioFlags'
568 0 : (msg__)->WriteSentinel(1483009730);
569 0 : }
570 :
571 0 : auto PMessagePortParent::Read(
572 : FileInputStreamParams* v__,
573 : const Message* msg__,
574 : PickleIterator* iter__) -> bool
575 : {
576 0 : if ((!(Read((&((v__)->fileDescriptorIndex())), msg__, iter__)))) {
577 0 : FatalError("Error deserializing 'fileDescriptorIndex' (uint32_t) member of 'FileInputStreamParams'");
578 0 : return false;
579 : }
580 : // Sentinel = 'fileDescriptorIndex'
581 0 : if ((!((msg__)->ReadSentinel(iter__, 587329112)))) {
582 0 : mozilla::ipc::SentinelReadError("Error deserializing 'fileDescriptorIndex' (uint32_t) member of 'FileInputStreamParams'");
583 0 : return false;
584 : }
585 0 : if ((!(Read((&((v__)->behaviorFlags())), msg__, iter__)))) {
586 0 : FatalError("Error deserializing 'behaviorFlags' (int32_t) member of 'FileInputStreamParams'");
587 0 : return false;
588 : }
589 : // Sentinel = 'behaviorFlags'
590 0 : if ((!((msg__)->ReadSentinel(iter__, 2404401962)))) {
591 0 : mozilla::ipc::SentinelReadError("Error deserializing 'behaviorFlags' (int32_t) member of 'FileInputStreamParams'");
592 0 : return false;
593 : }
594 0 : if ((!(Read((&((v__)->ioFlags())), msg__, iter__)))) {
595 0 : FatalError("Error deserializing 'ioFlags' (int32_t) member of 'FileInputStreamParams'");
596 0 : return false;
597 : }
598 : // Sentinel = 'ioFlags'
599 0 : if ((!((msg__)->ReadSentinel(iter__, 1483009730)))) {
600 0 : mozilla::ipc::SentinelReadError("Error deserializing 'ioFlags' (int32_t) member of 'FileInputStreamParams'");
601 0 : return false;
602 : }
603 0 : return true;
604 : }
605 :
606 0 : auto PMessagePortParent::Write(
607 : const IPCBlobInputStreamParams& v__,
608 : Message* msg__) -> void
609 : {
610 0 : Write((v__).id(), msg__);
611 : // Sentinel = 'id'
612 0 : (msg__)->WriteSentinel(2794505629);
613 0 : }
614 :
615 0 : auto PMessagePortParent::Read(
616 : IPCBlobInputStreamParams* v__,
617 : const Message* msg__,
618 : PickleIterator* iter__) -> bool
619 : {
620 0 : if ((!(Read((&((v__)->id())), msg__, iter__)))) {
621 0 : FatalError("Error deserializing 'id' (nsID) member of 'IPCBlobInputStreamParams'");
622 0 : return false;
623 : }
624 : // Sentinel = 'id'
625 0 : if ((!((msg__)->ReadSentinel(iter__, 2794505629)))) {
626 0 : mozilla::ipc::SentinelReadError("Error deserializing 'id' (nsID) member of 'IPCBlobInputStreamParams'");
627 0 : return false;
628 : }
629 0 : return true;
630 : }
631 :
632 0 : auto PMessagePortParent::Write(
633 : const IPCFile& v__,
634 : Message* msg__) -> void
635 : {
636 0 : Write((v__).name(), msg__);
637 : // Sentinel = 'name'
638 0 : (msg__)->WriteSentinel(15034981);
639 0 : Write((v__).lastModified(), msg__);
640 : // Sentinel = 'lastModified'
641 0 : (msg__)->WriteSentinel(3456113257);
642 0 : Write((v__).DOMPath(), msg__);
643 : // Sentinel = 'DOMPath'
644 0 : (msg__)->WriteSentinel(1724352494);
645 0 : Write((v__).fullPath(), msg__);
646 : // Sentinel = 'fullPath'
647 0 : (msg__)->WriteSentinel(385652698);
648 0 : Write((v__).isDirectory(), msg__);
649 : // Sentinel = 'isDirectory'
650 0 : (msg__)->WriteSentinel(2309743506);
651 0 : }
652 :
653 0 : auto PMessagePortParent::Read(
654 : IPCFile* v__,
655 : const Message* msg__,
656 : PickleIterator* iter__) -> bool
657 : {
658 0 : if ((!(Read((&((v__)->name())), msg__, iter__)))) {
659 0 : FatalError("Error deserializing 'name' (nsString) member of 'IPCFile'");
660 0 : return false;
661 : }
662 : // Sentinel = 'name'
663 0 : if ((!((msg__)->ReadSentinel(iter__, 15034981)))) {
664 0 : mozilla::ipc::SentinelReadError("Error deserializing 'name' (nsString) member of 'IPCFile'");
665 0 : return false;
666 : }
667 0 : if ((!(Read((&((v__)->lastModified())), msg__, iter__)))) {
668 0 : FatalError("Error deserializing 'lastModified' (int64_t) member of 'IPCFile'");
669 0 : return false;
670 : }
671 : // Sentinel = 'lastModified'
672 0 : if ((!((msg__)->ReadSentinel(iter__, 3456113257)))) {
673 0 : mozilla::ipc::SentinelReadError("Error deserializing 'lastModified' (int64_t) member of 'IPCFile'");
674 0 : return false;
675 : }
676 0 : if ((!(Read((&((v__)->DOMPath())), msg__, iter__)))) {
677 0 : FatalError("Error deserializing 'DOMPath' (nsString) member of 'IPCFile'");
678 0 : return false;
679 : }
680 : // Sentinel = 'DOMPath'
681 0 : if ((!((msg__)->ReadSentinel(iter__, 1724352494)))) {
682 0 : mozilla::ipc::SentinelReadError("Error deserializing 'DOMPath' (nsString) member of 'IPCFile'");
683 0 : return false;
684 : }
685 0 : if ((!(Read((&((v__)->fullPath())), msg__, iter__)))) {
686 0 : FatalError("Error deserializing 'fullPath' (nsString) member of 'IPCFile'");
687 0 : return false;
688 : }
689 : // Sentinel = 'fullPath'
690 0 : if ((!((msg__)->ReadSentinel(iter__, 385652698)))) {
691 0 : mozilla::ipc::SentinelReadError("Error deserializing 'fullPath' (nsString) member of 'IPCFile'");
692 0 : return false;
693 : }
694 0 : if ((!(Read((&((v__)->isDirectory())), msg__, iter__)))) {
695 0 : FatalError("Error deserializing 'isDirectory' (bool) member of 'IPCFile'");
696 0 : return false;
697 : }
698 : // Sentinel = 'isDirectory'
699 0 : if ((!((msg__)->ReadSentinel(iter__, 2309743506)))) {
700 0 : mozilla::ipc::SentinelReadError("Error deserializing 'isDirectory' (bool) member of 'IPCFile'");
701 0 : return false;
702 : }
703 0 : return true;
704 : }
705 :
706 0 : auto PMessagePortParent::Write(
707 : const IPCFileUnion& v__,
708 : Message* msg__) -> void
709 : {
710 : typedef IPCFileUnion type__;
711 0 : Write(int((v__).type()), msg__);
712 : // Sentinel = 'IPCFileUnion'
713 0 : (msg__)->WriteSentinel(1913022529);
714 :
715 0 : switch ((v__).type()) {
716 : case type__::Tvoid_t:
717 : {
718 0 : Write((v__).get_void_t(), msg__);
719 : // Sentinel = 'Tvoid_t'
720 0 : (msg__)->WriteSentinel(3041273328);
721 0 : return;
722 : }
723 : case type__::TIPCFile:
724 : {
725 0 : Write((v__).get_IPCFile(), msg__);
726 : // Sentinel = 'TIPCFile'
727 0 : (msg__)->WriteSentinel(3562676876);
728 0 : return;
729 : }
730 : default:
731 : {
732 0 : FatalError("unknown union type");
733 0 : return;
734 : }
735 : }
736 : }
737 :
738 0 : auto PMessagePortParent::Read(
739 : IPCFileUnion* v__,
740 : const Message* msg__,
741 : PickleIterator* iter__) -> bool
742 : {
743 : typedef IPCFileUnion type__;
744 : int type;
745 0 : if ((!(Read((&(type)), msg__, iter__)))) {
746 0 : mozilla::ipc::UnionTypeReadError("IPCFileUnion");
747 0 : return false;
748 : }
749 : // Sentinel = 'IPCFileUnion'
750 0 : if ((!((msg__)->ReadSentinel(iter__, 1913022529)))) {
751 0 : mozilla::ipc::SentinelReadError("IPCFileUnion");
752 0 : return false;
753 : }
754 :
755 0 : switch (type) {
756 : case type__::Tvoid_t:
757 : {
758 : void_t tmp = void_t();
759 0 : (*(v__)) = tmp;
760 0 : if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
761 0 : FatalError("Error deserializing Union type");
762 0 : return false;
763 : }
764 : // Sentinel = 'Tvoid_t'
765 0 : if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
766 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
767 0 : return false;
768 : }
769 0 : return true;
770 : }
771 : case type__::TIPCFile:
772 : {
773 0 : IPCFile tmp = IPCFile();
774 0 : (*(v__)) = tmp;
775 0 : if ((!(Read((&((v__)->get_IPCFile())), msg__, iter__)))) {
776 0 : FatalError("Error deserializing Union type");
777 0 : return false;
778 : }
779 : // Sentinel = 'TIPCFile'
780 0 : if ((!((msg__)->ReadSentinel(iter__, 3562676876)))) {
781 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
782 0 : return false;
783 : }
784 0 : return true;
785 : }
786 : default:
787 : {
788 0 : FatalError("unknown union type");
789 0 : return false;
790 : }
791 : }
792 : }
793 :
794 0 : auto PMessagePortParent::Write(
795 : const PMessagePortParent* v__,
796 : Message* msg__,
797 : bool nullable__) -> void
798 : {
799 : int32_t id;
800 0 : if ((!(v__))) {
801 0 : if ((!(nullable__))) {
802 0 : FatalError("NULL actor value passed to non-nullable param");
803 : }
804 0 : id = 0;
805 : }
806 : else {
807 0 : id = (v__)->Id();
808 0 : if ((1) == (id)) {
809 0 : FatalError("actor has been |delete|d");
810 : }
811 : }
812 :
813 0 : Write(id, msg__);
814 0 : }
815 :
816 0 : auto PMessagePortParent::Read(
817 : PMessagePortParent** v__,
818 : const Message* msg__,
819 : PickleIterator* iter__,
820 : bool nullable__) -> bool
821 : {
822 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PMessagePort", PMessagePortMsgStart);
823 0 : if ((actor).isNothing()) {
824 0 : return false;
825 : }
826 :
827 0 : (*(v__)) = static_cast<PMessagePortParent*>((actor).value());
828 0 : return true;
829 : }
830 :
831 0 : auto PMessagePortParent::Write(
832 : const MessagePortIdentifier& v__,
833 : Message* msg__) -> void
834 : {
835 0 : Write((v__).uuid(), msg__);
836 : // Sentinel = 'uuid'
837 0 : (msg__)->WriteSentinel(1982267941);
838 0 : Write((v__).destinationUuid(), msg__);
839 : // Sentinel = 'destinationUuid'
840 0 : (msg__)->WriteSentinel(372087918);
841 0 : Write((v__).sequenceId(), msg__);
842 : // Sentinel = 'sequenceId'
843 0 : (msg__)->WriteSentinel(2743535618);
844 0 : Write((v__).neutered(), msg__);
845 : // Sentinel = 'neutered'
846 0 : (msg__)->WriteSentinel(520678014);
847 0 : }
848 :
849 0 : auto PMessagePortParent::Read(
850 : MessagePortIdentifier* v__,
851 : const Message* msg__,
852 : PickleIterator* iter__) -> bool
853 : {
854 0 : if ((!(Read((&((v__)->uuid())), msg__, iter__)))) {
855 0 : FatalError("Error deserializing 'uuid' (nsID) member of 'MessagePortIdentifier'");
856 0 : return false;
857 : }
858 : // Sentinel = 'uuid'
859 0 : if ((!((msg__)->ReadSentinel(iter__, 1982267941)))) {
860 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uuid' (nsID) member of 'MessagePortIdentifier'");
861 0 : return false;
862 : }
863 0 : if ((!(Read((&((v__)->destinationUuid())), msg__, iter__)))) {
864 0 : FatalError("Error deserializing 'destinationUuid' (nsID) member of 'MessagePortIdentifier'");
865 0 : return false;
866 : }
867 : // Sentinel = 'destinationUuid'
868 0 : if ((!((msg__)->ReadSentinel(iter__, 372087918)))) {
869 0 : mozilla::ipc::SentinelReadError("Error deserializing 'destinationUuid' (nsID) member of 'MessagePortIdentifier'");
870 0 : return false;
871 : }
872 0 : if ((!(Read((&((v__)->sequenceId())), msg__, iter__)))) {
873 0 : FatalError("Error deserializing 'sequenceId' (uint32_t) member of 'MessagePortIdentifier'");
874 0 : return false;
875 : }
876 : // Sentinel = 'sequenceId'
877 0 : if ((!((msg__)->ReadSentinel(iter__, 2743535618)))) {
878 0 : mozilla::ipc::SentinelReadError("Error deserializing 'sequenceId' (uint32_t) member of 'MessagePortIdentifier'");
879 0 : return false;
880 : }
881 0 : if ((!(Read((&((v__)->neutered())), msg__, iter__)))) {
882 0 : FatalError("Error deserializing 'neutered' (bool) member of 'MessagePortIdentifier'");
883 0 : return false;
884 : }
885 : // Sentinel = 'neutered'
886 0 : if ((!((msg__)->ReadSentinel(iter__, 520678014)))) {
887 0 : mozilla::ipc::SentinelReadError("Error deserializing 'neutered' (bool) member of 'MessagePortIdentifier'");
888 0 : return false;
889 : }
890 0 : return true;
891 : }
892 :
893 0 : auto PMessagePortParent::Write(
894 : const InputStreamParamsWithFds& v__,
895 : Message* msg__) -> void
896 : {
897 0 : Write((v__).stream(), msg__);
898 : // Sentinel = 'stream'
899 0 : (msg__)->WriteSentinel(4152748422);
900 0 : Write((v__).optionalFds(), msg__);
901 : // Sentinel = 'optionalFds'
902 0 : (msg__)->WriteSentinel(1021803302);
903 0 : }
904 :
905 0 : auto PMessagePortParent::Read(
906 : InputStreamParamsWithFds* v__,
907 : const Message* msg__,
908 : PickleIterator* iter__) -> bool
909 : {
910 0 : if ((!(Read((&((v__)->stream())), msg__, iter__)))) {
911 0 : FatalError("Error deserializing 'stream' (InputStreamParams) member of 'InputStreamParamsWithFds'");
912 0 : return false;
913 : }
914 : // Sentinel = 'stream'
915 0 : if ((!((msg__)->ReadSentinel(iter__, 4152748422)))) {
916 0 : mozilla::ipc::SentinelReadError("Error deserializing 'stream' (InputStreamParams) member of 'InputStreamParamsWithFds'");
917 0 : return false;
918 : }
919 0 : if ((!(Read((&((v__)->optionalFds())), msg__, iter__)))) {
920 0 : FatalError("Error deserializing 'optionalFds' (OptionalFileDescriptorSet) member of 'InputStreamParamsWithFds'");
921 0 : return false;
922 : }
923 : // Sentinel = 'optionalFds'
924 0 : if ((!((msg__)->ReadSentinel(iter__, 1021803302)))) {
925 0 : mozilla::ipc::SentinelReadError("Error deserializing 'optionalFds' (OptionalFileDescriptorSet) member of 'InputStreamParamsWithFds'");
926 0 : return false;
927 : }
928 0 : return true;
929 : }
930 :
931 0 : auto PMessagePortParent::Write(
932 : const IPCBlobStream& v__,
933 : Message* msg__) -> void
934 : {
935 : typedef IPCBlobStream type__;
936 0 : Write(int((v__).type()), msg__);
937 : // Sentinel = 'IPCBlobStream'
938 0 : (msg__)->WriteSentinel(2926762354);
939 :
940 0 : switch ((v__).type()) {
941 : case type__::TPIPCBlobInputStreamParent:
942 : {
943 0 : Write((v__).get_PIPCBlobInputStreamParent(), msg__, false);
944 : // Sentinel = 'TPIPCBlobInputStreamParent'
945 0 : (msg__)->WriteSentinel(2944059743);
946 0 : return;
947 : }
948 : case type__::TPIPCBlobInputStreamChild:
949 : {
950 0 : FatalError("wrong side!");
951 0 : return;
952 : }
953 : case type__::TIPCStream:
954 : {
955 0 : Write((v__).get_IPCStream(), msg__);
956 : // Sentinel = 'TIPCStream'
957 0 : (msg__)->WriteSentinel(40701900);
958 0 : return;
959 : }
960 : default:
961 : {
962 0 : FatalError("unknown union type");
963 0 : return;
964 : }
965 : }
966 : }
967 :
968 0 : auto PMessagePortParent::Read(
969 : IPCBlobStream* v__,
970 : const Message* msg__,
971 : PickleIterator* iter__) -> bool
972 : {
973 : typedef IPCBlobStream type__;
974 : int type;
975 0 : if ((!(Read((&(type)), msg__, iter__)))) {
976 0 : mozilla::ipc::UnionTypeReadError("IPCBlobStream");
977 0 : return false;
978 : }
979 : // Sentinel = 'IPCBlobStream'
980 0 : if ((!((msg__)->ReadSentinel(iter__, 2926762354)))) {
981 0 : mozilla::ipc::SentinelReadError("IPCBlobStream");
982 0 : return false;
983 : }
984 :
985 0 : switch (type) {
986 : case type__::TPIPCBlobInputStreamParent:
987 : {
988 0 : return false;
989 : }
990 : case type__::TPIPCBlobInputStreamChild:
991 : {
992 0 : PIPCBlobInputStreamParent* tmp = nullptr;
993 0 : (*(v__)) = tmp;
994 0 : if ((!(Read((&((v__)->get_PIPCBlobInputStreamParent())), msg__, iter__, false)))) {
995 0 : FatalError("Error deserializing Union type");
996 0 : return false;
997 : }
998 : // Sentinel = 'TPIPCBlobInputStreamChild'
999 0 : if ((!((msg__)->ReadSentinel(iter__, 3349556844)))) {
1000 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1001 0 : return false;
1002 : }
1003 0 : return true;
1004 : }
1005 : case type__::TIPCStream:
1006 : {
1007 0 : IPCStream tmp = IPCStream();
1008 0 : (*(v__)) = tmp;
1009 0 : if ((!(Read((&((v__)->get_IPCStream())), msg__, iter__)))) {
1010 0 : FatalError("Error deserializing Union type");
1011 0 : return false;
1012 : }
1013 : // Sentinel = 'TIPCStream'
1014 0 : if ((!((msg__)->ReadSentinel(iter__, 40701900)))) {
1015 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1016 0 : return false;
1017 : }
1018 0 : return true;
1019 : }
1020 : default:
1021 : {
1022 0 : FatalError("unknown union type");
1023 0 : return false;
1024 : }
1025 : }
1026 : }
1027 :
1028 0 : auto PMessagePortParent::Write(
1029 : const nsTArray<IPCBlob>& v__,
1030 : Message* msg__) -> void
1031 : {
1032 0 : uint32_t length = (v__).Length();
1033 0 : Write(length, msg__);
1034 : // Sentinel = ('length', 'IPCBlob[]')
1035 0 : (msg__)->WriteSentinel(894413667);
1036 :
1037 0 : for (auto& elem : v__) {
1038 0 : Write(elem, msg__);
1039 : // Sentinel = 'IPCBlob[]'
1040 0 : (msg__)->WriteSentinel(3337464726);
1041 : }
1042 0 : }
1043 :
1044 0 : auto PMessagePortParent::Read(
1045 : nsTArray<IPCBlob>* v__,
1046 : const Message* msg__,
1047 : PickleIterator* iter__) -> bool
1048 : {
1049 0 : nsTArray<IPCBlob> fa;
1050 : uint32_t length;
1051 0 : if ((!(Read((&(length)), msg__, iter__)))) {
1052 0 : mozilla::ipc::ArrayLengthReadError("IPCBlob[]");
1053 0 : return false;
1054 : }
1055 : // Sentinel = ('length', 'IPCBlob[]')
1056 0 : if ((!((msg__)->ReadSentinel(iter__, 894413667)))) {
1057 0 : mozilla::ipc::SentinelReadError("IPCBlob[]");
1058 0 : return false;
1059 : }
1060 :
1061 0 : IPCBlob* elems = (fa).AppendElements(length);
1062 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
1063 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
1064 0 : FatalError("Error deserializing 'IPCBlob[i]'");
1065 0 : return false;
1066 : }
1067 : // Sentinel = 'IPCBlob[]'
1068 0 : if ((!((msg__)->ReadSentinel(iter__, 3337464726)))) {
1069 0 : mozilla::ipc::SentinelReadError("Error deserializing 'IPCBlob[i]'");
1070 0 : return false;
1071 : }
1072 : }
1073 0 : (v__)->SwapElements(fa);
1074 0 : return true;
1075 : }
1076 :
1077 0 : auto PMessagePortParent::Write(
1078 : const ClonedMessageData& v__,
1079 : Message* msg__) -> void
1080 : {
1081 0 : Write((v__).data(), msg__);
1082 : // Sentinel = 'data'
1083 0 : (msg__)->WriteSentinel(843352540);
1084 0 : Write((v__).blobs(), msg__);
1085 : // Sentinel = 'blobs'
1086 0 : (msg__)->WriteSentinel(635500709);
1087 0 : Write((v__).inputStreams(), msg__);
1088 : // Sentinel = 'inputStreams'
1089 0 : (msg__)->WriteSentinel(435739475);
1090 0 : Write((v__).identfiers(), msg__);
1091 : // Sentinel = 'identfiers'
1092 0 : (msg__)->WriteSentinel(3130566733);
1093 0 : }
1094 :
1095 0 : auto PMessagePortParent::Read(
1096 : ClonedMessageData* v__,
1097 : const Message* msg__,
1098 : PickleIterator* iter__) -> bool
1099 : {
1100 0 : if ((!(Read((&((v__)->data())), msg__, iter__)))) {
1101 0 : FatalError("Error deserializing 'data' (SerializedStructuredCloneBuffer) member of 'ClonedMessageData'");
1102 0 : return false;
1103 : }
1104 : // Sentinel = 'data'
1105 0 : if ((!((msg__)->ReadSentinel(iter__, 843352540)))) {
1106 0 : mozilla::ipc::SentinelReadError("Error deserializing 'data' (SerializedStructuredCloneBuffer) member of 'ClonedMessageData'");
1107 0 : return false;
1108 : }
1109 0 : if ((!(Read((&((v__)->blobs())), msg__, iter__)))) {
1110 0 : FatalError("Error deserializing 'blobs' (IPCBlob[]) member of 'ClonedMessageData'");
1111 0 : return false;
1112 : }
1113 : // Sentinel = 'blobs'
1114 0 : if ((!((msg__)->ReadSentinel(iter__, 635500709)))) {
1115 0 : mozilla::ipc::SentinelReadError("Error deserializing 'blobs' (IPCBlob[]) member of 'ClonedMessageData'");
1116 0 : return false;
1117 : }
1118 0 : if ((!(Read((&((v__)->inputStreams())), msg__, iter__)))) {
1119 0 : FatalError("Error deserializing 'inputStreams' (IPCStream[]) member of 'ClonedMessageData'");
1120 0 : return false;
1121 : }
1122 : // Sentinel = 'inputStreams'
1123 0 : if ((!((msg__)->ReadSentinel(iter__, 435739475)))) {
1124 0 : mozilla::ipc::SentinelReadError("Error deserializing 'inputStreams' (IPCStream[]) member of 'ClonedMessageData'");
1125 0 : return false;
1126 : }
1127 0 : if ((!(Read((&((v__)->identfiers())), msg__, iter__)))) {
1128 0 : FatalError("Error deserializing 'identfiers' (MessagePortIdentifier[]) member of 'ClonedMessageData'");
1129 0 : return false;
1130 : }
1131 : // Sentinel = 'identfiers'
1132 0 : if ((!((msg__)->ReadSentinel(iter__, 3130566733)))) {
1133 0 : mozilla::ipc::SentinelReadError("Error deserializing 'identfiers' (MessagePortIdentifier[]) member of 'ClonedMessageData'");
1134 0 : return false;
1135 : }
1136 0 : return true;
1137 : }
1138 :
1139 0 : auto PMessagePortParent::Write(
1140 : const nsTArray<HeaderEntry>& v__,
1141 : Message* msg__) -> void
1142 : {
1143 0 : uint32_t length = (v__).Length();
1144 0 : Write(length, msg__);
1145 : // Sentinel = ('length', 'HeaderEntry[]')
1146 0 : (msg__)->WriteSentinel(2689457705);
1147 :
1148 0 : for (auto& elem : v__) {
1149 0 : Write(elem, msg__);
1150 : // Sentinel = 'HeaderEntry[]'
1151 0 : (msg__)->WriteSentinel(454836120);
1152 : }
1153 0 : }
1154 :
1155 0 : auto PMessagePortParent::Read(
1156 : nsTArray<HeaderEntry>* v__,
1157 : const Message* msg__,
1158 : PickleIterator* iter__) -> bool
1159 : {
1160 0 : nsTArray<HeaderEntry> fa;
1161 : uint32_t length;
1162 0 : if ((!(Read((&(length)), msg__, iter__)))) {
1163 0 : mozilla::ipc::ArrayLengthReadError("HeaderEntry[]");
1164 0 : return false;
1165 : }
1166 : // Sentinel = ('length', 'HeaderEntry[]')
1167 0 : if ((!((msg__)->ReadSentinel(iter__, 2689457705)))) {
1168 0 : mozilla::ipc::SentinelReadError("HeaderEntry[]");
1169 0 : return false;
1170 : }
1171 :
1172 0 : HeaderEntry* elems = (fa).AppendElements(length);
1173 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
1174 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
1175 0 : FatalError("Error deserializing 'HeaderEntry[i]'");
1176 0 : return false;
1177 : }
1178 : // Sentinel = 'HeaderEntry[]'
1179 0 : if ((!((msg__)->ReadSentinel(iter__, 454836120)))) {
1180 0 : mozilla::ipc::SentinelReadError("Error deserializing 'HeaderEntry[i]'");
1181 0 : return false;
1182 : }
1183 : }
1184 0 : (v__)->SwapElements(fa);
1185 0 : return true;
1186 : }
1187 :
1188 0 : auto PMessagePortParent::Write(
1189 : const SlicedInputStreamParams& v__,
1190 : Message* msg__) -> void
1191 : {
1192 0 : Write((v__).stream(), msg__);
1193 : // Sentinel = 'stream'
1194 0 : (msg__)->WriteSentinel(4152748422);
1195 0 : Write((v__).start(), msg__);
1196 : // Sentinel = 'start'
1197 0 : (msg__)->WriteSentinel(2088644401);
1198 0 : Write((v__).length(), msg__);
1199 : // Sentinel = 'length'
1200 0 : (msg__)->WriteSentinel(1726618354);
1201 0 : Write((v__).curPos(), msg__);
1202 : // Sentinel = 'curPos'
1203 0 : (msg__)->WriteSentinel(4042140974);
1204 0 : Write((v__).closed(), msg__);
1205 : // Sentinel = 'closed'
1206 0 : (msg__)->WriteSentinel(561249462);
1207 0 : }
1208 :
1209 0 : auto PMessagePortParent::Read(
1210 : SlicedInputStreamParams* v__,
1211 : const Message* msg__,
1212 : PickleIterator* iter__) -> bool
1213 : {
1214 0 : if ((!(Read((&((v__)->stream())), msg__, iter__)))) {
1215 0 : FatalError("Error deserializing 'stream' (InputStreamParams) member of 'SlicedInputStreamParams'");
1216 0 : return false;
1217 : }
1218 : // Sentinel = 'stream'
1219 0 : if ((!((msg__)->ReadSentinel(iter__, 4152748422)))) {
1220 0 : mozilla::ipc::SentinelReadError("Error deserializing 'stream' (InputStreamParams) member of 'SlicedInputStreamParams'");
1221 0 : return false;
1222 : }
1223 0 : if ((!(Read((&((v__)->start())), msg__, iter__)))) {
1224 0 : FatalError("Error deserializing 'start' (uint64_t) member of 'SlicedInputStreamParams'");
1225 0 : return false;
1226 : }
1227 : // Sentinel = 'start'
1228 0 : if ((!((msg__)->ReadSentinel(iter__, 2088644401)))) {
1229 0 : mozilla::ipc::SentinelReadError("Error deserializing 'start' (uint64_t) member of 'SlicedInputStreamParams'");
1230 0 : return false;
1231 : }
1232 0 : if ((!(Read((&((v__)->length())), msg__, iter__)))) {
1233 0 : FatalError("Error deserializing 'length' (uint64_t) member of 'SlicedInputStreamParams'");
1234 0 : return false;
1235 : }
1236 : // Sentinel = 'length'
1237 0 : if ((!((msg__)->ReadSentinel(iter__, 1726618354)))) {
1238 0 : mozilla::ipc::SentinelReadError("Error deserializing 'length' (uint64_t) member of 'SlicedInputStreamParams'");
1239 0 : return false;
1240 : }
1241 0 : if ((!(Read((&((v__)->curPos())), msg__, iter__)))) {
1242 0 : FatalError("Error deserializing 'curPos' (uint64_t) member of 'SlicedInputStreamParams'");
1243 0 : return false;
1244 : }
1245 : // Sentinel = 'curPos'
1246 0 : if ((!((msg__)->ReadSentinel(iter__, 4042140974)))) {
1247 0 : mozilla::ipc::SentinelReadError("Error deserializing 'curPos' (uint64_t) member of 'SlicedInputStreamParams'");
1248 0 : return false;
1249 : }
1250 0 : if ((!(Read((&((v__)->closed())), msg__, iter__)))) {
1251 0 : FatalError("Error deserializing 'closed' (bool) member of 'SlicedInputStreamParams'");
1252 0 : return false;
1253 : }
1254 : // Sentinel = 'closed'
1255 0 : if ((!((msg__)->ReadSentinel(iter__, 561249462)))) {
1256 0 : mozilla::ipc::SentinelReadError("Error deserializing 'closed' (bool) member of 'SlicedInputStreamParams'");
1257 0 : return false;
1258 : }
1259 0 : return true;
1260 : }
1261 :
1262 0 : auto PMessagePortParent::Write(
1263 : const IPCRemoteStreamType& v__,
1264 : Message* msg__) -> void
1265 : {
1266 : typedef IPCRemoteStreamType type__;
1267 0 : Write(int((v__).type()), msg__);
1268 : // Sentinel = 'IPCRemoteStreamType'
1269 0 : (msg__)->WriteSentinel(391674895);
1270 :
1271 0 : switch ((v__).type()) {
1272 : case type__::TPChildToParentStreamParent:
1273 : {
1274 0 : Write((v__).get_PChildToParentStreamParent(), msg__, false);
1275 : // Sentinel = 'TPChildToParentStreamParent'
1276 0 : (msg__)->WriteSentinel(2724777622);
1277 0 : return;
1278 : }
1279 : case type__::TPChildToParentStreamChild:
1280 : {
1281 0 : FatalError("wrong side!");
1282 0 : return;
1283 : }
1284 : case type__::TPParentToChildStreamParent:
1285 : {
1286 0 : Write((v__).get_PParentToChildStreamParent(), msg__, false);
1287 : // Sentinel = 'TPParentToChildStreamParent'
1288 0 : (msg__)->WriteSentinel(3335986876);
1289 0 : return;
1290 : }
1291 : case type__::TPParentToChildStreamChild:
1292 : {
1293 0 : FatalError("wrong side!");
1294 0 : return;
1295 : }
1296 : default:
1297 : {
1298 0 : FatalError("unknown union type");
1299 0 : return;
1300 : }
1301 : }
1302 : }
1303 :
1304 0 : auto PMessagePortParent::Read(
1305 : IPCRemoteStreamType* v__,
1306 : const Message* msg__,
1307 : PickleIterator* iter__) -> bool
1308 : {
1309 : typedef IPCRemoteStreamType type__;
1310 : int type;
1311 0 : if ((!(Read((&(type)), msg__, iter__)))) {
1312 0 : mozilla::ipc::UnionTypeReadError("IPCRemoteStreamType");
1313 0 : return false;
1314 : }
1315 : // Sentinel = 'IPCRemoteStreamType'
1316 0 : if ((!((msg__)->ReadSentinel(iter__, 391674895)))) {
1317 0 : mozilla::ipc::SentinelReadError("IPCRemoteStreamType");
1318 0 : return false;
1319 : }
1320 :
1321 0 : switch (type) {
1322 : case type__::TPChildToParentStreamParent:
1323 : {
1324 0 : return false;
1325 : }
1326 : case type__::TPChildToParentStreamChild:
1327 : {
1328 0 : PChildToParentStreamParent* tmp = nullptr;
1329 0 : (*(v__)) = tmp;
1330 0 : if ((!(Read((&((v__)->get_PChildToParentStreamParent())), msg__, iter__, false)))) {
1331 0 : FatalError("Error deserializing Union type");
1332 0 : return false;
1333 : }
1334 : // Sentinel = 'TPChildToParentStreamChild'
1335 0 : if ((!((msg__)->ReadSentinel(iter__, 1882094295)))) {
1336 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1337 0 : return false;
1338 : }
1339 0 : return true;
1340 : }
1341 : case type__::TPParentToChildStreamParent:
1342 : {
1343 0 : return false;
1344 : }
1345 : case type__::TPParentToChildStreamChild:
1346 : {
1347 0 : PParentToChildStreamParent* tmp = nullptr;
1348 0 : (*(v__)) = tmp;
1349 0 : if ((!(Read((&((v__)->get_PParentToChildStreamParent())), msg__, iter__, false)))) {
1350 0 : FatalError("Error deserializing Union type");
1351 0 : return false;
1352 : }
1353 : // Sentinel = 'TPParentToChildStreamChild'
1354 0 : if ((!((msg__)->ReadSentinel(iter__, 190098493)))) {
1355 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1356 0 : return false;
1357 : }
1358 0 : return true;
1359 : }
1360 : default:
1361 : {
1362 0 : FatalError("unknown union type");
1363 0 : return false;
1364 : }
1365 : }
1366 : }
1367 :
1368 0 : auto PMessagePortParent::Write(
1369 : const TemporaryFileInputStreamParams& v__,
1370 : Message* msg__) -> void
1371 : {
1372 0 : Write((v__).fileDescriptorIndex(), msg__);
1373 : // Sentinel = 'fileDescriptorIndex'
1374 0 : (msg__)->WriteSentinel(587329112);
1375 0 : Write((v__).startPos(), msg__);
1376 : // Sentinel = 'startPos'
1377 0 : (msg__)->WriteSentinel(557207962);
1378 0 : Write((v__).endPos(), msg__);
1379 : // Sentinel = 'endPos'
1380 0 : (msg__)->WriteSentinel(881536245);
1381 0 : }
1382 :
1383 0 : auto PMessagePortParent::Read(
1384 : TemporaryFileInputStreamParams* v__,
1385 : const Message* msg__,
1386 : PickleIterator* iter__) -> bool
1387 : {
1388 0 : if ((!(Read((&((v__)->fileDescriptorIndex())), msg__, iter__)))) {
1389 0 : FatalError("Error deserializing 'fileDescriptorIndex' (uint32_t) member of 'TemporaryFileInputStreamParams'");
1390 0 : return false;
1391 : }
1392 : // Sentinel = 'fileDescriptorIndex'
1393 0 : if ((!((msg__)->ReadSentinel(iter__, 587329112)))) {
1394 0 : mozilla::ipc::SentinelReadError("Error deserializing 'fileDescriptorIndex' (uint32_t) member of 'TemporaryFileInputStreamParams'");
1395 0 : return false;
1396 : }
1397 0 : if ((!(Read((&((v__)->startPos())), msg__, iter__)))) {
1398 0 : FatalError("Error deserializing 'startPos' (uint64_t) member of 'TemporaryFileInputStreamParams'");
1399 0 : return false;
1400 : }
1401 : // Sentinel = 'startPos'
1402 0 : if ((!((msg__)->ReadSentinel(iter__, 557207962)))) {
1403 0 : mozilla::ipc::SentinelReadError("Error deserializing 'startPos' (uint64_t) member of 'TemporaryFileInputStreamParams'");
1404 0 : return false;
1405 : }
1406 0 : if ((!(Read((&((v__)->endPos())), msg__, iter__)))) {
1407 0 : FatalError("Error deserializing 'endPos' (uint64_t) member of 'TemporaryFileInputStreamParams'");
1408 0 : return false;
1409 : }
1410 : // Sentinel = 'endPos'
1411 0 : if ((!((msg__)->ReadSentinel(iter__, 881536245)))) {
1412 0 : mozilla::ipc::SentinelReadError("Error deserializing 'endPos' (uint64_t) member of 'TemporaryFileInputStreamParams'");
1413 0 : return false;
1414 : }
1415 0 : return true;
1416 : }
1417 :
1418 0 : auto PMessagePortParent::Write(
1419 : const MIMEInputStreamParams& v__,
1420 : Message* msg__) -> void
1421 : {
1422 0 : Write((v__).optionalStream(), msg__);
1423 : // Sentinel = 'optionalStream'
1424 0 : (msg__)->WriteSentinel(1003718562);
1425 0 : Write((v__).headers(), msg__);
1426 : // Sentinel = 'headers'
1427 0 : (msg__)->WriteSentinel(4284175217);
1428 0 : Write((v__).startedReading(), msg__);
1429 : // Sentinel = 'startedReading'
1430 0 : (msg__)->WriteSentinel(1906875903);
1431 0 : }
1432 :
1433 0 : auto PMessagePortParent::Read(
1434 : MIMEInputStreamParams* v__,
1435 : const Message* msg__,
1436 : PickleIterator* iter__) -> bool
1437 : {
1438 0 : if ((!(Read((&((v__)->optionalStream())), msg__, iter__)))) {
1439 0 : FatalError("Error deserializing 'optionalStream' (OptionalInputStreamParams) member of 'MIMEInputStreamParams'");
1440 0 : return false;
1441 : }
1442 : // Sentinel = 'optionalStream'
1443 0 : if ((!((msg__)->ReadSentinel(iter__, 1003718562)))) {
1444 0 : mozilla::ipc::SentinelReadError("Error deserializing 'optionalStream' (OptionalInputStreamParams) member of 'MIMEInputStreamParams'");
1445 0 : return false;
1446 : }
1447 0 : if ((!(Read((&((v__)->headers())), msg__, iter__)))) {
1448 0 : FatalError("Error deserializing 'headers' (HeaderEntry[]) member of 'MIMEInputStreamParams'");
1449 0 : return false;
1450 : }
1451 : // Sentinel = 'headers'
1452 0 : if ((!((msg__)->ReadSentinel(iter__, 4284175217)))) {
1453 0 : mozilla::ipc::SentinelReadError("Error deserializing 'headers' (HeaderEntry[]) member of 'MIMEInputStreamParams'");
1454 0 : return false;
1455 : }
1456 0 : if ((!(Read((&((v__)->startedReading())), msg__, iter__)))) {
1457 0 : FatalError("Error deserializing 'startedReading' (bool) member of 'MIMEInputStreamParams'");
1458 0 : return false;
1459 : }
1460 : // Sentinel = 'startedReading'
1461 0 : if ((!((msg__)->ReadSentinel(iter__, 1906875903)))) {
1462 0 : mozilla::ipc::SentinelReadError("Error deserializing 'startedReading' (bool) member of 'MIMEInputStreamParams'");
1463 0 : return false;
1464 : }
1465 0 : return true;
1466 : }
1467 :
1468 0 : auto PMessagePortParent::Write(
1469 : const InputStreamParams& v__,
1470 : Message* msg__) -> void
1471 : {
1472 : typedef InputStreamParams type__;
1473 0 : Write(int((v__).type()), msg__);
1474 : // Sentinel = 'InputStreamParams'
1475 0 : (msg__)->WriteSentinel(4114814015);
1476 :
1477 0 : switch ((v__).type()) {
1478 : case type__::TStringInputStreamParams:
1479 : {
1480 0 : Write((v__).get_StringInputStreamParams(), msg__);
1481 : // Sentinel = 'TStringInputStreamParams'
1482 0 : (msg__)->WriteSentinel(3395831651);
1483 0 : return;
1484 : }
1485 : case type__::TFileInputStreamParams:
1486 : {
1487 0 : Write((v__).get_FileInputStreamParams(), msg__);
1488 : // Sentinel = 'TFileInputStreamParams'
1489 0 : (msg__)->WriteSentinel(2543620282);
1490 0 : return;
1491 : }
1492 : case type__::TTemporaryFileInputStreamParams:
1493 : {
1494 0 : Write((v__).get_TemporaryFileInputStreamParams(), msg__);
1495 : // Sentinel = 'TTemporaryFileInputStreamParams'
1496 0 : (msg__)->WriteSentinel(587771548);
1497 0 : return;
1498 : }
1499 : case type__::TBufferedInputStreamParams:
1500 : {
1501 0 : Write((v__).get_BufferedInputStreamParams(), msg__);
1502 : // Sentinel = 'TBufferedInputStreamParams'
1503 0 : (msg__)->WriteSentinel(1698289307);
1504 0 : return;
1505 : }
1506 : case type__::TMIMEInputStreamParams:
1507 : {
1508 0 : Write((v__).get_MIMEInputStreamParams(), msg__);
1509 : // Sentinel = 'TMIMEInputStreamParams'
1510 0 : (msg__)->WriteSentinel(1948001964);
1511 0 : return;
1512 : }
1513 : case type__::TMultiplexInputStreamParams:
1514 : {
1515 0 : Write((v__).get_MultiplexInputStreamParams(), msg__);
1516 : // Sentinel = 'TMultiplexInputStreamParams'
1517 0 : (msg__)->WriteSentinel(3317853213);
1518 0 : return;
1519 : }
1520 : case type__::TSlicedInputStreamParams:
1521 : {
1522 0 : Write((v__).get_SlicedInputStreamParams(), msg__);
1523 : // Sentinel = 'TSlicedInputStreamParams'
1524 0 : (msg__)->WriteSentinel(445810472);
1525 0 : return;
1526 : }
1527 : case type__::TIPCBlobInputStreamParams:
1528 : {
1529 0 : Write((v__).get_IPCBlobInputStreamParams(), msg__);
1530 : // Sentinel = 'TIPCBlobInputStreamParams'
1531 0 : (msg__)->WriteSentinel(2436989998);
1532 0 : return;
1533 : }
1534 : default:
1535 : {
1536 0 : FatalError("unknown union type");
1537 0 : return;
1538 : }
1539 : }
1540 : }
1541 :
1542 0 : auto PMessagePortParent::Read(
1543 : InputStreamParams* v__,
1544 : const Message* msg__,
1545 : PickleIterator* iter__) -> bool
1546 : {
1547 : typedef InputStreamParams type__;
1548 : int type;
1549 0 : if ((!(Read((&(type)), msg__, iter__)))) {
1550 0 : mozilla::ipc::UnionTypeReadError("InputStreamParams");
1551 0 : return false;
1552 : }
1553 : // Sentinel = 'InputStreamParams'
1554 0 : if ((!((msg__)->ReadSentinel(iter__, 4114814015)))) {
1555 0 : mozilla::ipc::SentinelReadError("InputStreamParams");
1556 0 : return false;
1557 : }
1558 :
1559 0 : switch (type) {
1560 : case type__::TStringInputStreamParams:
1561 : {
1562 0 : StringInputStreamParams tmp = StringInputStreamParams();
1563 0 : (*(v__)) = tmp;
1564 0 : if ((!(Read((&((v__)->get_StringInputStreamParams())), msg__, iter__)))) {
1565 0 : FatalError("Error deserializing Union type");
1566 0 : return false;
1567 : }
1568 : // Sentinel = 'TStringInputStreamParams'
1569 0 : if ((!((msg__)->ReadSentinel(iter__, 3395831651)))) {
1570 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1571 0 : return false;
1572 : }
1573 0 : return true;
1574 : }
1575 : case type__::TFileInputStreamParams:
1576 : {
1577 0 : FileInputStreamParams tmp = FileInputStreamParams();
1578 0 : (*(v__)) = tmp;
1579 0 : if ((!(Read((&((v__)->get_FileInputStreamParams())), msg__, iter__)))) {
1580 0 : FatalError("Error deserializing Union type");
1581 0 : return false;
1582 : }
1583 : // Sentinel = 'TFileInputStreamParams'
1584 0 : if ((!((msg__)->ReadSentinel(iter__, 2543620282)))) {
1585 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1586 0 : return false;
1587 : }
1588 0 : return true;
1589 : }
1590 : case type__::TTemporaryFileInputStreamParams:
1591 : {
1592 0 : TemporaryFileInputStreamParams tmp = TemporaryFileInputStreamParams();
1593 0 : (*(v__)) = tmp;
1594 0 : if ((!(Read((&((v__)->get_TemporaryFileInputStreamParams())), msg__, iter__)))) {
1595 0 : FatalError("Error deserializing Union type");
1596 0 : return false;
1597 : }
1598 : // Sentinel = 'TTemporaryFileInputStreamParams'
1599 0 : if ((!((msg__)->ReadSentinel(iter__, 587771548)))) {
1600 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1601 0 : return false;
1602 : }
1603 0 : return true;
1604 : }
1605 : case type__::TBufferedInputStreamParams:
1606 : {
1607 0 : BufferedInputStreamParams tmp = BufferedInputStreamParams();
1608 0 : (*(v__)) = tmp;
1609 0 : if ((!(Read((&((v__)->get_BufferedInputStreamParams())), msg__, iter__)))) {
1610 0 : FatalError("Error deserializing Union type");
1611 0 : return false;
1612 : }
1613 : // Sentinel = 'TBufferedInputStreamParams'
1614 0 : if ((!((msg__)->ReadSentinel(iter__, 1698289307)))) {
1615 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1616 0 : return false;
1617 : }
1618 0 : return true;
1619 : }
1620 : case type__::TMIMEInputStreamParams:
1621 : {
1622 0 : MIMEInputStreamParams tmp = MIMEInputStreamParams();
1623 0 : (*(v__)) = tmp;
1624 0 : if ((!(Read((&((v__)->get_MIMEInputStreamParams())), msg__, iter__)))) {
1625 0 : FatalError("Error deserializing Union type");
1626 0 : return false;
1627 : }
1628 : // Sentinel = 'TMIMEInputStreamParams'
1629 0 : if ((!((msg__)->ReadSentinel(iter__, 1948001964)))) {
1630 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1631 0 : return false;
1632 : }
1633 0 : return true;
1634 : }
1635 : case type__::TMultiplexInputStreamParams:
1636 : {
1637 0 : MultiplexInputStreamParams tmp = MultiplexInputStreamParams();
1638 0 : (*(v__)) = tmp;
1639 0 : if ((!(Read((&((v__)->get_MultiplexInputStreamParams())), msg__, iter__)))) {
1640 0 : FatalError("Error deserializing Union type");
1641 0 : return false;
1642 : }
1643 : // Sentinel = 'TMultiplexInputStreamParams'
1644 0 : if ((!((msg__)->ReadSentinel(iter__, 3317853213)))) {
1645 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1646 0 : return false;
1647 : }
1648 0 : return true;
1649 : }
1650 : case type__::TSlicedInputStreamParams:
1651 : {
1652 0 : SlicedInputStreamParams tmp = SlicedInputStreamParams();
1653 0 : (*(v__)) = tmp;
1654 0 : if ((!(Read((&((v__)->get_SlicedInputStreamParams())), msg__, iter__)))) {
1655 0 : FatalError("Error deserializing Union type");
1656 0 : return false;
1657 : }
1658 : // Sentinel = 'TSlicedInputStreamParams'
1659 0 : if ((!((msg__)->ReadSentinel(iter__, 445810472)))) {
1660 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1661 0 : return false;
1662 : }
1663 0 : return true;
1664 : }
1665 : case type__::TIPCBlobInputStreamParams:
1666 : {
1667 0 : IPCBlobInputStreamParams tmp = IPCBlobInputStreamParams();
1668 0 : (*(v__)) = tmp;
1669 0 : if ((!(Read((&((v__)->get_IPCBlobInputStreamParams())), msg__, iter__)))) {
1670 0 : FatalError("Error deserializing Union type");
1671 0 : return false;
1672 : }
1673 : // Sentinel = 'TIPCBlobInputStreamParams'
1674 0 : if ((!((msg__)->ReadSentinel(iter__, 2436989998)))) {
1675 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1676 0 : return false;
1677 : }
1678 0 : return true;
1679 : }
1680 : default:
1681 : {
1682 0 : FatalError("unknown union type");
1683 0 : return false;
1684 : }
1685 : }
1686 : }
1687 :
1688 0 : auto PMessagePortParent::Write(
1689 : const PParentToChildStreamParent* v__,
1690 : Message* msg__,
1691 : bool nullable__) -> void
1692 : {
1693 : int32_t id;
1694 0 : if ((!(v__))) {
1695 0 : if ((!(nullable__))) {
1696 0 : FatalError("NULL actor value passed to non-nullable param");
1697 : }
1698 0 : id = 0;
1699 : }
1700 : else {
1701 0 : id = (v__)->Id();
1702 0 : if ((1) == (id)) {
1703 0 : FatalError("actor has been |delete|d");
1704 : }
1705 : }
1706 :
1707 0 : Write(id, msg__);
1708 0 : }
1709 :
1710 0 : auto PMessagePortParent::Read(
1711 : PParentToChildStreamParent** v__,
1712 : const Message* msg__,
1713 : PickleIterator* iter__,
1714 : bool nullable__) -> bool
1715 : {
1716 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PParentToChildStream", PParentToChildStreamMsgStart);
1717 0 : if ((actor).isNothing()) {
1718 0 : return false;
1719 : }
1720 :
1721 0 : (*(v__)) = static_cast<PParentToChildStreamParent*>((actor).value());
1722 0 : return true;
1723 : }
1724 :
1725 0 : auto PMessagePortParent::Write(
1726 : const IPCStream& v__,
1727 : Message* msg__) -> void
1728 : {
1729 : typedef IPCStream type__;
1730 0 : Write(int((v__).type()), msg__);
1731 : // Sentinel = 'IPCStream'
1732 0 : (msg__)->WriteSentinel(442610715);
1733 :
1734 0 : switch ((v__).type()) {
1735 : case type__::TInputStreamParamsWithFds:
1736 : {
1737 0 : Write((v__).get_InputStreamParamsWithFds(), msg__);
1738 : // Sentinel = 'TInputStreamParamsWithFds'
1739 0 : (msg__)->WriteSentinel(2170706066);
1740 0 : return;
1741 : }
1742 : case type__::TIPCRemoteStream:
1743 : {
1744 0 : Write((v__).get_IPCRemoteStream(), msg__);
1745 : // Sentinel = 'TIPCRemoteStream'
1746 0 : (msg__)->WriteSentinel(2978132448);
1747 0 : return;
1748 : }
1749 : default:
1750 : {
1751 0 : FatalError("unknown union type");
1752 0 : return;
1753 : }
1754 : }
1755 : }
1756 :
1757 0 : auto PMessagePortParent::Read(
1758 : IPCStream* v__,
1759 : const Message* msg__,
1760 : PickleIterator* iter__) -> bool
1761 : {
1762 : typedef IPCStream type__;
1763 : int type;
1764 0 : if ((!(Read((&(type)), msg__, iter__)))) {
1765 0 : mozilla::ipc::UnionTypeReadError("IPCStream");
1766 0 : return false;
1767 : }
1768 : // Sentinel = 'IPCStream'
1769 0 : if ((!((msg__)->ReadSentinel(iter__, 442610715)))) {
1770 0 : mozilla::ipc::SentinelReadError("IPCStream");
1771 0 : return false;
1772 : }
1773 :
1774 0 : switch (type) {
1775 : case type__::TInputStreamParamsWithFds:
1776 : {
1777 0 : InputStreamParamsWithFds tmp = InputStreamParamsWithFds();
1778 0 : (*(v__)) = tmp;
1779 0 : if ((!(Read((&((v__)->get_InputStreamParamsWithFds())), msg__, iter__)))) {
1780 0 : FatalError("Error deserializing Union type");
1781 0 : return false;
1782 : }
1783 : // Sentinel = 'TInputStreamParamsWithFds'
1784 0 : if ((!((msg__)->ReadSentinel(iter__, 2170706066)))) {
1785 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1786 0 : return false;
1787 : }
1788 0 : return true;
1789 : }
1790 : case type__::TIPCRemoteStream:
1791 : {
1792 0 : IPCRemoteStream tmp = IPCRemoteStream();
1793 0 : (*(v__)) = tmp;
1794 0 : if ((!(Read((&((v__)->get_IPCRemoteStream())), msg__, iter__)))) {
1795 0 : FatalError("Error deserializing Union type");
1796 0 : return false;
1797 : }
1798 : // Sentinel = 'TIPCRemoteStream'
1799 0 : if ((!((msg__)->ReadSentinel(iter__, 2978132448)))) {
1800 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1801 0 : return false;
1802 : }
1803 0 : return true;
1804 : }
1805 : default:
1806 : {
1807 0 : FatalError("unknown union type");
1808 0 : return false;
1809 : }
1810 : }
1811 : }
1812 :
1813 0 : auto PMessagePortParent::Write(
1814 : const StringInputStreamParams& v__,
1815 : Message* msg__) -> void
1816 : {
1817 0 : Write((v__).data(), msg__);
1818 : // Sentinel = 'data'
1819 0 : (msg__)->WriteSentinel(843352540);
1820 0 : }
1821 :
1822 0 : auto PMessagePortParent::Read(
1823 : StringInputStreamParams* v__,
1824 : const Message* msg__,
1825 : PickleIterator* iter__) -> bool
1826 : {
1827 0 : if ((!(Read((&((v__)->data())), msg__, iter__)))) {
1828 0 : FatalError("Error deserializing 'data' (nsCString) member of 'StringInputStreamParams'");
1829 0 : return false;
1830 : }
1831 : // Sentinel = 'data'
1832 0 : if ((!((msg__)->ReadSentinel(iter__, 843352540)))) {
1833 0 : mozilla::ipc::SentinelReadError("Error deserializing 'data' (nsCString) member of 'StringInputStreamParams'");
1834 0 : return false;
1835 : }
1836 0 : return true;
1837 : }
1838 :
1839 0 : auto PMessagePortParent::Write(
1840 : const MultiplexInputStreamParams& v__,
1841 : Message* msg__) -> void
1842 : {
1843 0 : Write((v__).streams(), msg__);
1844 : // Sentinel = 'streams'
1845 0 : (msg__)->WriteSentinel(4240383220);
1846 0 : Write((v__).currentStream(), msg__);
1847 : // Sentinel = 'currentStream'
1848 0 : (msg__)->WriteSentinel(682778074);
1849 0 : Write((v__).status(), msg__);
1850 : // Sentinel = 'status'
1851 0 : (msg__)->WriteSentinel(3714608576);
1852 0 : Write((v__).startedReadingCurrent(), msg__);
1853 : // Sentinel = 'startedReadingCurrent'
1854 0 : (msg__)->WriteSentinel(970542033);
1855 0 : }
1856 :
1857 0 : auto PMessagePortParent::Read(
1858 : MultiplexInputStreamParams* v__,
1859 : const Message* msg__,
1860 : PickleIterator* iter__) -> bool
1861 : {
1862 0 : if ((!(Read((&((v__)->streams())), msg__, iter__)))) {
1863 0 : FatalError("Error deserializing 'streams' (InputStreamParams[]) member of 'MultiplexInputStreamParams'");
1864 0 : return false;
1865 : }
1866 : // Sentinel = 'streams'
1867 0 : if ((!((msg__)->ReadSentinel(iter__, 4240383220)))) {
1868 0 : mozilla::ipc::SentinelReadError("Error deserializing 'streams' (InputStreamParams[]) member of 'MultiplexInputStreamParams'");
1869 0 : return false;
1870 : }
1871 0 : if ((!(Read((&((v__)->currentStream())), msg__, iter__)))) {
1872 0 : FatalError("Error deserializing 'currentStream' (uint32_t) member of 'MultiplexInputStreamParams'");
1873 0 : return false;
1874 : }
1875 : // Sentinel = 'currentStream'
1876 0 : if ((!((msg__)->ReadSentinel(iter__, 682778074)))) {
1877 0 : mozilla::ipc::SentinelReadError("Error deserializing 'currentStream' (uint32_t) member of 'MultiplexInputStreamParams'");
1878 0 : return false;
1879 : }
1880 0 : if ((!(Read((&((v__)->status())), msg__, iter__)))) {
1881 0 : FatalError("Error deserializing 'status' (nsresult) member of 'MultiplexInputStreamParams'");
1882 0 : return false;
1883 : }
1884 : // Sentinel = 'status'
1885 0 : if ((!((msg__)->ReadSentinel(iter__, 3714608576)))) {
1886 0 : mozilla::ipc::SentinelReadError("Error deserializing 'status' (nsresult) member of 'MultiplexInputStreamParams'");
1887 0 : return false;
1888 : }
1889 0 : if ((!(Read((&((v__)->startedReadingCurrent())), msg__, iter__)))) {
1890 0 : FatalError("Error deserializing 'startedReadingCurrent' (bool) member of 'MultiplexInputStreamParams'");
1891 0 : return false;
1892 : }
1893 : // Sentinel = 'startedReadingCurrent'
1894 0 : if ((!((msg__)->ReadSentinel(iter__, 970542033)))) {
1895 0 : mozilla::ipc::SentinelReadError("Error deserializing 'startedReadingCurrent' (bool) member of 'MultiplexInputStreamParams'");
1896 0 : return false;
1897 : }
1898 0 : return true;
1899 : }
1900 :
1901 0 : auto PMessagePortParent::Write(
1902 : const PFileDescriptorSetParent* v__,
1903 : Message* msg__,
1904 : bool nullable__) -> void
1905 : {
1906 : int32_t id;
1907 0 : if ((!(v__))) {
1908 0 : if ((!(nullable__))) {
1909 0 : FatalError("NULL actor value passed to non-nullable param");
1910 : }
1911 0 : id = 0;
1912 : }
1913 : else {
1914 0 : id = (v__)->Id();
1915 0 : if ((1) == (id)) {
1916 0 : FatalError("actor has been |delete|d");
1917 : }
1918 : }
1919 :
1920 0 : Write(id, msg__);
1921 0 : }
1922 :
1923 0 : auto PMessagePortParent::Read(
1924 : PFileDescriptorSetParent** v__,
1925 : const Message* msg__,
1926 : PickleIterator* iter__,
1927 : bool nullable__) -> bool
1928 : {
1929 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PFileDescriptorSet", PFileDescriptorSetMsgStart);
1930 0 : if ((actor).isNothing()) {
1931 0 : return false;
1932 : }
1933 :
1934 0 : (*(v__)) = static_cast<PFileDescriptorSetParent*>((actor).value());
1935 0 : return true;
1936 : }
1937 :
1938 0 : auto PMessagePortParent::Write(
1939 : const PIPCBlobInputStreamParent* v__,
1940 : Message* msg__,
1941 : bool nullable__) -> void
1942 : {
1943 : int32_t id;
1944 0 : if ((!(v__))) {
1945 0 : if ((!(nullable__))) {
1946 0 : FatalError("NULL actor value passed to non-nullable param");
1947 : }
1948 0 : id = 0;
1949 : }
1950 : else {
1951 0 : id = (v__)->Id();
1952 0 : if ((1) == (id)) {
1953 0 : FatalError("actor has been |delete|d");
1954 : }
1955 : }
1956 :
1957 0 : Write(id, msg__);
1958 0 : }
1959 :
1960 0 : auto PMessagePortParent::Read(
1961 : PIPCBlobInputStreamParent** v__,
1962 : const Message* msg__,
1963 : PickleIterator* iter__,
1964 : bool nullable__) -> bool
1965 : {
1966 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PIPCBlobInputStream", PIPCBlobInputStreamMsgStart);
1967 0 : if ((actor).isNothing()) {
1968 0 : return false;
1969 : }
1970 :
1971 0 : (*(v__)) = static_cast<PIPCBlobInputStreamParent*>((actor).value());
1972 0 : return true;
1973 : }
1974 :
1975 0 : auto PMessagePortParent::Write(
1976 : const OptionalFileDescriptorSet& v__,
1977 : Message* msg__) -> void
1978 : {
1979 : typedef OptionalFileDescriptorSet type__;
1980 0 : Write(int((v__).type()), msg__);
1981 : // Sentinel = 'OptionalFileDescriptorSet'
1982 0 : (msg__)->WriteSentinel(955222862);
1983 :
1984 0 : switch ((v__).type()) {
1985 : case type__::TPFileDescriptorSetParent:
1986 : {
1987 0 : Write((v__).get_PFileDescriptorSetParent(), msg__, false);
1988 : // Sentinel = 'TPFileDescriptorSetParent'
1989 0 : (msg__)->WriteSentinel(143041934);
1990 0 : return;
1991 : }
1992 : case type__::TPFileDescriptorSetChild:
1993 : {
1994 0 : FatalError("wrong side!");
1995 0 : return;
1996 : }
1997 : case type__::TArrayOfFileDescriptor:
1998 : {
1999 0 : Write((v__).get_ArrayOfFileDescriptor(), msg__);
2000 : // Sentinel = 'TArrayOfFileDescriptor'
2001 0 : (msg__)->WriteSentinel(2366096715);
2002 0 : return;
2003 : }
2004 : case type__::Tvoid_t:
2005 : {
2006 0 : Write((v__).get_void_t(), msg__);
2007 : // Sentinel = 'Tvoid_t'
2008 0 : (msg__)->WriteSentinel(3041273328);
2009 0 : return;
2010 : }
2011 : default:
2012 : {
2013 0 : FatalError("unknown union type");
2014 0 : return;
2015 : }
2016 : }
2017 : }
2018 :
2019 0 : auto PMessagePortParent::Read(
2020 : OptionalFileDescriptorSet* v__,
2021 : const Message* msg__,
2022 : PickleIterator* iter__) -> bool
2023 : {
2024 : typedef OptionalFileDescriptorSet type__;
2025 : int type;
2026 0 : if ((!(Read((&(type)), msg__, iter__)))) {
2027 0 : mozilla::ipc::UnionTypeReadError("OptionalFileDescriptorSet");
2028 0 : return false;
2029 : }
2030 : // Sentinel = 'OptionalFileDescriptorSet'
2031 0 : if ((!((msg__)->ReadSentinel(iter__, 955222862)))) {
2032 0 : mozilla::ipc::SentinelReadError("OptionalFileDescriptorSet");
2033 0 : return false;
2034 : }
2035 :
2036 0 : switch (type) {
2037 : case type__::TPFileDescriptorSetParent:
2038 : {
2039 0 : return false;
2040 : }
2041 : case type__::TPFileDescriptorSetChild:
2042 : {
2043 0 : PFileDescriptorSetParent* tmp = nullptr;
2044 0 : (*(v__)) = tmp;
2045 0 : if ((!(Read((&((v__)->get_PFileDescriptorSetParent())), msg__, iter__, false)))) {
2046 0 : FatalError("Error deserializing Union type");
2047 0 : return false;
2048 : }
2049 : // Sentinel = 'TPFileDescriptorSetChild'
2050 0 : if ((!((msg__)->ReadSentinel(iter__, 3477929935)))) {
2051 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
2052 0 : return false;
2053 : }
2054 0 : return true;
2055 : }
2056 : case type__::TArrayOfFileDescriptor:
2057 : {
2058 0 : nsTArray<FileDescriptor> tmp;
2059 0 : (*(v__)) = tmp;
2060 0 : if ((!(Read((&((v__)->get_ArrayOfFileDescriptor())), msg__, iter__)))) {
2061 0 : FatalError("Error deserializing Union type");
2062 0 : return false;
2063 : }
2064 : // Sentinel = 'TArrayOfFileDescriptor'
2065 0 : if ((!((msg__)->ReadSentinel(iter__, 2366096715)))) {
2066 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
2067 0 : return false;
2068 : }
2069 0 : return true;
2070 : }
2071 : case type__::Tvoid_t:
2072 : {
2073 : void_t tmp = void_t();
2074 0 : (*(v__)) = tmp;
2075 0 : if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
2076 0 : FatalError("Error deserializing Union type");
2077 0 : return false;
2078 : }
2079 : // Sentinel = 'Tvoid_t'
2080 0 : if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
2081 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
2082 0 : return false;
2083 : }
2084 0 : return true;
2085 : }
2086 : default:
2087 : {
2088 0 : FatalError("unknown union type");
2089 0 : return false;
2090 : }
2091 : }
2092 : }
2093 :
2094 0 : auto PMessagePortParent::Write(
2095 : const nsTArray<IPCStream>& v__,
2096 : Message* msg__) -> void
2097 : {
2098 0 : uint32_t length = (v__).Length();
2099 0 : Write(length, msg__);
2100 : // Sentinel = ('length', 'IPCStream[]')
2101 0 : (msg__)->WriteSentinel(790413678);
2102 :
2103 0 : for (auto& elem : v__) {
2104 0 : Write(elem, msg__);
2105 : // Sentinel = 'IPCStream[]'
2106 0 : (msg__)->WriteSentinel(117417041);
2107 : }
2108 0 : }
2109 :
2110 0 : auto PMessagePortParent::Read(
2111 : nsTArray<IPCStream>* v__,
2112 : const Message* msg__,
2113 : PickleIterator* iter__) -> bool
2114 : {
2115 0 : nsTArray<IPCStream> fa;
2116 : uint32_t length;
2117 0 : if ((!(Read((&(length)), msg__, iter__)))) {
2118 0 : mozilla::ipc::ArrayLengthReadError("IPCStream[]");
2119 0 : return false;
2120 : }
2121 : // Sentinel = ('length', 'IPCStream[]')
2122 0 : if ((!((msg__)->ReadSentinel(iter__, 790413678)))) {
2123 0 : mozilla::ipc::SentinelReadError("IPCStream[]");
2124 0 : return false;
2125 : }
2126 :
2127 0 : IPCStream* elems = (fa).AppendElements(length);
2128 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
2129 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
2130 0 : FatalError("Error deserializing 'IPCStream[i]'");
2131 0 : return false;
2132 : }
2133 : // Sentinel = 'IPCStream[]'
2134 0 : if ((!((msg__)->ReadSentinel(iter__, 117417041)))) {
2135 0 : mozilla::ipc::SentinelReadError("Error deserializing 'IPCStream[i]'");
2136 0 : return false;
2137 : }
2138 : }
2139 0 : (v__)->SwapElements(fa);
2140 0 : return true;
2141 : }
2142 :
2143 0 : auto PMessagePortParent::Write(
2144 : const IPCBlob& v__,
2145 : Message* msg__) -> void
2146 : {
2147 0 : Write((v__).type(), msg__);
2148 : // Sentinel = 'type'
2149 0 : (msg__)->WriteSentinel(2982068540);
2150 0 : Write((v__).size(), msg__);
2151 : // Sentinel = 'size'
2152 0 : (msg__)->WriteSentinel(931048223);
2153 0 : Write((v__).inputStream(), msg__);
2154 : // Sentinel = 'inputStream'
2155 0 : (msg__)->WriteSentinel(2684883823);
2156 0 : Write((v__).file(), msg__);
2157 : // Sentinel = 'file'
2158 0 : (msg__)->WriteSentinel(224874390);
2159 0 : Write((v__).fileId(), msg__);
2160 : // Sentinel = 'fileId'
2161 0 : (msg__)->WriteSentinel(108004447);
2162 0 : }
2163 :
2164 0 : auto PMessagePortParent::Read(
2165 : IPCBlob* v__,
2166 : const Message* msg__,
2167 : PickleIterator* iter__) -> bool
2168 : {
2169 0 : if ((!(Read((&((v__)->type())), msg__, iter__)))) {
2170 0 : FatalError("Error deserializing 'type' (nsString) member of 'IPCBlob'");
2171 0 : return false;
2172 : }
2173 : // Sentinel = 'type'
2174 0 : if ((!((msg__)->ReadSentinel(iter__, 2982068540)))) {
2175 0 : mozilla::ipc::SentinelReadError("Error deserializing 'type' (nsString) member of 'IPCBlob'");
2176 0 : return false;
2177 : }
2178 0 : if ((!(Read((&((v__)->size())), msg__, iter__)))) {
2179 0 : FatalError("Error deserializing 'size' (uint64_t) member of 'IPCBlob'");
2180 0 : return false;
2181 : }
2182 : // Sentinel = 'size'
2183 0 : if ((!((msg__)->ReadSentinel(iter__, 931048223)))) {
2184 0 : mozilla::ipc::SentinelReadError("Error deserializing 'size' (uint64_t) member of 'IPCBlob'");
2185 0 : return false;
2186 : }
2187 0 : if ((!(Read((&((v__)->inputStream())), msg__, iter__)))) {
2188 0 : FatalError("Error deserializing 'inputStream' (IPCBlobStream) member of 'IPCBlob'");
2189 0 : return false;
2190 : }
2191 : // Sentinel = 'inputStream'
2192 0 : if ((!((msg__)->ReadSentinel(iter__, 2684883823)))) {
2193 0 : mozilla::ipc::SentinelReadError("Error deserializing 'inputStream' (IPCBlobStream) member of 'IPCBlob'");
2194 0 : return false;
2195 : }
2196 0 : if ((!(Read((&((v__)->file())), msg__, iter__)))) {
2197 0 : FatalError("Error deserializing 'file' (IPCFileUnion) member of 'IPCBlob'");
2198 0 : return false;
2199 : }
2200 : // Sentinel = 'file'
2201 0 : if ((!((msg__)->ReadSentinel(iter__, 224874390)))) {
2202 0 : mozilla::ipc::SentinelReadError("Error deserializing 'file' (IPCFileUnion) member of 'IPCBlob'");
2203 0 : return false;
2204 : }
2205 0 : if ((!(Read((&((v__)->fileId())), msg__, iter__)))) {
2206 0 : FatalError("Error deserializing 'fileId' (int64_t) member of 'IPCBlob'");
2207 0 : return false;
2208 : }
2209 : // Sentinel = 'fileId'
2210 0 : if ((!((msg__)->ReadSentinel(iter__, 108004447)))) {
2211 0 : mozilla::ipc::SentinelReadError("Error deserializing 'fileId' (int64_t) member of 'IPCBlob'");
2212 0 : return false;
2213 : }
2214 0 : return true;
2215 : }
2216 :
2217 0 : auto PMessagePortParent::Write(
2218 : const FileDescriptor& v__,
2219 : Message* msg__) -> void
2220 : {
2221 0 : FileDescriptor::PickleType pfd = (v__).ShareTo(FileDescriptor::IPDLPrivate(), OtherPid());
2222 0 : IPC::WriteParam(msg__, pfd);
2223 0 : }
2224 :
2225 0 : auto PMessagePortParent::Read(
2226 : FileDescriptor* v__,
2227 : const Message* msg__,
2228 : PickleIterator* iter__) -> bool
2229 : {
2230 0 : FileDescriptor::PickleType pfd;
2231 0 : if ((!(IPC::ReadParam(msg__, iter__, (&(pfd)))))) {
2232 0 : return false;
2233 : }
2234 :
2235 0 : FileDescriptor fd = FileDescriptor(FileDescriptor::IPDLPrivate(), pfd);
2236 0 : if ((!((fd).IsValid()))) {
2237 0 : mozilla::ipc::ProtocolErrorBreakpoint("[PMessagePortParent] Received an invalid file descriptor!");
2238 : }
2239 :
2240 0 : (*(v__)) = fd;
2241 0 : return true;
2242 : }
2243 :
2244 0 : auto PMessagePortParent::Write(
2245 : const BufferedInputStreamParams& v__,
2246 : Message* msg__) -> void
2247 : {
2248 0 : Write((v__).optionalStream(), msg__);
2249 : // Sentinel = 'optionalStream'
2250 0 : (msg__)->WriteSentinel(1003718562);
2251 0 : Write((v__).bufferSize(), msg__);
2252 : // Sentinel = 'bufferSize'
2253 0 : (msg__)->WriteSentinel(3444538779);
2254 0 : }
2255 :
2256 0 : auto PMessagePortParent::Read(
2257 : BufferedInputStreamParams* v__,
2258 : const Message* msg__,
2259 : PickleIterator* iter__) -> bool
2260 : {
2261 0 : if ((!(Read((&((v__)->optionalStream())), msg__, iter__)))) {
2262 0 : FatalError("Error deserializing 'optionalStream' (OptionalInputStreamParams) member of 'BufferedInputStreamParams'");
2263 0 : return false;
2264 : }
2265 : // Sentinel = 'optionalStream'
2266 0 : if ((!((msg__)->ReadSentinel(iter__, 1003718562)))) {
2267 0 : mozilla::ipc::SentinelReadError("Error deserializing 'optionalStream' (OptionalInputStreamParams) member of 'BufferedInputStreamParams'");
2268 0 : return false;
2269 : }
2270 0 : if ((!(Read((&((v__)->bufferSize())), msg__, iter__)))) {
2271 0 : FatalError("Error deserializing 'bufferSize' (uint32_t) member of 'BufferedInputStreamParams'");
2272 0 : return false;
2273 : }
2274 : // Sentinel = 'bufferSize'
2275 0 : if ((!((msg__)->ReadSentinel(iter__, 3444538779)))) {
2276 0 : mozilla::ipc::SentinelReadError("Error deserializing 'bufferSize' (uint32_t) member of 'BufferedInputStreamParams'");
2277 0 : return false;
2278 : }
2279 0 : return true;
2280 : }
2281 :
2282 0 : auto PMessagePortParent::Write(
2283 : const HeaderEntry& v__,
2284 : Message* msg__) -> void
2285 : {
2286 0 : Write((v__).name(), msg__);
2287 : // Sentinel = 'name'
2288 0 : (msg__)->WriteSentinel(15034981);
2289 0 : Write((v__).value(), msg__);
2290 : // Sentinel = 'value'
2291 0 : (msg__)->WriteSentinel(3456818542);
2292 0 : }
2293 :
2294 0 : auto PMessagePortParent::Read(
2295 : HeaderEntry* v__,
2296 : const Message* msg__,
2297 : PickleIterator* iter__) -> bool
2298 : {
2299 0 : if ((!(Read((&((v__)->name())), msg__, iter__)))) {
2300 0 : FatalError("Error deserializing 'name' (nsCString) member of 'HeaderEntry'");
2301 0 : return false;
2302 : }
2303 : // Sentinel = 'name'
2304 0 : if ((!((msg__)->ReadSentinel(iter__, 15034981)))) {
2305 0 : mozilla::ipc::SentinelReadError("Error deserializing 'name' (nsCString) member of 'HeaderEntry'");
2306 0 : return false;
2307 : }
2308 0 : if ((!(Read((&((v__)->value())), msg__, iter__)))) {
2309 0 : FatalError("Error deserializing 'value' (nsCString) member of 'HeaderEntry'");
2310 0 : return false;
2311 : }
2312 : // Sentinel = 'value'
2313 0 : if ((!((msg__)->ReadSentinel(iter__, 3456818542)))) {
2314 0 : mozilla::ipc::SentinelReadError("Error deserializing 'value' (nsCString) member of 'HeaderEntry'");
2315 0 : return false;
2316 : }
2317 0 : return true;
2318 : }
2319 :
2320 0 : auto PMessagePortParent::Write(
2321 : const PChildToParentStreamParent* v__,
2322 : Message* msg__,
2323 : bool nullable__) -> void
2324 : {
2325 : int32_t id;
2326 0 : if ((!(v__))) {
2327 0 : if ((!(nullable__))) {
2328 0 : FatalError("NULL actor value passed to non-nullable param");
2329 : }
2330 0 : id = 0;
2331 : }
2332 : else {
2333 0 : id = (v__)->Id();
2334 0 : if ((1) == (id)) {
2335 0 : FatalError("actor has been |delete|d");
2336 : }
2337 : }
2338 :
2339 0 : Write(id, msg__);
2340 0 : }
2341 :
2342 0 : auto PMessagePortParent::Read(
2343 : PChildToParentStreamParent** v__,
2344 : const Message* msg__,
2345 : PickleIterator* iter__,
2346 : bool nullable__) -> bool
2347 : {
2348 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PChildToParentStream", PChildToParentStreamMsgStart);
2349 0 : if ((actor).isNothing()) {
2350 0 : return false;
2351 : }
2352 :
2353 0 : (*(v__)) = static_cast<PChildToParentStreamParent*>((actor).value());
2354 0 : return true;
2355 : }
2356 :
2357 0 : auto PMessagePortParent::Write(
2358 : const nsTArray<ClonedMessageData>& v__,
2359 : Message* msg__) -> void
2360 : {
2361 0 : uint32_t length = (v__).Length();
2362 0 : Write(length, msg__);
2363 : // Sentinel = ('length', 'ClonedMessageData[]')
2364 0 : (msg__)->WriteSentinel(1394635914);
2365 :
2366 0 : for (auto& elem : v__) {
2367 0 : Write(elem, msg__);
2368 : // Sentinel = 'ClonedMessageData[]'
2369 0 : (msg__)->WriteSentinel(1209264901);
2370 : }
2371 0 : }
2372 :
2373 0 : auto PMessagePortParent::Read(
2374 : nsTArray<ClonedMessageData>* v__,
2375 : const Message* msg__,
2376 : PickleIterator* iter__) -> bool
2377 : {
2378 0 : nsTArray<ClonedMessageData> fa;
2379 : uint32_t length;
2380 0 : if ((!(Read((&(length)), msg__, iter__)))) {
2381 0 : mozilla::ipc::ArrayLengthReadError("ClonedMessageData[]");
2382 0 : return false;
2383 : }
2384 : // Sentinel = ('length', 'ClonedMessageData[]')
2385 0 : if ((!((msg__)->ReadSentinel(iter__, 1394635914)))) {
2386 0 : mozilla::ipc::SentinelReadError("ClonedMessageData[]");
2387 0 : return false;
2388 : }
2389 :
2390 0 : ClonedMessageData* elems = (fa).AppendElements(length);
2391 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
2392 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
2393 0 : FatalError("Error deserializing 'ClonedMessageData[i]'");
2394 0 : return false;
2395 : }
2396 : // Sentinel = 'ClonedMessageData[]'
2397 0 : if ((!((msg__)->ReadSentinel(iter__, 1209264901)))) {
2398 0 : mozilla::ipc::SentinelReadError("Error deserializing 'ClonedMessageData[i]'");
2399 0 : return false;
2400 : }
2401 : }
2402 0 : (v__)->SwapElements(fa);
2403 0 : return true;
2404 : }
2405 :
2406 :
2407 :
2408 : } // namespace dom
2409 : } // namespace mozilla
|