Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/InputStreamParams.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/ipc/InputStreamParams.h"
8
9
10
//-----------------------------------------------------------------------------
11
// Method definitions for the IPDL type |struct HeaderEntry|
12
//
13
namespace mozilla {
14
namespace ipc {
15
auto HeaderEntry::operator==(const HeaderEntry& _o) const -> bool
16
0
{
17
0
    if ((!((name()) == ((_o).name())))) {
18
0
        return false;
19
0
    }
20
0
    if ((!((value()) == ((_o).value())))) {
21
0
        return false;
22
0
    }
23
0
    return true;
24
0
}
25
26
auto HeaderEntry::operator!=(const HeaderEntry& _o) const -> bool
27
0
{
28
0
    return (!(operator==(_o)));
29
0
}
30
31
} // namespace ipc
32
} // namespace mozilla
33
34
namespace mozilla {
35
namespace ipc {
36
auto IPDLParamTraits<mozilla::ipc::HeaderEntry>::Write(
37
        IPC::Message* aMsg,
38
        mozilla::ipc::IProtocol* aActor,
39
        const paramType& aVar) -> void
40
0
{
41
0
    WriteIPDLParam(aMsg, aActor, (aVar).name());
42
0
    // Sentinel = 'name'
43
0
    (aMsg)->WriteSentinel(15034981);
44
0
    WriteIPDLParam(aMsg, aActor, (aVar).value());
45
0
    // Sentinel = 'value'
46
0
    (aMsg)->WriteSentinel(3456818542);
47
0
}
48
49
auto IPDLParamTraits<mozilla::ipc::HeaderEntry>::Read(
50
        const IPC::Message* aMsg,
51
        PickleIterator* aIter,
52
        mozilla::ipc::IProtocol* aActor,
53
        paramType* aVar) -> bool
54
0
{
55
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->name())))))) {
56
0
        (aActor)->FatalError("Error deserializing 'name' (nsCString) member of 'HeaderEntry'");
57
0
        return false;
58
0
    }
59
0
    // Sentinel = 'name'
60
0
    if ((!((aMsg)->ReadSentinel(aIter, 15034981)))) {
61
0
        mozilla::ipc::SentinelReadError("Error deserializing 'name' (nsCString) member of 'HeaderEntry'");
62
0
        return false;
63
0
    }
64
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->value())))))) {
65
0
        (aActor)->FatalError("Error deserializing 'value' (nsCString) member of 'HeaderEntry'");
66
0
        return false;
67
0
    }
68
0
    // Sentinel = 'value'
69
0
    if ((!((aMsg)->ReadSentinel(aIter, 3456818542)))) {
70
0
        mozilla::ipc::SentinelReadError("Error deserializing 'value' (nsCString) member of 'HeaderEntry'");
71
0
        return false;
72
0
    }
73
0
    return true;
74
0
}
75
76
} // namespace ipc
77
} // namespace mozilla
78
79
//-----------------------------------------------------------------------------
80
// Method definitions for the IPDL type |struct StringInputStreamParams|
81
//
82
namespace mozilla {
83
namespace ipc {
84
auto StringInputStreamParams::operator==(const StringInputStreamParams& _o) const -> bool
85
0
{
86
0
    if ((!((data()) == ((_o).data())))) {
87
0
        return false;
88
0
    }
89
0
    return true;
90
0
}
91
92
auto StringInputStreamParams::operator!=(const StringInputStreamParams& _o) const -> bool
93
0
{
94
0
    return (!(operator==(_o)));
95
0
}
96
97
} // namespace ipc
98
} // namespace mozilla
99
100
namespace mozilla {
101
namespace ipc {
102
auto IPDLParamTraits<mozilla::ipc::StringInputStreamParams>::Write(
103
        IPC::Message* aMsg,
104
        mozilla::ipc::IProtocol* aActor,
105
        const paramType& aVar) -> void
106
0
{
107
0
    WriteIPDLParam(aMsg, aActor, (aVar).data());
108
0
    // Sentinel = 'data'
109
0
    (aMsg)->WriteSentinel(843352540);
110
0
}
111
112
auto IPDLParamTraits<mozilla::ipc::StringInputStreamParams>::Read(
113
        const IPC::Message* aMsg,
114
        PickleIterator* aIter,
115
        mozilla::ipc::IProtocol* aActor,
116
        paramType* aVar) -> bool
117
0
{
118
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->data())))))) {
119
0
        (aActor)->FatalError("Error deserializing 'data' (nsCString) member of 'StringInputStreamParams'");
120
0
        return false;
121
0
    }
122
0
    // Sentinel = 'data'
123
0
    if ((!((aMsg)->ReadSentinel(aIter, 843352540)))) {
124
0
        mozilla::ipc::SentinelReadError("Error deserializing 'data' (nsCString) member of 'StringInputStreamParams'");
125
0
        return false;
126
0
    }
127
0
    return true;
128
0
}
129
130
} // namespace ipc
131
} // namespace mozilla
132
133
//-----------------------------------------------------------------------------
134
// Method definitions for the IPDL type |struct FileInputStreamParams|
135
//
136
namespace mozilla {
137
namespace ipc {
138
auto FileInputStreamParams::operator==(const FileInputStreamParams& _o) const -> bool
139
0
{
140
0
    if ((!((fileDescriptorIndex()) == ((_o).fileDescriptorIndex())))) {
141
0
        return false;
142
0
    }
143
0
    if ((!((behaviorFlags()) == ((_o).behaviorFlags())))) {
144
0
        return false;
145
0
    }
146
0
    if ((!((ioFlags()) == ((_o).ioFlags())))) {
147
0
        return false;
148
0
    }
149
0
    return true;
150
0
}
151
152
auto FileInputStreamParams::operator!=(const FileInputStreamParams& _o) const -> bool
153
0
{
154
0
    return (!(operator==(_o)));
155
0
}
156
157
} // namespace ipc
158
} // namespace mozilla
159
160
namespace mozilla {
161
namespace ipc {
162
auto IPDLParamTraits<mozilla::ipc::FileInputStreamParams>::Write(
163
        IPC::Message* aMsg,
164
        mozilla::ipc::IProtocol* aActor,
165
        const paramType& aVar) -> void
166
0
{
167
0
    WriteIPDLParam(aMsg, aActor, (aVar).fileDescriptorIndex());
168
0
    // Sentinel = 'fileDescriptorIndex'
169
0
    (aMsg)->WriteSentinel(587329112);
170
0
    WriteIPDLParam(aMsg, aActor, (aVar).behaviorFlags());
171
0
    // Sentinel = 'behaviorFlags'
172
0
    (aMsg)->WriteSentinel(2404401962);
173
0
    WriteIPDLParam(aMsg, aActor, (aVar).ioFlags());
174
0
    // Sentinel = 'ioFlags'
175
0
    (aMsg)->WriteSentinel(1483009730);
176
0
}
177
178
auto IPDLParamTraits<mozilla::ipc::FileInputStreamParams>::Read(
179
        const IPC::Message* aMsg,
180
        PickleIterator* aIter,
181
        mozilla::ipc::IProtocol* aActor,
182
        paramType* aVar) -> bool
183
0
{
184
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->fileDescriptorIndex())))))) {
185
0
        (aActor)->FatalError("Error deserializing 'fileDescriptorIndex' (uint32_t) member of 'FileInputStreamParams'");
186
0
        return false;
187
0
    }
188
0
    // Sentinel = 'fileDescriptorIndex'
189
0
    if ((!((aMsg)->ReadSentinel(aIter, 587329112)))) {
190
0
        mozilla::ipc::SentinelReadError("Error deserializing 'fileDescriptorIndex' (uint32_t) member of 'FileInputStreamParams'");
191
0
        return false;
192
0
    }
193
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->behaviorFlags())))))) {
194
0
        (aActor)->FatalError("Error deserializing 'behaviorFlags' (int32_t) member of 'FileInputStreamParams'");
195
0
        return false;
196
0
    }
197
0
    // Sentinel = 'behaviorFlags'
198
0
    if ((!((aMsg)->ReadSentinel(aIter, 2404401962)))) {
199
0
        mozilla::ipc::SentinelReadError("Error deserializing 'behaviorFlags' (int32_t) member of 'FileInputStreamParams'");
200
0
        return false;
201
0
    }
202
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->ioFlags())))))) {
203
0
        (aActor)->FatalError("Error deserializing 'ioFlags' (int32_t) member of 'FileInputStreamParams'");
204
0
        return false;
205
0
    }
206
0
    // Sentinel = 'ioFlags'
207
0
    if ((!((aMsg)->ReadSentinel(aIter, 1483009730)))) {
208
0
        mozilla::ipc::SentinelReadError("Error deserializing 'ioFlags' (int32_t) member of 'FileInputStreamParams'");
209
0
        return false;
210
0
    }
211
0
    return true;
212
0
}
213
214
} // namespace ipc
215
} // namespace mozilla
216
217
//-----------------------------------------------------------------------------
218
// Method definitions for the IPDL type |struct MultiplexInputStreamParams|
219
//
220
namespace mozilla {
221
namespace ipc {
222
auto MultiplexInputStreamParams::operator==(const MultiplexInputStreamParams& _o) const -> bool
223
0
{
224
0
    if ((!((streams()) == ((_o).streams())))) {
225
0
        return false;
226
0
    }
227
0
    if ((!((currentStream()) == ((_o).currentStream())))) {
228
0
        return false;
229
0
    }
230
0
    if ((!((status()) == ((_o).status())))) {
231
0
        return false;
232
0
    }
233
0
    if ((!((startedReadingCurrent()) == ((_o).startedReadingCurrent())))) {
234
0
        return false;
235
0
    }
236
0
    return true;
237
0
}
238
239
auto MultiplexInputStreamParams::operator!=(const MultiplexInputStreamParams& _o) const -> bool
240
0
{
241
0
    return (!(operator==(_o)));
242
0
}
243
244
} // namespace ipc
245
} // namespace mozilla
246
247
namespace mozilla {
248
namespace ipc {
249
auto IPDLParamTraits<mozilla::ipc::MultiplexInputStreamParams>::Write(
250
        IPC::Message* aMsg,
251
        mozilla::ipc::IProtocol* aActor,
252
        const paramType& aVar) -> void
253
0
{
254
0
    WriteIPDLParam(aMsg, aActor, (aVar).streams());
255
0
    // Sentinel = 'streams'
256
0
    (aMsg)->WriteSentinel(4240383220);
257
0
    WriteIPDLParam(aMsg, aActor, (aVar).currentStream());
258
0
    // Sentinel = 'currentStream'
259
0
    (aMsg)->WriteSentinel(682778074);
260
0
    WriteIPDLParam(aMsg, aActor, (aVar).status());
261
0
    // Sentinel = 'status'
262
0
    (aMsg)->WriteSentinel(3714608576);
263
0
    WriteIPDLParam(aMsg, aActor, (aVar).startedReadingCurrent());
264
0
    // Sentinel = 'startedReadingCurrent'
265
0
    (aMsg)->WriteSentinel(970542033);
266
0
}
267
268
auto IPDLParamTraits<mozilla::ipc::MultiplexInputStreamParams>::Read(
269
        const IPC::Message* aMsg,
270
        PickleIterator* aIter,
271
        mozilla::ipc::IProtocol* aActor,
272
        paramType* aVar) -> bool
273
0
{
274
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->streams())))))) {
275
0
        (aActor)->FatalError("Error deserializing 'streams' (InputStreamParams[]) member of 'MultiplexInputStreamParams'");
276
0
        return false;
277
0
    }
278
0
    // Sentinel = 'streams'
279
0
    if ((!((aMsg)->ReadSentinel(aIter, 4240383220)))) {
280
0
        mozilla::ipc::SentinelReadError("Error deserializing 'streams' (InputStreamParams[]) member of 'MultiplexInputStreamParams'");
281
0
        return false;
282
0
    }
283
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->currentStream())))))) {
284
0
        (aActor)->FatalError("Error deserializing 'currentStream' (uint32_t) member of 'MultiplexInputStreamParams'");
285
0
        return false;
286
0
    }
287
0
    // Sentinel = 'currentStream'
288
0
    if ((!((aMsg)->ReadSentinel(aIter, 682778074)))) {
289
0
        mozilla::ipc::SentinelReadError("Error deserializing 'currentStream' (uint32_t) member of 'MultiplexInputStreamParams'");
290
0
        return false;
291
0
    }
292
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->status())))))) {
293
0
        (aActor)->FatalError("Error deserializing 'status' (nsresult) member of 'MultiplexInputStreamParams'");
294
0
        return false;
295
0
    }
296
0
    // Sentinel = 'status'
297
0
    if ((!((aMsg)->ReadSentinel(aIter, 3714608576)))) {
298
0
        mozilla::ipc::SentinelReadError("Error deserializing 'status' (nsresult) member of 'MultiplexInputStreamParams'");
299
0
        return false;
300
0
    }
301
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->startedReadingCurrent())))))) {
302
0
        (aActor)->FatalError("Error deserializing 'startedReadingCurrent' (bool) member of 'MultiplexInputStreamParams'");
303
0
        return false;
304
0
    }
305
0
    // Sentinel = 'startedReadingCurrent'
306
0
    if ((!((aMsg)->ReadSentinel(aIter, 970542033)))) {
307
0
        mozilla::ipc::SentinelReadError("Error deserializing 'startedReadingCurrent' (bool) member of 'MultiplexInputStreamParams'");
308
0
        return false;
309
0
    }
310
0
    return true;
311
0
}
312
313
} // namespace ipc
314
} // namespace mozilla
315
316
//-----------------------------------------------------------------------------
317
// Method definitions for the IPDL type |struct SlicedInputStreamParams|
318
//
319
namespace mozilla {
320
namespace ipc {
321
auto SlicedInputStreamParams::operator==(const SlicedInputStreamParams& _o) const -> bool
322
0
{
323
0
    if ((!((stream()) == ((_o).stream())))) {
324
0
        return false;
325
0
    }
326
0
    if ((!((start()) == ((_o).start())))) {
327
0
        return false;
328
0
    }
329
0
    if ((!((length()) == ((_o).length())))) {
330
0
        return false;
331
0
    }
332
0
    if ((!((curPos()) == ((_o).curPos())))) {
333
0
        return false;
334
0
    }
335
0
    if ((!((closed()) == ((_o).closed())))) {
336
0
        return false;
337
0
    }
338
0
    return true;
339
0
}
340
341
auto SlicedInputStreamParams::operator!=(const SlicedInputStreamParams& _o) const -> bool
342
0
{
343
0
    return (!(operator==(_o)));
344
0
}
345
346
} // namespace ipc
347
} // namespace mozilla
348
349
namespace mozilla {
350
namespace ipc {
351
auto IPDLParamTraits<mozilla::ipc::SlicedInputStreamParams>::Write(
352
        IPC::Message* aMsg,
353
        mozilla::ipc::IProtocol* aActor,
354
        const paramType& aVar) -> void
355
0
{
356
0
    WriteIPDLParam(aMsg, aActor, (aVar).stream());
357
0
    // Sentinel = 'stream'
358
0
    (aMsg)->WriteSentinel(4152748422);
359
0
    WriteIPDLParam(aMsg, aActor, (aVar).start());
360
0
    // Sentinel = 'start'
361
0
    (aMsg)->WriteSentinel(2088644401);
362
0
    WriteIPDLParam(aMsg, aActor, (aVar).length());
363
0
    // Sentinel = 'length'
364
0
    (aMsg)->WriteSentinel(1726618354);
365
0
    WriteIPDLParam(aMsg, aActor, (aVar).curPos());
366
0
    // Sentinel = 'curPos'
367
0
    (aMsg)->WriteSentinel(4042140974);
368
0
    WriteIPDLParam(aMsg, aActor, (aVar).closed());
369
0
    // Sentinel = 'closed'
370
0
    (aMsg)->WriteSentinel(561249462);
371
0
}
372
373
auto IPDLParamTraits<mozilla::ipc::SlicedInputStreamParams>::Read(
374
        const IPC::Message* aMsg,
375
        PickleIterator* aIter,
376
        mozilla::ipc::IProtocol* aActor,
377
        paramType* aVar) -> bool
378
0
{
379
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->stream())))))) {
380
0
        (aActor)->FatalError("Error deserializing 'stream' (InputStreamParams) member of 'SlicedInputStreamParams'");
381
0
        return false;
382
0
    }
383
0
    // Sentinel = 'stream'
384
0
    if ((!((aMsg)->ReadSentinel(aIter, 4152748422)))) {
385
0
        mozilla::ipc::SentinelReadError("Error deserializing 'stream' (InputStreamParams) member of 'SlicedInputStreamParams'");
386
0
        return false;
387
0
    }
388
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->start())))))) {
389
0
        (aActor)->FatalError("Error deserializing 'start' (uint64_t) member of 'SlicedInputStreamParams'");
390
0
        return false;
391
0
    }
392
0
    // Sentinel = 'start'
393
0
    if ((!((aMsg)->ReadSentinel(aIter, 2088644401)))) {
394
0
        mozilla::ipc::SentinelReadError("Error deserializing 'start' (uint64_t) member of 'SlicedInputStreamParams'");
395
0
        return false;
396
0
    }
397
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->length())))))) {
398
0
        (aActor)->FatalError("Error deserializing 'length' (uint64_t) member of 'SlicedInputStreamParams'");
399
0
        return false;
400
0
    }
401
0
    // Sentinel = 'length'
402
0
    if ((!((aMsg)->ReadSentinel(aIter, 1726618354)))) {
403
0
        mozilla::ipc::SentinelReadError("Error deserializing 'length' (uint64_t) member of 'SlicedInputStreamParams'");
404
0
        return false;
405
0
    }
406
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->curPos())))))) {
407
0
        (aActor)->FatalError("Error deserializing 'curPos' (uint64_t) member of 'SlicedInputStreamParams'");
408
0
        return false;
409
0
    }
410
0
    // Sentinel = 'curPos'
411
0
    if ((!((aMsg)->ReadSentinel(aIter, 4042140974)))) {
412
0
        mozilla::ipc::SentinelReadError("Error deserializing 'curPos' (uint64_t) member of 'SlicedInputStreamParams'");
413
0
        return false;
414
0
    }
415
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->closed())))))) {
416
0
        (aActor)->FatalError("Error deserializing 'closed' (bool) member of 'SlicedInputStreamParams'");
417
0
        return false;
418
0
    }
419
0
    // Sentinel = 'closed'
420
0
    if ((!((aMsg)->ReadSentinel(aIter, 561249462)))) {
421
0
        mozilla::ipc::SentinelReadError("Error deserializing 'closed' (bool) member of 'SlicedInputStreamParams'");
422
0
        return false;
423
0
    }
424
0
    return true;
425
0
}
426
427
} // namespace ipc
428
} // namespace mozilla
429
430
//-----------------------------------------------------------------------------
431
// Method definitions for the IPDL type |struct IPCBlobInputStreamParams|
432
//
433
namespace mozilla {
434
namespace ipc {
435
auto IPCBlobInputStreamParams::operator==(const IPCBlobInputStreamParams& _o) const -> bool
436
0
{
437
0
    if ((!((id()) == ((_o).id())))) {
438
0
        return false;
439
0
    }
440
0
    if ((!((start()) == ((_o).start())))) {
441
0
        return false;
442
0
    }
443
0
    if ((!((length()) == ((_o).length())))) {
444
0
        return false;
445
0
    }
446
0
    return true;
447
0
}
448
449
auto IPCBlobInputStreamParams::operator!=(const IPCBlobInputStreamParams& _o) const -> bool
450
0
{
451
0
    return (!(operator==(_o)));
452
0
}
453
454
} // namespace ipc
455
} // namespace mozilla
456
457
namespace mozilla {
458
namespace ipc {
459
auto IPDLParamTraits<mozilla::ipc::IPCBlobInputStreamParams>::Write(
460
        IPC::Message* aMsg,
461
        mozilla::ipc::IProtocol* aActor,
462
        const paramType& aVar) -> void
463
0
{
464
0
    WriteIPDLParam(aMsg, aActor, (aVar).id());
465
0
    // Sentinel = 'id'
466
0
    (aMsg)->WriteSentinel(2794505629);
467
0
    WriteIPDLParam(aMsg, aActor, (aVar).start());
468
0
    // Sentinel = 'start'
469
0
    (aMsg)->WriteSentinel(2088644401);
470
0
    WriteIPDLParam(aMsg, aActor, (aVar).length());
471
0
    // Sentinel = 'length'
472
0
    (aMsg)->WriteSentinel(1726618354);
473
0
}
474
475
auto IPDLParamTraits<mozilla::ipc::IPCBlobInputStreamParams>::Read(
476
        const IPC::Message* aMsg,
477
        PickleIterator* aIter,
478
        mozilla::ipc::IProtocol* aActor,
479
        paramType* aVar) -> bool
480
0
{
481
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->id())))))) {
482
0
        (aActor)->FatalError("Error deserializing 'id' (nsID) member of 'IPCBlobInputStreamParams'");
483
0
        return false;
484
0
    }
485
0
    // Sentinel = 'id'
486
0
    if ((!((aMsg)->ReadSentinel(aIter, 2794505629)))) {
487
0
        mozilla::ipc::SentinelReadError("Error deserializing 'id' (nsID) member of 'IPCBlobInputStreamParams'");
488
0
        return false;
489
0
    }
490
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->start())))))) {
491
0
        (aActor)->FatalError("Error deserializing 'start' (uint64_t) member of 'IPCBlobInputStreamParams'");
492
0
        return false;
493
0
    }
494
0
    // Sentinel = 'start'
495
0
    if ((!((aMsg)->ReadSentinel(aIter, 2088644401)))) {
496
0
        mozilla::ipc::SentinelReadError("Error deserializing 'start' (uint64_t) member of 'IPCBlobInputStreamParams'");
497
0
        return false;
498
0
    }
499
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->length())))))) {
500
0
        (aActor)->FatalError("Error deserializing 'length' (uint64_t) member of 'IPCBlobInputStreamParams'");
501
0
        return false;
502
0
    }
503
0
    // Sentinel = 'length'
504
0
    if ((!((aMsg)->ReadSentinel(aIter, 1726618354)))) {
505
0
        mozilla::ipc::SentinelReadError("Error deserializing 'length' (uint64_t) member of 'IPCBlobInputStreamParams'");
506
0
        return false;
507
0
    }
508
0
    return true;
509
0
}
510
511
} // namespace ipc
512
} // namespace mozilla
513
514
//-----------------------------------------------------------------------------
515
// Method definitions for the IPDL type |union InputStreamParams|
516
//
517
namespace mozilla {
518
namespace ipc {
519
auto InputStreamParams::MaybeDestroy(Type aNewType) -> bool
520
0
{
521
0
    if ((mType) == (T__None)) {
522
0
        return true;
523
0
    }
524
0
    if ((mType) == (aNewType)) {
525
0
        return false;
526
0
    }
527
0
    switch (mType) {
528
0
    case TStringInputStreamParams:
529
0
        {
530
0
            (ptr_StringInputStreamParams())->~StringInputStreamParams__tdef();
531
0
            break;
532
0
        }
533
0
    case TFileInputStreamParams:
534
0
        {
535
0
            (ptr_FileInputStreamParams())->~FileInputStreamParams__tdef();
536
0
            break;
537
0
        }
538
0
    case TBufferedInputStreamParams:
539
0
        {
540
0
            delete ptr_BufferedInputStreamParams();
541
0
            break;
542
0
        }
543
0
    case TMIMEInputStreamParams:
544
0
        {
545
0
            delete ptr_MIMEInputStreamParams();
546
0
            break;
547
0
        }
548
0
    case TMultiplexInputStreamParams:
549
0
        {
550
0
            delete ptr_MultiplexInputStreamParams();
551
0
            break;
552
0
        }
553
0
    case TSlicedInputStreamParams:
554
0
        {
555
0
            delete ptr_SlicedInputStreamParams();
556
0
            break;
557
0
        }
558
0
    case TIPCBlobInputStreamParams:
559
0
        {
560
0
            (ptr_IPCBlobInputStreamParams())->~IPCBlobInputStreamParams__tdef();
561
0
            break;
562
0
        }
563
0
    case TInputStreamLengthWrapperParams:
564
0
        {
565
0
            delete ptr_InputStreamLengthWrapperParams();
566
0
            break;
567
0
        }
568
0
    default:
569
0
        {
570
0
            mozilla::ipc::LogicError("not reached");
571
0
            break;
572
0
        }
573
0
    }
574
0
    return true;
575
0
}
576
577
MOZ_IMPLICIT InputStreamParams::InputStreamParams(const StringInputStreamParams& aOther)
578
0
{
579
0
    new (mozilla::KnownNotNull, ptr_StringInputStreamParams()) StringInputStreamParams(aOther);
580
0
    mType = TStringInputStreamParams;
581
0
}
582
583
MOZ_IMPLICIT InputStreamParams::InputStreamParams(StringInputStreamParams&& aOther)
584
0
{
585
0
    new (mozilla::KnownNotNull, ptr_StringInputStreamParams()) StringInputStreamParams(std::move(aOther));
586
0
    mType = TStringInputStreamParams;
587
0
}
588
589
MOZ_IMPLICIT InputStreamParams::InputStreamParams(const FileInputStreamParams& aOther)
590
0
{
591
0
    new (mozilla::KnownNotNull, ptr_FileInputStreamParams()) FileInputStreamParams(aOther);
592
0
    mType = TFileInputStreamParams;
593
0
}
594
595
MOZ_IMPLICIT InputStreamParams::InputStreamParams(FileInputStreamParams&& aOther)
596
0
{
597
0
    new (mozilla::KnownNotNull, ptr_FileInputStreamParams()) FileInputStreamParams(std::move(aOther));
598
0
    mType = TFileInputStreamParams;
599
0
}
600
601
MOZ_IMPLICIT InputStreamParams::InputStreamParams(const BufferedInputStreamParams& aOther)
602
0
{
603
0
    ptr_BufferedInputStreamParams() = new BufferedInputStreamParams(aOther);
604
0
    mType = TBufferedInputStreamParams;
605
0
}
606
607
MOZ_IMPLICIT InputStreamParams::InputStreamParams(BufferedInputStreamParams&& aOther)
608
0
{
609
0
    ptr_BufferedInputStreamParams() = new BufferedInputStreamParams(std::move(aOther));
610
0
    mType = TBufferedInputStreamParams;
611
0
}
612
613
MOZ_IMPLICIT InputStreamParams::InputStreamParams(const MIMEInputStreamParams& aOther)
614
0
{
615
0
    ptr_MIMEInputStreamParams() = new MIMEInputStreamParams(aOther);
616
0
    mType = TMIMEInputStreamParams;
617
0
}
618
619
MOZ_IMPLICIT InputStreamParams::InputStreamParams(MIMEInputStreamParams&& aOther)
620
0
{
621
0
    ptr_MIMEInputStreamParams() = new MIMEInputStreamParams(std::move(aOther));
622
0
    mType = TMIMEInputStreamParams;
623
0
}
624
625
MOZ_IMPLICIT InputStreamParams::InputStreamParams(const MultiplexInputStreamParams& aOther)
626
0
{
627
0
    ptr_MultiplexInputStreamParams() = new MultiplexInputStreamParams(aOther);
628
0
    mType = TMultiplexInputStreamParams;
629
0
}
630
631
MOZ_IMPLICIT InputStreamParams::InputStreamParams(MultiplexInputStreamParams&& aOther)
632
0
{
633
0
    ptr_MultiplexInputStreamParams() = new MultiplexInputStreamParams(std::move(aOther));
634
0
    mType = TMultiplexInputStreamParams;
635
0
}
636
637
MOZ_IMPLICIT InputStreamParams::InputStreamParams(const SlicedInputStreamParams& aOther)
638
0
{
639
0
    ptr_SlicedInputStreamParams() = new SlicedInputStreamParams(aOther);
640
0
    mType = TSlicedInputStreamParams;
641
0
}
642
643
MOZ_IMPLICIT InputStreamParams::InputStreamParams(SlicedInputStreamParams&& aOther)
644
0
{
645
0
    ptr_SlicedInputStreamParams() = new SlicedInputStreamParams(std::move(aOther));
646
0
    mType = TSlicedInputStreamParams;
647
0
}
648
649
MOZ_IMPLICIT InputStreamParams::InputStreamParams(const IPCBlobInputStreamParams& aOther)
650
0
{
651
0
    new (mozilla::KnownNotNull, ptr_IPCBlobInputStreamParams()) IPCBlobInputStreamParams(aOther);
652
0
    mType = TIPCBlobInputStreamParams;
653
0
}
654
655
MOZ_IMPLICIT InputStreamParams::InputStreamParams(IPCBlobInputStreamParams&& aOther)
656
0
{
657
0
    new (mozilla::KnownNotNull, ptr_IPCBlobInputStreamParams()) IPCBlobInputStreamParams(std::move(aOther));
658
0
    mType = TIPCBlobInputStreamParams;
659
0
}
660
661
MOZ_IMPLICIT InputStreamParams::InputStreamParams(const InputStreamLengthWrapperParams& aOther)
662
0
{
663
0
    ptr_InputStreamLengthWrapperParams() = new InputStreamLengthWrapperParams(aOther);
664
0
    mType = TInputStreamLengthWrapperParams;
665
0
}
666
667
MOZ_IMPLICIT InputStreamParams::InputStreamParams(InputStreamLengthWrapperParams&& aOther)
668
0
{
669
0
    ptr_InputStreamLengthWrapperParams() = new InputStreamLengthWrapperParams(std::move(aOther));
670
0
    mType = TInputStreamLengthWrapperParams;
671
0
}
672
673
MOZ_IMPLICIT InputStreamParams::InputStreamParams(const InputStreamParams& aOther)
674
0
{
675
0
    (aOther).AssertSanity();
676
0
    switch ((aOther).type()) {
677
0
    case TStringInputStreamParams:
678
0
        {
679
0
            new (mozilla::KnownNotNull, ptr_StringInputStreamParams()) StringInputStreamParams((aOther).get_StringInputStreamParams());
680
0
            break;
681
0
        }
682
0
    case TFileInputStreamParams:
683
0
        {
684
0
            new (mozilla::KnownNotNull, ptr_FileInputStreamParams()) FileInputStreamParams((aOther).get_FileInputStreamParams());
685
0
            break;
686
0
        }
687
0
    case TBufferedInputStreamParams:
688
0
        {
689
0
            ptr_BufferedInputStreamParams() = new BufferedInputStreamParams((aOther).get_BufferedInputStreamParams());
690
0
            break;
691
0
        }
692
0
    case TMIMEInputStreamParams:
693
0
        {
694
0
            ptr_MIMEInputStreamParams() = new MIMEInputStreamParams((aOther).get_MIMEInputStreamParams());
695
0
            break;
696
0
        }
697
0
    case TMultiplexInputStreamParams:
698
0
        {
699
0
            ptr_MultiplexInputStreamParams() = new MultiplexInputStreamParams((aOther).get_MultiplexInputStreamParams());
700
0
            break;
701
0
        }
702
0
    case TSlicedInputStreamParams:
703
0
        {
704
0
            ptr_SlicedInputStreamParams() = new SlicedInputStreamParams((aOther).get_SlicedInputStreamParams());
705
0
            break;
706
0
        }
707
0
    case TIPCBlobInputStreamParams:
708
0
        {
709
0
            new (mozilla::KnownNotNull, ptr_IPCBlobInputStreamParams()) IPCBlobInputStreamParams((aOther).get_IPCBlobInputStreamParams());
710
0
            break;
711
0
        }
712
0
    case TInputStreamLengthWrapperParams:
713
0
        {
714
0
            ptr_InputStreamLengthWrapperParams() = new InputStreamLengthWrapperParams((aOther).get_InputStreamLengthWrapperParams());
715
0
            break;
716
0
        }
717
0
    case T__None:
718
0
        {
719
0
            break;
720
0
        }
721
0
    default:
722
0
        {
723
0
            mozilla::ipc::LogicError("unreached");
724
0
            return;
725
0
        }
726
0
    }
727
0
    mType = (aOther).type();
728
0
}
729
730
MOZ_IMPLICIT InputStreamParams::InputStreamParams(InputStreamParams&& aOther)
731
0
{
732
0
    (aOther).AssertSanity();
733
0
    Type t = (aOther).type();
734
0
    switch (t) {
735
0
    case TStringInputStreamParams:
736
0
        {
737
0
            new (mozilla::KnownNotNull, ptr_StringInputStreamParams()) StringInputStreamParams(std::move((aOther).get_StringInputStreamParams()));
738
0
            static_cast<void>((aOther).MaybeDestroy(T__None));
739
0
            break;
740
0
        }
741
0
    case TFileInputStreamParams:
742
0
        {
743
0
            new (mozilla::KnownNotNull, ptr_FileInputStreamParams()) FileInputStreamParams(std::move((aOther).get_FileInputStreamParams()));
744
0
            static_cast<void>((aOther).MaybeDestroy(T__None));
745
0
            break;
746
0
        }
747
0
    case TBufferedInputStreamParams:
748
0
        {
749
0
            ptr_BufferedInputStreamParams() = (aOther).ptr_BufferedInputStreamParams();
750
0
            break;
751
0
        }
752
0
    case TMIMEInputStreamParams:
753
0
        {
754
0
            ptr_MIMEInputStreamParams() = (aOther).ptr_MIMEInputStreamParams();
755
0
            break;
756
0
        }
757
0
    case TMultiplexInputStreamParams:
758
0
        {
759
0
            ptr_MultiplexInputStreamParams() = (aOther).ptr_MultiplexInputStreamParams();
760
0
            break;
761
0
        }
762
0
    case TSlicedInputStreamParams:
763
0
        {
764
0
            ptr_SlicedInputStreamParams() = (aOther).ptr_SlicedInputStreamParams();
765
0
            break;
766
0
        }
767
0
    case TIPCBlobInputStreamParams:
768
0
        {
769
0
            new (mozilla::KnownNotNull, ptr_IPCBlobInputStreamParams()) IPCBlobInputStreamParams(std::move((aOther).get_IPCBlobInputStreamParams()));
770
0
            static_cast<void>((aOther).MaybeDestroy(T__None));
771
0
            break;
772
0
        }
773
0
    case TInputStreamLengthWrapperParams:
774
0
        {
775
0
            ptr_InputStreamLengthWrapperParams() = (aOther).ptr_InputStreamLengthWrapperParams();
776
0
            break;
777
0
        }
778
0
    case T__None:
779
0
        {
780
0
            break;
781
0
        }
782
0
    default:
783
0
        {
784
0
            mozilla::ipc::LogicError("unreached");
785
0
            return;
786
0
        }
787
0
    }
788
0
    (aOther).mType = T__None;
789
0
    mType = t;
790
0
}
791
792
InputStreamParams::~InputStreamParams()
793
0
{
794
0
    static_cast<void>(MaybeDestroy(T__None));
795
0
}
796
797
auto InputStreamParams::operator=(const StringInputStreamParams& aRhs) -> InputStreamParams&
798
0
{
799
0
    if (MaybeDestroy(TStringInputStreamParams)) {
800
0
        new (mozilla::KnownNotNull, ptr_StringInputStreamParams()) StringInputStreamParams;
801
0
    }
802
0
    (*(ptr_StringInputStreamParams())) = aRhs;
803
0
    mType = TStringInputStreamParams;
804
0
    return (*(this));
805
0
}
806
807
auto InputStreamParams::operator=(StringInputStreamParams&& aRhs) -> InputStreamParams&
808
0
{
809
0
    if (MaybeDestroy(TStringInputStreamParams)) {
810
0
        new (mozilla::KnownNotNull, ptr_StringInputStreamParams()) StringInputStreamParams;
811
0
    }
812
0
    (*(ptr_StringInputStreamParams())) = std::move(aRhs);
813
0
    mType = TStringInputStreamParams;
814
0
    return (*(this));
815
0
}
816
817
auto InputStreamParams::operator=(const FileInputStreamParams& aRhs) -> InputStreamParams&
818
0
{
819
0
    if (MaybeDestroy(TFileInputStreamParams)) {
820
0
        new (mozilla::KnownNotNull, ptr_FileInputStreamParams()) FileInputStreamParams;
821
0
    }
822
0
    (*(ptr_FileInputStreamParams())) = aRhs;
823
0
    mType = TFileInputStreamParams;
824
0
    return (*(this));
825
0
}
826
827
auto InputStreamParams::operator=(FileInputStreamParams&& aRhs) -> InputStreamParams&
828
0
{
829
0
    if (MaybeDestroy(TFileInputStreamParams)) {
830
0
        new (mozilla::KnownNotNull, ptr_FileInputStreamParams()) FileInputStreamParams;
831
0
    }
832
0
    (*(ptr_FileInputStreamParams())) = std::move(aRhs);
833
0
    mType = TFileInputStreamParams;
834
0
    return (*(this));
835
0
}
836
837
auto InputStreamParams::operator=(const BufferedInputStreamParams& aRhs) -> InputStreamParams&
838
0
{
839
0
    if (MaybeDestroy(TBufferedInputStreamParams)) {
840
0
        ptr_BufferedInputStreamParams() = new BufferedInputStreamParams;
841
0
    }
842
0
    (*(ptr_BufferedInputStreamParams())) = aRhs;
843
0
    mType = TBufferedInputStreamParams;
844
0
    return (*(this));
845
0
}
846
847
auto InputStreamParams::operator=(BufferedInputStreamParams&& aRhs) -> InputStreamParams&
848
0
{
849
0
    if (MaybeDestroy(TBufferedInputStreamParams)) {
850
0
        ptr_BufferedInputStreamParams() = new BufferedInputStreamParams;
851
0
    }
852
0
    (*(ptr_BufferedInputStreamParams())) = std::move(aRhs);
853
0
    mType = TBufferedInputStreamParams;
854
0
    return (*(this));
855
0
}
856
857
auto InputStreamParams::operator=(const MIMEInputStreamParams& aRhs) -> InputStreamParams&
858
0
{
859
0
    if (MaybeDestroy(TMIMEInputStreamParams)) {
860
0
        ptr_MIMEInputStreamParams() = new MIMEInputStreamParams;
861
0
    }
862
0
    (*(ptr_MIMEInputStreamParams())) = aRhs;
863
0
    mType = TMIMEInputStreamParams;
864
0
    return (*(this));
865
0
}
866
867
auto InputStreamParams::operator=(MIMEInputStreamParams&& aRhs) -> InputStreamParams&
868
0
{
869
0
    if (MaybeDestroy(TMIMEInputStreamParams)) {
870
0
        ptr_MIMEInputStreamParams() = new MIMEInputStreamParams;
871
0
    }
872
0
    (*(ptr_MIMEInputStreamParams())) = std::move(aRhs);
873
0
    mType = TMIMEInputStreamParams;
874
0
    return (*(this));
875
0
}
876
877
auto InputStreamParams::operator=(const MultiplexInputStreamParams& aRhs) -> InputStreamParams&
878
0
{
879
0
    if (MaybeDestroy(TMultiplexInputStreamParams)) {
880
0
        ptr_MultiplexInputStreamParams() = new MultiplexInputStreamParams;
881
0
    }
882
0
    (*(ptr_MultiplexInputStreamParams())) = aRhs;
883
0
    mType = TMultiplexInputStreamParams;
884
0
    return (*(this));
885
0
}
886
887
auto InputStreamParams::operator=(MultiplexInputStreamParams&& aRhs) -> InputStreamParams&
888
0
{
889
0
    if (MaybeDestroy(TMultiplexInputStreamParams)) {
890
0
        ptr_MultiplexInputStreamParams() = new MultiplexInputStreamParams;
891
0
    }
892
0
    (*(ptr_MultiplexInputStreamParams())) = std::move(aRhs);
893
0
    mType = TMultiplexInputStreamParams;
894
0
    return (*(this));
895
0
}
896
897
auto InputStreamParams::operator=(const SlicedInputStreamParams& aRhs) -> InputStreamParams&
898
0
{
899
0
    if (MaybeDestroy(TSlicedInputStreamParams)) {
900
0
        ptr_SlicedInputStreamParams() = new SlicedInputStreamParams;
901
0
    }
902
0
    (*(ptr_SlicedInputStreamParams())) = aRhs;
903
0
    mType = TSlicedInputStreamParams;
904
0
    return (*(this));
905
0
}
906
907
auto InputStreamParams::operator=(SlicedInputStreamParams&& aRhs) -> InputStreamParams&
908
0
{
909
0
    if (MaybeDestroy(TSlicedInputStreamParams)) {
910
0
        ptr_SlicedInputStreamParams() = new SlicedInputStreamParams;
911
0
    }
912
0
    (*(ptr_SlicedInputStreamParams())) = std::move(aRhs);
913
0
    mType = TSlicedInputStreamParams;
914
0
    return (*(this));
915
0
}
916
917
auto InputStreamParams::operator=(const IPCBlobInputStreamParams& aRhs) -> InputStreamParams&
918
0
{
919
0
    if (MaybeDestroy(TIPCBlobInputStreamParams)) {
920
0
        new (mozilla::KnownNotNull, ptr_IPCBlobInputStreamParams()) IPCBlobInputStreamParams;
921
0
    }
922
0
    (*(ptr_IPCBlobInputStreamParams())) = aRhs;
923
0
    mType = TIPCBlobInputStreamParams;
924
0
    return (*(this));
925
0
}
926
927
auto InputStreamParams::operator=(IPCBlobInputStreamParams&& aRhs) -> InputStreamParams&
928
0
{
929
0
    if (MaybeDestroy(TIPCBlobInputStreamParams)) {
930
0
        new (mozilla::KnownNotNull, ptr_IPCBlobInputStreamParams()) IPCBlobInputStreamParams;
931
0
    }
932
0
    (*(ptr_IPCBlobInputStreamParams())) = std::move(aRhs);
933
0
    mType = TIPCBlobInputStreamParams;
934
0
    return (*(this));
935
0
}
936
937
auto InputStreamParams::operator=(const InputStreamLengthWrapperParams& aRhs) -> InputStreamParams&
938
0
{
939
0
    if (MaybeDestroy(TInputStreamLengthWrapperParams)) {
940
0
        ptr_InputStreamLengthWrapperParams() = new InputStreamLengthWrapperParams;
941
0
    }
942
0
    (*(ptr_InputStreamLengthWrapperParams())) = aRhs;
943
0
    mType = TInputStreamLengthWrapperParams;
944
0
    return (*(this));
945
0
}
946
947
auto InputStreamParams::operator=(InputStreamLengthWrapperParams&& aRhs) -> InputStreamParams&
948
0
{
949
0
    if (MaybeDestroy(TInputStreamLengthWrapperParams)) {
950
0
        ptr_InputStreamLengthWrapperParams() = new InputStreamLengthWrapperParams;
951
0
    }
952
0
    (*(ptr_InputStreamLengthWrapperParams())) = std::move(aRhs);
953
0
    mType = TInputStreamLengthWrapperParams;
954
0
    return (*(this));
955
0
}
956
957
auto InputStreamParams::operator=(const InputStreamParams& aRhs) -> InputStreamParams&
958
0
{
959
0
    (aRhs).AssertSanity();
960
0
    Type t = (aRhs).type();
961
0
    switch (t) {
962
0
    case TStringInputStreamParams:
963
0
        {
964
0
            if (MaybeDestroy(t)) {
965
0
                new (mozilla::KnownNotNull, ptr_StringInputStreamParams()) StringInputStreamParams;
966
0
            }
967
0
            (*(ptr_StringInputStreamParams())) = (aRhs).get_StringInputStreamParams();
968
0
            break;
969
0
        }
970
0
    case TFileInputStreamParams:
971
0
        {
972
0
            if (MaybeDestroy(t)) {
973
0
                new (mozilla::KnownNotNull, ptr_FileInputStreamParams()) FileInputStreamParams;
974
0
            }
975
0
            (*(ptr_FileInputStreamParams())) = (aRhs).get_FileInputStreamParams();
976
0
            break;
977
0
        }
978
0
    case TBufferedInputStreamParams:
979
0
        {
980
0
            if (MaybeDestroy(t)) {
981
0
                ptr_BufferedInputStreamParams() = new BufferedInputStreamParams;
982
0
            }
983
0
            (*(ptr_BufferedInputStreamParams())) = (aRhs).get_BufferedInputStreamParams();
984
0
            break;
985
0
        }
986
0
    case TMIMEInputStreamParams:
987
0
        {
988
0
            if (MaybeDestroy(t)) {
989
0
                ptr_MIMEInputStreamParams() = new MIMEInputStreamParams;
990
0
            }
991
0
            (*(ptr_MIMEInputStreamParams())) = (aRhs).get_MIMEInputStreamParams();
992
0
            break;
993
0
        }
994
0
    case TMultiplexInputStreamParams:
995
0
        {
996
0
            if (MaybeDestroy(t)) {
997
0
                ptr_MultiplexInputStreamParams() = new MultiplexInputStreamParams;
998
0
            }
999
0
            (*(ptr_MultiplexInputStreamParams())) = (aRhs).get_MultiplexInputStreamParams();
1000
0
            break;
1001
0
        }
1002
0
    case TSlicedInputStreamParams:
1003
0
        {
1004
0
            if (MaybeDestroy(t)) {
1005
0
                ptr_SlicedInputStreamParams() = new SlicedInputStreamParams;
1006
0
            }
1007
0
            (*(ptr_SlicedInputStreamParams())) = (aRhs).get_SlicedInputStreamParams();
1008
0
            break;
1009
0
        }
1010
0
    case TIPCBlobInputStreamParams:
1011
0
        {
1012
0
            if (MaybeDestroy(t)) {
1013
0
                new (mozilla::KnownNotNull, ptr_IPCBlobInputStreamParams()) IPCBlobInputStreamParams;
1014
0
            }
1015
0
            (*(ptr_IPCBlobInputStreamParams())) = (aRhs).get_IPCBlobInputStreamParams();
1016
0
            break;
1017
0
        }
1018
0
    case TInputStreamLengthWrapperParams:
1019
0
        {
1020
0
            if (MaybeDestroy(t)) {
1021
0
                ptr_InputStreamLengthWrapperParams() = new InputStreamLengthWrapperParams;
1022
0
            }
1023
0
            (*(ptr_InputStreamLengthWrapperParams())) = (aRhs).get_InputStreamLengthWrapperParams();
1024
0
            break;
1025
0
        }
1026
0
    case T__None:
1027
0
        {
1028
0
            static_cast<void>(MaybeDestroy(t));
1029
0
            break;
1030
0
        }
1031
0
    default:
1032
0
        {
1033
0
            mozilla::ipc::LogicError("unreached");
1034
0
            break;
1035
0
        }
1036
0
    }
1037
0
    mType = t;
1038
0
    return (*(this));
1039
0
}
1040
1041
auto InputStreamParams::operator=(InputStreamParams&& aRhs) -> InputStreamParams&
1042
0
{
1043
0
    (aRhs).AssertSanity();
1044
0
    Type t = (aRhs).type();
1045
0
    switch (t) {
1046
0
    case TStringInputStreamParams:
1047
0
        {
1048
0
            if (MaybeDestroy(t)) {
1049
0
                new (mozilla::KnownNotNull, ptr_StringInputStreamParams()) StringInputStreamParams;
1050
0
            }
1051
0
            (*(ptr_StringInputStreamParams())) = std::move((aRhs).get_StringInputStreamParams());
1052
0
            static_cast<void>((aRhs).MaybeDestroy(T__None));
1053
0
            break;
1054
0
        }
1055
0
    case TFileInputStreamParams:
1056
0
        {
1057
0
            if (MaybeDestroy(t)) {
1058
0
                new (mozilla::KnownNotNull, ptr_FileInputStreamParams()) FileInputStreamParams;
1059
0
            }
1060
0
            (*(ptr_FileInputStreamParams())) = std::move((aRhs).get_FileInputStreamParams());
1061
0
            static_cast<void>((aRhs).MaybeDestroy(T__None));
1062
0
            break;
1063
0
        }
1064
0
    case TBufferedInputStreamParams:
1065
0
        {
1066
0
            static_cast<void>(MaybeDestroy(T__None));
1067
0
            ptr_BufferedInputStreamParams() = (aRhs).ptr_BufferedInputStreamParams();
1068
0
            break;
1069
0
        }
1070
0
    case TMIMEInputStreamParams:
1071
0
        {
1072
0
            static_cast<void>(MaybeDestroy(T__None));
1073
0
            ptr_MIMEInputStreamParams() = (aRhs).ptr_MIMEInputStreamParams();
1074
0
            break;
1075
0
        }
1076
0
    case TMultiplexInputStreamParams:
1077
0
        {
1078
0
            static_cast<void>(MaybeDestroy(T__None));
1079
0
            ptr_MultiplexInputStreamParams() = (aRhs).ptr_MultiplexInputStreamParams();
1080
0
            break;
1081
0
        }
1082
0
    case TSlicedInputStreamParams:
1083
0
        {
1084
0
            static_cast<void>(MaybeDestroy(T__None));
1085
0
            ptr_SlicedInputStreamParams() = (aRhs).ptr_SlicedInputStreamParams();
1086
0
            break;
1087
0
        }
1088
0
    case TIPCBlobInputStreamParams:
1089
0
        {
1090
0
            if (MaybeDestroy(t)) {
1091
0
                new (mozilla::KnownNotNull, ptr_IPCBlobInputStreamParams()) IPCBlobInputStreamParams;
1092
0
            }
1093
0
            (*(ptr_IPCBlobInputStreamParams())) = std::move((aRhs).get_IPCBlobInputStreamParams());
1094
0
            static_cast<void>((aRhs).MaybeDestroy(T__None));
1095
0
            break;
1096
0
        }
1097
0
    case TInputStreamLengthWrapperParams:
1098
0
        {
1099
0
            static_cast<void>(MaybeDestroy(T__None));
1100
0
            ptr_InputStreamLengthWrapperParams() = (aRhs).ptr_InputStreamLengthWrapperParams();
1101
0
            break;
1102
0
        }
1103
0
    case T__None:
1104
0
        {
1105
0
            static_cast<void>(MaybeDestroy(t));
1106
0
            break;
1107
0
        }
1108
0
    default:
1109
0
        {
1110
0
            mozilla::ipc::LogicError("unreached");
1111
0
            break;
1112
0
        }
1113
0
    }
1114
0
    (aRhs).mType = T__None;
1115
0
    mType = t;
1116
0
    return (*(this));
1117
0
}
1118
1119
auto InputStreamParams::operator==(const StringInputStreamParams& aRhs) const -> bool
1120
0
{
1121
0
    return (get_StringInputStreamParams()) == (aRhs);
1122
0
}
1123
1124
auto InputStreamParams::operator==(const FileInputStreamParams& aRhs) const -> bool
1125
0
{
1126
0
    return (get_FileInputStreamParams()) == (aRhs);
1127
0
}
1128
1129
auto InputStreamParams::operator==(const BufferedInputStreamParams& aRhs) const -> bool
1130
0
{
1131
0
    return (get_BufferedInputStreamParams()) == (aRhs);
1132
0
}
1133
1134
auto InputStreamParams::operator==(const MIMEInputStreamParams& aRhs) const -> bool
1135
0
{
1136
0
    return (get_MIMEInputStreamParams()) == (aRhs);
1137
0
}
1138
1139
auto InputStreamParams::operator==(const MultiplexInputStreamParams& aRhs) const -> bool
1140
0
{
1141
0
    return (get_MultiplexInputStreamParams()) == (aRhs);
1142
0
}
1143
1144
auto InputStreamParams::operator==(const SlicedInputStreamParams& aRhs) const -> bool
1145
0
{
1146
0
    return (get_SlicedInputStreamParams()) == (aRhs);
1147
0
}
1148
1149
auto InputStreamParams::operator==(const IPCBlobInputStreamParams& aRhs) const -> bool
1150
0
{
1151
0
    return (get_IPCBlobInputStreamParams()) == (aRhs);
1152
0
}
1153
1154
auto InputStreamParams::operator==(const InputStreamLengthWrapperParams& aRhs) const -> bool
1155
0
{
1156
0
    return (get_InputStreamLengthWrapperParams()) == (aRhs);
1157
0
}
1158
1159
auto InputStreamParams::operator==(const InputStreamParams& aRhs) const -> bool
1160
0
{
1161
0
    if ((type()) != ((aRhs).type())) {
1162
0
        return false;
1163
0
    }
1164
0
1165
0
    switch (type()) {
1166
0
    case TStringInputStreamParams:
1167
0
        {
1168
0
            return (get_StringInputStreamParams()) == ((aRhs).get_StringInputStreamParams());
1169
0
        }
1170
0
    case TFileInputStreamParams:
1171
0
        {
1172
0
            return (get_FileInputStreamParams()) == ((aRhs).get_FileInputStreamParams());
1173
0
        }
1174
0
    case TBufferedInputStreamParams:
1175
0
        {
1176
0
            return (get_BufferedInputStreamParams()) == ((aRhs).get_BufferedInputStreamParams());
1177
0
        }
1178
0
    case TMIMEInputStreamParams:
1179
0
        {
1180
0
            return (get_MIMEInputStreamParams()) == ((aRhs).get_MIMEInputStreamParams());
1181
0
        }
1182
0
    case TMultiplexInputStreamParams:
1183
0
        {
1184
0
            return (get_MultiplexInputStreamParams()) == ((aRhs).get_MultiplexInputStreamParams());
1185
0
        }
1186
0
    case TSlicedInputStreamParams:
1187
0
        {
1188
0
            return (get_SlicedInputStreamParams()) == ((aRhs).get_SlicedInputStreamParams());
1189
0
        }
1190
0
    case TIPCBlobInputStreamParams:
1191
0
        {
1192
0
            return (get_IPCBlobInputStreamParams()) == ((aRhs).get_IPCBlobInputStreamParams());
1193
0
        }
1194
0
    case TInputStreamLengthWrapperParams:
1195
0
        {
1196
0
            return (get_InputStreamLengthWrapperParams()) == ((aRhs).get_InputStreamLengthWrapperParams());
1197
0
        }
1198
0
    default:
1199
0
        {
1200
0
            mozilla::ipc::LogicError("unreached");
1201
0
            return false;
1202
0
        }
1203
0
    }
1204
0
}
1205
1206
auto InputStreamParams::get(StringInputStreamParams* aOutValue) const -> void
1207
0
{
1208
0
    (*(aOutValue)) = get_StringInputStreamParams();
1209
0
}
1210
1211
auto InputStreamParams::get(FileInputStreamParams* aOutValue) const -> void
1212
0
{
1213
0
    (*(aOutValue)) = get_FileInputStreamParams();
1214
0
}
1215
1216
auto InputStreamParams::get(BufferedInputStreamParams* aOutValue) const -> void
1217
0
{
1218
0
    (*(aOutValue)) = get_BufferedInputStreamParams();
1219
0
}
1220
1221
auto InputStreamParams::get(MIMEInputStreamParams* aOutValue) const -> void
1222
0
{
1223
0
    (*(aOutValue)) = get_MIMEInputStreamParams();
1224
0
}
1225
1226
auto InputStreamParams::get(MultiplexInputStreamParams* aOutValue) const -> void
1227
0
{
1228
0
    (*(aOutValue)) = get_MultiplexInputStreamParams();
1229
0
}
1230
1231
auto InputStreamParams::get(SlicedInputStreamParams* aOutValue) const -> void
1232
0
{
1233
0
    (*(aOutValue)) = get_SlicedInputStreamParams();
1234
0
}
1235
1236
auto InputStreamParams::get(IPCBlobInputStreamParams* aOutValue) const -> void
1237
0
{
1238
0
    (*(aOutValue)) = get_IPCBlobInputStreamParams();
1239
0
}
1240
1241
auto InputStreamParams::get(InputStreamLengthWrapperParams* aOutValue) const -> void
1242
0
{
1243
0
    (*(aOutValue)) = get_InputStreamLengthWrapperParams();
1244
0
}
1245
1246
} // namespace ipc
1247
} // namespace mozilla
1248
1249
namespace mozilla {
1250
namespace ipc {
1251
auto IPDLParamTraits<mozilla::ipc::InputStreamParams>::Write(
1252
        IPC::Message* aMsg,
1253
        mozilla::ipc::IProtocol* aActor,
1254
        const paramType& aVar) -> void
1255
{
1256
    typedef mozilla::ipc::InputStreamParams union__;
1257
    int type;
1258
    type = (aVar).type();
1259
    WriteIPDLParam(aMsg, aActor, type);
1260
    // Sentinel = 'InputStreamParams'
1261
    (aMsg)->WriteSentinel(4114814015);
1262
1263
    switch (type) {
1264
    case union__::TStringInputStreamParams:
1265
        {
1266
            WriteIPDLParam(aMsg, aActor, (aVar).get_StringInputStreamParams());
1267
            // Sentinel = 'TStringInputStreamParams'
1268
            (aMsg)->WriteSentinel(3395831651);
1269
            return;
1270
        }
1271
    case union__::TFileInputStreamParams:
1272
        {
1273
            WriteIPDLParam(aMsg, aActor, (aVar).get_FileInputStreamParams());
1274
            // Sentinel = 'TFileInputStreamParams'
1275
            (aMsg)->WriteSentinel(2543620282);
1276
            return;
1277
        }
1278
    case union__::TBufferedInputStreamParams:
1279
        {
1280
            WriteIPDLParam(aMsg, aActor, (aVar).get_BufferedInputStreamParams());
1281
            // Sentinel = 'TBufferedInputStreamParams'
1282
            (aMsg)->WriteSentinel(1698289307);
1283
            return;
1284
        }
1285
    case union__::TMIMEInputStreamParams:
1286
        {
1287
            WriteIPDLParam(aMsg, aActor, (aVar).get_MIMEInputStreamParams());
1288
            // Sentinel = 'TMIMEInputStreamParams'
1289
            (aMsg)->WriteSentinel(1948001964);
1290
            return;
1291
        }
1292
    case union__::TMultiplexInputStreamParams:
1293
        {
1294
            WriteIPDLParam(aMsg, aActor, (aVar).get_MultiplexInputStreamParams());
1295
            // Sentinel = 'TMultiplexInputStreamParams'
1296
            (aMsg)->WriteSentinel(3317853213);
1297
            return;
1298
        }
1299
    case union__::TSlicedInputStreamParams:
1300
        {
1301
            WriteIPDLParam(aMsg, aActor, (aVar).get_SlicedInputStreamParams());
1302
            // Sentinel = 'TSlicedInputStreamParams'
1303
            (aMsg)->WriteSentinel(445810472);
1304
            return;
1305
        }
1306
    case union__::TIPCBlobInputStreamParams:
1307
        {
1308
            WriteIPDLParam(aMsg, aActor, (aVar).get_IPCBlobInputStreamParams());
1309
            // Sentinel = 'TIPCBlobInputStreamParams'
1310
            (aMsg)->WriteSentinel(2436989998);
1311
            return;
1312
        }
1313
    case union__::TInputStreamLengthWrapperParams:
1314
        {
1315
            WriteIPDLParam(aMsg, aActor, (aVar).get_InputStreamLengthWrapperParams());
1316
            // Sentinel = 'TInputStreamLengthWrapperParams'
1317
            (aMsg)->WriteSentinel(332208640);
1318
            return;
1319
        }
1320
    default:
1321
        {
1322
            (aActor)->FatalError("unknown union type");
1323
            return;
1324
        }
1325
    }
1326
}
1327
1328
auto IPDLParamTraits<mozilla::ipc::InputStreamParams>::Read(
1329
        const IPC::Message* aMsg,
1330
        PickleIterator* aIter,
1331
        mozilla::ipc::IProtocol* aActor,
1332
        paramType* aVar) -> bool
1333
0
{
1334
0
    typedef mozilla::ipc::InputStreamParams union__;
1335
0
    int type;
1336
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) {
1337
0
        (aActor)->FatalError("Error deserializing type of union InputStreamParams");
1338
0
        return false;
1339
0
    }
1340
0
    // Sentinel = 'InputStreamParams'
1341
0
    if ((!((aMsg)->ReadSentinel(aIter, 4114814015)))) {
1342
0
        mozilla::ipc::SentinelReadError("Error deserializing type of union InputStreamParams");
1343
0
        return false;
1344
0
    }
1345
0
1346
0
    switch (type) {
1347
0
    case union__::TStringInputStreamParams:
1348
0
        {
1349
0
            mozilla::ipc::StringInputStreamParams tmp = mozilla::ipc::StringInputStreamParams();
1350
0
            (*(aVar)) = tmp;
1351
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_StringInputStreamParams())))))) {
1352
0
                (aActor)->FatalError("Error deserializing variant TStringInputStreamParams of union InputStreamParams");
1353
0
                return false;
1354
0
            }
1355
0
            // Sentinel = 'TStringInputStreamParams'
1356
0
            if ((!((aMsg)->ReadSentinel(aIter, 3395831651)))) {
1357
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TStringInputStreamParams of union InputStreamParams");
1358
0
                return false;
1359
0
            }
1360
0
            return true;
1361
0
        }
1362
0
    case union__::TFileInputStreamParams:
1363
0
        {
1364
0
            mozilla::ipc::FileInputStreamParams tmp = mozilla::ipc::FileInputStreamParams();
1365
0
            (*(aVar)) = tmp;
1366
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_FileInputStreamParams())))))) {
1367
0
                (aActor)->FatalError("Error deserializing variant TFileInputStreamParams of union InputStreamParams");
1368
0
                return false;
1369
0
            }
1370
0
            // Sentinel = 'TFileInputStreamParams'
1371
0
            if ((!((aMsg)->ReadSentinel(aIter, 2543620282)))) {
1372
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TFileInputStreamParams of union InputStreamParams");
1373
0
                return false;
1374
0
            }
1375
0
            return true;
1376
0
        }
1377
0
    case union__::TBufferedInputStreamParams:
1378
0
        {
1379
0
            mozilla::ipc::BufferedInputStreamParams tmp = mozilla::ipc::BufferedInputStreamParams();
1380
0
            (*(aVar)) = tmp;
1381
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_BufferedInputStreamParams())))))) {
1382
0
                (aActor)->FatalError("Error deserializing variant TBufferedInputStreamParams of union InputStreamParams");
1383
0
                return false;
1384
0
            }
1385
0
            // Sentinel = 'TBufferedInputStreamParams'
1386
0
            if ((!((aMsg)->ReadSentinel(aIter, 1698289307)))) {
1387
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TBufferedInputStreamParams of union InputStreamParams");
1388
0
                return false;
1389
0
            }
1390
0
            return true;
1391
0
        }
1392
0
    case union__::TMIMEInputStreamParams:
1393
0
        {
1394
0
            mozilla::ipc::MIMEInputStreamParams tmp = mozilla::ipc::MIMEInputStreamParams();
1395
0
            (*(aVar)) = tmp;
1396
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_MIMEInputStreamParams())))))) {
1397
0
                (aActor)->FatalError("Error deserializing variant TMIMEInputStreamParams of union InputStreamParams");
1398
0
                return false;
1399
0
            }
1400
0
            // Sentinel = 'TMIMEInputStreamParams'
1401
0
            if ((!((aMsg)->ReadSentinel(aIter, 1948001964)))) {
1402
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TMIMEInputStreamParams of union InputStreamParams");
1403
0
                return false;
1404
0
            }
1405
0
            return true;
1406
0
        }
1407
0
    case union__::TMultiplexInputStreamParams:
1408
0
        {
1409
0
            mozilla::ipc::MultiplexInputStreamParams tmp = mozilla::ipc::MultiplexInputStreamParams();
1410
0
            (*(aVar)) = tmp;
1411
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_MultiplexInputStreamParams())))))) {
1412
0
                (aActor)->FatalError("Error deserializing variant TMultiplexInputStreamParams of union InputStreamParams");
1413
0
                return false;
1414
0
            }
1415
0
            // Sentinel = 'TMultiplexInputStreamParams'
1416
0
            if ((!((aMsg)->ReadSentinel(aIter, 3317853213)))) {
1417
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TMultiplexInputStreamParams of union InputStreamParams");
1418
0
                return false;
1419
0
            }
1420
0
            return true;
1421
0
        }
1422
0
    case union__::TSlicedInputStreamParams:
1423
0
        {
1424
0
            mozilla::ipc::SlicedInputStreamParams tmp = mozilla::ipc::SlicedInputStreamParams();
1425
0
            (*(aVar)) = tmp;
1426
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SlicedInputStreamParams())))))) {
1427
0
                (aActor)->FatalError("Error deserializing variant TSlicedInputStreamParams of union InputStreamParams");
1428
0
                return false;
1429
0
            }
1430
0
            // Sentinel = 'TSlicedInputStreamParams'
1431
0
            if ((!((aMsg)->ReadSentinel(aIter, 445810472)))) {
1432
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TSlicedInputStreamParams of union InputStreamParams");
1433
0
                return false;
1434
0
            }
1435
0
            return true;
1436
0
        }
1437
0
    case union__::TIPCBlobInputStreamParams:
1438
0
        {
1439
0
            mozilla::ipc::IPCBlobInputStreamParams tmp = mozilla::ipc::IPCBlobInputStreamParams();
1440
0
            (*(aVar)) = tmp;
1441
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_IPCBlobInputStreamParams())))))) {
1442
0
                (aActor)->FatalError("Error deserializing variant TIPCBlobInputStreamParams of union InputStreamParams");
1443
0
                return false;
1444
0
            }
1445
0
            // Sentinel = 'TIPCBlobInputStreamParams'
1446
0
            if ((!((aMsg)->ReadSentinel(aIter, 2436989998)))) {
1447
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TIPCBlobInputStreamParams of union InputStreamParams");
1448
0
                return false;
1449
0
            }
1450
0
            return true;
1451
0
        }
1452
0
    case union__::TInputStreamLengthWrapperParams:
1453
0
        {
1454
0
            mozilla::ipc::InputStreamLengthWrapperParams tmp = mozilla::ipc::InputStreamLengthWrapperParams();
1455
0
            (*(aVar)) = tmp;
1456
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_InputStreamLengthWrapperParams())))))) {
1457
0
                (aActor)->FatalError("Error deserializing variant TInputStreamLengthWrapperParams of union InputStreamParams");
1458
0
                return false;
1459
0
            }
1460
0
            // Sentinel = 'TInputStreamLengthWrapperParams'
1461
0
            if ((!((aMsg)->ReadSentinel(aIter, 332208640)))) {
1462
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TInputStreamLengthWrapperParams of union InputStreamParams");
1463
0
                return false;
1464
0
            }
1465
0
            return true;
1466
0
        }
1467
0
    default:
1468
0
        {
1469
0
            (aActor)->FatalError("unknown union type");
1470
0
            return false;
1471
0
        }
1472
0
    }
1473
0
}
1474
1475
} // namespace ipc
1476
} // namespace mozilla
1477
1478
//-----------------------------------------------------------------------------
1479
// Method definitions for the IPDL type |union OptionalInputStreamParams|
1480
//
1481
namespace mozilla {
1482
namespace ipc {
1483
auto OptionalInputStreamParams::MaybeDestroy(Type aNewType) -> bool
1484
0
{
1485
0
    if ((mType) == (T__None)) {
1486
0
        return true;
1487
0
    }
1488
0
    if ((mType) == (aNewType)) {
1489
0
        return false;
1490
0
    }
1491
0
    switch (mType) {
1492
0
    case Tvoid_t:
1493
0
        {
1494
0
            (ptr_void_t())->~void_t__tdef();
1495
0
            break;
1496
0
        }
1497
0
    case TInputStreamParams:
1498
0
        {
1499
0
            delete ptr_InputStreamParams();
1500
0
            break;
1501
0
        }
1502
0
    default:
1503
0
        {
1504
0
            mozilla::ipc::LogicError("not reached");
1505
0
            break;
1506
0
        }
1507
0
    }
1508
0
    return true;
1509
0
}
1510
1511
MOZ_IMPLICIT OptionalInputStreamParams::OptionalInputStreamParams(const void_t& aOther)
1512
0
{
1513
0
    new (mozilla::KnownNotNull, ptr_void_t()) void_t(aOther);
1514
0
    mType = Tvoid_t;
1515
0
}
1516
1517
MOZ_IMPLICIT OptionalInputStreamParams::OptionalInputStreamParams(void_t&& aOther)
1518
0
{
1519
0
    new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move(aOther));
1520
0
    mType = Tvoid_t;
1521
0
}
1522
1523
MOZ_IMPLICIT OptionalInputStreamParams::OptionalInputStreamParams(const InputStreamParams& aOther)
1524
0
{
1525
0
    ptr_InputStreamParams() = new InputStreamParams(aOther);
1526
0
    mType = TInputStreamParams;
1527
0
}
1528
1529
MOZ_IMPLICIT OptionalInputStreamParams::OptionalInputStreamParams(InputStreamParams&& aOther)
1530
0
{
1531
0
    ptr_InputStreamParams() = new InputStreamParams(std::move(aOther));
1532
0
    mType = TInputStreamParams;
1533
0
}
1534
1535
MOZ_IMPLICIT OptionalInputStreamParams::OptionalInputStreamParams(const OptionalInputStreamParams& aOther)
1536
0
{
1537
0
    (aOther).AssertSanity();
1538
0
    switch ((aOther).type()) {
1539
0
    case Tvoid_t:
1540
0
        {
1541
0
            new (mozilla::KnownNotNull, ptr_void_t()) void_t((aOther).get_void_t());
1542
0
            break;
1543
0
        }
1544
0
    case TInputStreamParams:
1545
0
        {
1546
0
            ptr_InputStreamParams() = new InputStreamParams((aOther).get_InputStreamParams());
1547
0
            break;
1548
0
        }
1549
0
    case T__None:
1550
0
        {
1551
0
            break;
1552
0
        }
1553
0
    default:
1554
0
        {
1555
0
            mozilla::ipc::LogicError("unreached");
1556
0
            return;
1557
0
        }
1558
0
    }
1559
0
    mType = (aOther).type();
1560
0
}
1561
1562
MOZ_IMPLICIT OptionalInputStreamParams::OptionalInputStreamParams(OptionalInputStreamParams&& aOther)
1563
0
{
1564
0
    (aOther).AssertSanity();
1565
0
    Type t = (aOther).type();
1566
0
    switch (t) {
1567
0
    case Tvoid_t:
1568
0
        {
1569
0
            new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move((aOther).get_void_t()));
1570
0
            static_cast<void>((aOther).MaybeDestroy(T__None));
1571
0
            break;
1572
0
        }
1573
0
    case TInputStreamParams:
1574
0
        {
1575
0
            ptr_InputStreamParams() = (aOther).ptr_InputStreamParams();
1576
0
            break;
1577
0
        }
1578
0
    case T__None:
1579
0
        {
1580
0
            break;
1581
0
        }
1582
0
    default:
1583
0
        {
1584
0
            mozilla::ipc::LogicError("unreached");
1585
0
            return;
1586
0
        }
1587
0
    }
1588
0
    (aOther).mType = T__None;
1589
0
    mType = t;
1590
0
}
1591
1592
OptionalInputStreamParams::~OptionalInputStreamParams()
1593
0
{
1594
0
    static_cast<void>(MaybeDestroy(T__None));
1595
0
}
1596
1597
auto OptionalInputStreamParams::operator=(const void_t& aRhs) -> OptionalInputStreamParams&
1598
0
{
1599
0
    if (MaybeDestroy(Tvoid_t)) {
1600
0
        new (mozilla::KnownNotNull, ptr_void_t()) void_t;
1601
0
    }
1602
0
    (*(ptr_void_t())) = aRhs;
1603
0
    mType = Tvoid_t;
1604
0
    return (*(this));
1605
0
}
1606
1607
auto OptionalInputStreamParams::operator=(void_t&& aRhs) -> OptionalInputStreamParams&
1608
0
{
1609
0
    if (MaybeDestroy(Tvoid_t)) {
1610
0
        new (mozilla::KnownNotNull, ptr_void_t()) void_t;
1611
0
    }
1612
0
    (*(ptr_void_t())) = std::move(aRhs);
1613
0
    mType = Tvoid_t;
1614
0
    return (*(this));
1615
0
}
1616
1617
auto OptionalInputStreamParams::operator=(const InputStreamParams& aRhs) -> OptionalInputStreamParams&
1618
0
{
1619
0
    if (MaybeDestroy(TInputStreamParams)) {
1620
0
        ptr_InputStreamParams() = new InputStreamParams;
1621
0
    }
1622
0
    (*(ptr_InputStreamParams())) = aRhs;
1623
0
    mType = TInputStreamParams;
1624
0
    return (*(this));
1625
0
}
1626
1627
auto OptionalInputStreamParams::operator=(InputStreamParams&& aRhs) -> OptionalInputStreamParams&
1628
0
{
1629
0
    if (MaybeDestroy(TInputStreamParams)) {
1630
0
        ptr_InputStreamParams() = new InputStreamParams;
1631
0
    }
1632
0
    (*(ptr_InputStreamParams())) = std::move(aRhs);
1633
0
    mType = TInputStreamParams;
1634
0
    return (*(this));
1635
0
}
1636
1637
auto OptionalInputStreamParams::operator=(const OptionalInputStreamParams& aRhs) -> OptionalInputStreamParams&
1638
0
{
1639
0
    (aRhs).AssertSanity();
1640
0
    Type t = (aRhs).type();
1641
0
    switch (t) {
1642
0
    case Tvoid_t:
1643
0
        {
1644
0
            if (MaybeDestroy(t)) {
1645
0
                new (mozilla::KnownNotNull, ptr_void_t()) void_t;
1646
0
            }
1647
0
            (*(ptr_void_t())) = (aRhs).get_void_t();
1648
0
            break;
1649
0
        }
1650
0
    case TInputStreamParams:
1651
0
        {
1652
0
            if (MaybeDestroy(t)) {
1653
0
                ptr_InputStreamParams() = new InputStreamParams;
1654
0
            }
1655
0
            (*(ptr_InputStreamParams())) = (aRhs).get_InputStreamParams();
1656
0
            break;
1657
0
        }
1658
0
    case T__None:
1659
0
        {
1660
0
            static_cast<void>(MaybeDestroy(t));
1661
0
            break;
1662
0
        }
1663
0
    default:
1664
0
        {
1665
0
            mozilla::ipc::LogicError("unreached");
1666
0
            break;
1667
0
        }
1668
0
    }
1669
0
    mType = t;
1670
0
    return (*(this));
1671
0
}
1672
1673
auto OptionalInputStreamParams::operator=(OptionalInputStreamParams&& aRhs) -> OptionalInputStreamParams&
1674
0
{
1675
0
    (aRhs).AssertSanity();
1676
0
    Type t = (aRhs).type();
1677
0
    switch (t) {
1678
0
    case Tvoid_t:
1679
0
        {
1680
0
            if (MaybeDestroy(t)) {
1681
0
                new (mozilla::KnownNotNull, ptr_void_t()) void_t;
1682
0
            }
1683
0
            (*(ptr_void_t())) = std::move((aRhs).get_void_t());
1684
0
            static_cast<void>((aRhs).MaybeDestroy(T__None));
1685
0
            break;
1686
0
        }
1687
0
    case TInputStreamParams:
1688
0
        {
1689
0
            static_cast<void>(MaybeDestroy(T__None));
1690
0
            ptr_InputStreamParams() = (aRhs).ptr_InputStreamParams();
1691
0
            break;
1692
0
        }
1693
0
    case T__None:
1694
0
        {
1695
0
            static_cast<void>(MaybeDestroy(t));
1696
0
            break;
1697
0
        }
1698
0
    default:
1699
0
        {
1700
0
            mozilla::ipc::LogicError("unreached");
1701
0
            break;
1702
0
        }
1703
0
    }
1704
0
    (aRhs).mType = T__None;
1705
0
    mType = t;
1706
0
    return (*(this));
1707
0
}
1708
1709
auto OptionalInputStreamParams::operator==(const void_t& aRhs) const -> bool
1710
0
{
1711
0
    return (get_void_t()) == (aRhs);
1712
0
}
1713
1714
auto OptionalInputStreamParams::operator==(const InputStreamParams& aRhs) const -> bool
1715
0
{
1716
0
    return (get_InputStreamParams()) == (aRhs);
1717
0
}
1718
1719
auto OptionalInputStreamParams::operator==(const OptionalInputStreamParams& aRhs) const -> bool
1720
0
{
1721
0
    if ((type()) != ((aRhs).type())) {
1722
0
        return false;
1723
0
    }
1724
0
1725
0
    switch (type()) {
1726
0
    case Tvoid_t:
1727
0
        {
1728
0
            return (get_void_t()) == ((aRhs).get_void_t());
1729
0
        }
1730
0
    case TInputStreamParams:
1731
0
        {
1732
0
            return (get_InputStreamParams()) == ((aRhs).get_InputStreamParams());
1733
0
        }
1734
0
    default:
1735
0
        {
1736
0
            mozilla::ipc::LogicError("unreached");
1737
0
            return false;
1738
0
        }
1739
0
    }
1740
0
}
1741
1742
auto OptionalInputStreamParams::get(void_t* aOutValue) const -> void
1743
0
{
1744
0
    (*(aOutValue)) = get_void_t();
1745
0
}
1746
1747
auto OptionalInputStreamParams::get(InputStreamParams* aOutValue) const -> void
1748
0
{
1749
0
    (*(aOutValue)) = get_InputStreamParams();
1750
0
}
1751
1752
} // namespace ipc
1753
} // namespace mozilla
1754
1755
namespace mozilla {
1756
namespace ipc {
1757
auto IPDLParamTraits<mozilla::ipc::OptionalInputStreamParams>::Write(
1758
        IPC::Message* aMsg,
1759
        mozilla::ipc::IProtocol* aActor,
1760
        const paramType& aVar) -> void
1761
{
1762
    typedef mozilla::ipc::OptionalInputStreamParams union__;
1763
    int type;
1764
    type = (aVar).type();
1765
    WriteIPDLParam(aMsg, aActor, type);
1766
    // Sentinel = 'OptionalInputStreamParams'
1767
    (aMsg)->WriteSentinel(1355174443);
1768
1769
    switch (type) {
1770
    case union__::Tvoid_t:
1771
        {
1772
            WriteIPDLParam(aMsg, aActor, (aVar).get_void_t());
1773
            // Sentinel = 'Tvoid_t'
1774
            (aMsg)->WriteSentinel(3041273328);
1775
            return;
1776
        }
1777
    case union__::TInputStreamParams:
1778
        {
1779
            WriteIPDLParam(aMsg, aActor, (aVar).get_InputStreamParams());
1780
            // Sentinel = 'TInputStreamParams'
1781
            (aMsg)->WriteSentinel(55652096);
1782
            return;
1783
        }
1784
    default:
1785
        {
1786
            (aActor)->FatalError("unknown union type");
1787
            return;
1788
        }
1789
    }
1790
}
1791
1792
auto IPDLParamTraits<mozilla::ipc::OptionalInputStreamParams>::Read(
1793
        const IPC::Message* aMsg,
1794
        PickleIterator* aIter,
1795
        mozilla::ipc::IProtocol* aActor,
1796
        paramType* aVar) -> bool
1797
0
{
1798
0
    typedef mozilla::ipc::OptionalInputStreamParams union__;
1799
0
    int type;
1800
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) {
1801
0
        (aActor)->FatalError("Error deserializing type of union OptionalInputStreamParams");
1802
0
        return false;
1803
0
    }
1804
0
    // Sentinel = 'OptionalInputStreamParams'
1805
0
    if ((!((aMsg)->ReadSentinel(aIter, 1355174443)))) {
1806
0
        mozilla::ipc::SentinelReadError("Error deserializing type of union OptionalInputStreamParams");
1807
0
        return false;
1808
0
    }
1809
0
1810
0
    switch (type) {
1811
0
    case union__::Tvoid_t:
1812
0
        {
1813
0
            mozilla::void_t tmp = mozilla::void_t();
1814
0
            (*(aVar)) = tmp;
1815
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_void_t())))))) {
1816
0
                (aActor)->FatalError("Error deserializing variant Tvoid_t of union OptionalInputStreamParams");
1817
0
                return false;
1818
0
            }
1819
0
            // Sentinel = 'Tvoid_t'
1820
0
            if ((!((aMsg)->ReadSentinel(aIter, 3041273328)))) {
1821
0
                mozilla::ipc::SentinelReadError("Error deserializing variant Tvoid_t of union OptionalInputStreamParams");
1822
0
                return false;
1823
0
            }
1824
0
            return true;
1825
0
        }
1826
0
    case union__::TInputStreamParams:
1827
0
        {
1828
0
            mozilla::ipc::InputStreamParams tmp = mozilla::ipc::InputStreamParams();
1829
0
            (*(aVar)) = tmp;
1830
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_InputStreamParams())))))) {
1831
0
                (aActor)->FatalError("Error deserializing variant TInputStreamParams of union OptionalInputStreamParams");
1832
0
                return false;
1833
0
            }
1834
0
            // Sentinel = 'TInputStreamParams'
1835
0
            if ((!((aMsg)->ReadSentinel(aIter, 55652096)))) {
1836
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TInputStreamParams of union OptionalInputStreamParams");
1837
0
                return false;
1838
0
            }
1839
0
            return true;
1840
0
        }
1841
0
    default:
1842
0
        {
1843
0
            (aActor)->FatalError("unknown union type");
1844
0
            return false;
1845
0
        }
1846
0
    }
1847
0
}
1848
1849
} // namespace ipc
1850
} // namespace mozilla
1851
1852
//-----------------------------------------------------------------------------
1853
// Method definitions for the IPDL type |struct BufferedInputStreamParams|
1854
//
1855
namespace mozilla {
1856
namespace ipc {
1857
auto BufferedInputStreamParams::operator==(const BufferedInputStreamParams& _o) const -> bool
1858
0
{
1859
0
    if ((!((optionalStream()) == ((_o).optionalStream())))) {
1860
0
        return false;
1861
0
    }
1862
0
    if ((!((bufferSize()) == ((_o).bufferSize())))) {
1863
0
        return false;
1864
0
    }
1865
0
    return true;
1866
0
}
1867
1868
auto BufferedInputStreamParams::operator!=(const BufferedInputStreamParams& _o) const -> bool
1869
0
{
1870
0
    return (!(operator==(_o)));
1871
0
}
1872
1873
} // namespace ipc
1874
} // namespace mozilla
1875
1876
namespace mozilla {
1877
namespace ipc {
1878
auto IPDLParamTraits<mozilla::ipc::BufferedInputStreamParams>::Write(
1879
        IPC::Message* aMsg,
1880
        mozilla::ipc::IProtocol* aActor,
1881
        const paramType& aVar) -> void
1882
0
{
1883
0
    WriteIPDLParam(aMsg, aActor, (aVar).optionalStream());
1884
0
    // Sentinel = 'optionalStream'
1885
0
    (aMsg)->WriteSentinel(1003718562);
1886
0
    WriteIPDLParam(aMsg, aActor, (aVar).bufferSize());
1887
0
    // Sentinel = 'bufferSize'
1888
0
    (aMsg)->WriteSentinel(3444538779);
1889
0
}
1890
1891
auto IPDLParamTraits<mozilla::ipc::BufferedInputStreamParams>::Read(
1892
        const IPC::Message* aMsg,
1893
        PickleIterator* aIter,
1894
        mozilla::ipc::IProtocol* aActor,
1895
        paramType* aVar) -> bool
1896
0
{
1897
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->optionalStream())))))) {
1898
0
        (aActor)->FatalError("Error deserializing 'optionalStream' (OptionalInputStreamParams) member of 'BufferedInputStreamParams'");
1899
0
        return false;
1900
0
    }
1901
0
    // Sentinel = 'optionalStream'
1902
0
    if ((!((aMsg)->ReadSentinel(aIter, 1003718562)))) {
1903
0
        mozilla::ipc::SentinelReadError("Error deserializing 'optionalStream' (OptionalInputStreamParams) member of 'BufferedInputStreamParams'");
1904
0
        return false;
1905
0
    }
1906
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->bufferSize())))))) {
1907
0
        (aActor)->FatalError("Error deserializing 'bufferSize' (uint32_t) member of 'BufferedInputStreamParams'");
1908
0
        return false;
1909
0
    }
1910
0
    // Sentinel = 'bufferSize'
1911
0
    if ((!((aMsg)->ReadSentinel(aIter, 3444538779)))) {
1912
0
        mozilla::ipc::SentinelReadError("Error deserializing 'bufferSize' (uint32_t) member of 'BufferedInputStreamParams'");
1913
0
        return false;
1914
0
    }
1915
0
    return true;
1916
0
}
1917
1918
} // namespace ipc
1919
} // namespace mozilla
1920
1921
//-----------------------------------------------------------------------------
1922
// Method definitions for the IPDL type |struct MIMEInputStreamParams|
1923
//
1924
namespace mozilla {
1925
namespace ipc {
1926
auto MIMEInputStreamParams::operator==(const MIMEInputStreamParams& _o) const -> bool
1927
0
{
1928
0
    if ((!((optionalStream()) == ((_o).optionalStream())))) {
1929
0
        return false;
1930
0
    }
1931
0
    if ((!((headers()) == ((_o).headers())))) {
1932
0
        return false;
1933
0
    }
1934
0
    if ((!((startedReading()) == ((_o).startedReading())))) {
1935
0
        return false;
1936
0
    }
1937
0
    return true;
1938
0
}
1939
1940
auto MIMEInputStreamParams::operator!=(const MIMEInputStreamParams& _o) const -> bool
1941
0
{
1942
0
    return (!(operator==(_o)));
1943
0
}
1944
1945
} // namespace ipc
1946
} // namespace mozilla
1947
1948
namespace mozilla {
1949
namespace ipc {
1950
auto IPDLParamTraits<mozilla::ipc::MIMEInputStreamParams>::Write(
1951
        IPC::Message* aMsg,
1952
        mozilla::ipc::IProtocol* aActor,
1953
        const paramType& aVar) -> void
1954
0
{
1955
0
    WriteIPDLParam(aMsg, aActor, (aVar).optionalStream());
1956
0
    // Sentinel = 'optionalStream'
1957
0
    (aMsg)->WriteSentinel(1003718562);
1958
0
    WriteIPDLParam(aMsg, aActor, (aVar).headers());
1959
0
    // Sentinel = 'headers'
1960
0
    (aMsg)->WriteSentinel(4284175217);
1961
0
    WriteIPDLParam(aMsg, aActor, (aVar).startedReading());
1962
0
    // Sentinel = 'startedReading'
1963
0
    (aMsg)->WriteSentinel(1906875903);
1964
0
}
1965
1966
auto IPDLParamTraits<mozilla::ipc::MIMEInputStreamParams>::Read(
1967
        const IPC::Message* aMsg,
1968
        PickleIterator* aIter,
1969
        mozilla::ipc::IProtocol* aActor,
1970
        paramType* aVar) -> bool
1971
0
{
1972
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->optionalStream())))))) {
1973
0
        (aActor)->FatalError("Error deserializing 'optionalStream' (OptionalInputStreamParams) member of 'MIMEInputStreamParams'");
1974
0
        return false;
1975
0
    }
1976
0
    // Sentinel = 'optionalStream'
1977
0
    if ((!((aMsg)->ReadSentinel(aIter, 1003718562)))) {
1978
0
        mozilla::ipc::SentinelReadError("Error deserializing 'optionalStream' (OptionalInputStreamParams) member of 'MIMEInputStreamParams'");
1979
0
        return false;
1980
0
    }
1981
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->headers())))))) {
1982
0
        (aActor)->FatalError("Error deserializing 'headers' (HeaderEntry[]) member of 'MIMEInputStreamParams'");
1983
0
        return false;
1984
0
    }
1985
0
    // Sentinel = 'headers'
1986
0
    if ((!((aMsg)->ReadSentinel(aIter, 4284175217)))) {
1987
0
        mozilla::ipc::SentinelReadError("Error deserializing 'headers' (HeaderEntry[]) member of 'MIMEInputStreamParams'");
1988
0
        return false;
1989
0
    }
1990
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->startedReading())))))) {
1991
0
        (aActor)->FatalError("Error deserializing 'startedReading' (bool) member of 'MIMEInputStreamParams'");
1992
0
        return false;
1993
0
    }
1994
0
    // Sentinel = 'startedReading'
1995
0
    if ((!((aMsg)->ReadSentinel(aIter, 1906875903)))) {
1996
0
        mozilla::ipc::SentinelReadError("Error deserializing 'startedReading' (bool) member of 'MIMEInputStreamParams'");
1997
0
        return false;
1998
0
    }
1999
0
    return true;
2000
0
}
2001
2002
} // namespace ipc
2003
} // namespace mozilla
2004
2005
//-----------------------------------------------------------------------------
2006
// Method definitions for the IPDL type |struct InputStreamLengthWrapperParams|
2007
//
2008
namespace mozilla {
2009
namespace ipc {
2010
auto InputStreamLengthWrapperParams::operator==(const InputStreamLengthWrapperParams& _o) const -> bool
2011
0
{
2012
0
    if ((!((stream()) == ((_o).stream())))) {
2013
0
        return false;
2014
0
    }
2015
0
    if ((!((length()) == ((_o).length())))) {
2016
0
        return false;
2017
0
    }
2018
0
    if ((!((consumed()) == ((_o).consumed())))) {
2019
0
        return false;
2020
0
    }
2021
0
    return true;
2022
0
}
2023
2024
auto InputStreamLengthWrapperParams::operator!=(const InputStreamLengthWrapperParams& _o) const -> bool
2025
0
{
2026
0
    return (!(operator==(_o)));
2027
0
}
2028
2029
} // namespace ipc
2030
} // namespace mozilla
2031
2032
namespace mozilla {
2033
namespace ipc {
2034
auto IPDLParamTraits<mozilla::ipc::InputStreamLengthWrapperParams>::Write(
2035
        IPC::Message* aMsg,
2036
        mozilla::ipc::IProtocol* aActor,
2037
        const paramType& aVar) -> void
2038
0
{
2039
0
    WriteIPDLParam(aMsg, aActor, (aVar).stream());
2040
0
    // Sentinel = 'stream'
2041
0
    (aMsg)->WriteSentinel(4152748422);
2042
0
    WriteIPDLParam(aMsg, aActor, (aVar).length());
2043
0
    // Sentinel = 'length'
2044
0
    (aMsg)->WriteSentinel(1726618354);
2045
0
    WriteIPDLParam(aMsg, aActor, (aVar).consumed());
2046
0
    // Sentinel = 'consumed'
2047
0
    (aMsg)->WriteSentinel(722813930);
2048
0
}
2049
2050
auto IPDLParamTraits<mozilla::ipc::InputStreamLengthWrapperParams>::Read(
2051
        const IPC::Message* aMsg,
2052
        PickleIterator* aIter,
2053
        mozilla::ipc::IProtocol* aActor,
2054
        paramType* aVar) -> bool
2055
0
{
2056
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->stream())))))) {
2057
0
        (aActor)->FatalError("Error deserializing 'stream' (InputStreamParams) member of 'InputStreamLengthWrapperParams'");
2058
0
        return false;
2059
0
    }
2060
0
    // Sentinel = 'stream'
2061
0
    if ((!((aMsg)->ReadSentinel(aIter, 4152748422)))) {
2062
0
        mozilla::ipc::SentinelReadError("Error deserializing 'stream' (InputStreamParams) member of 'InputStreamLengthWrapperParams'");
2063
0
        return false;
2064
0
    }
2065
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->length())))))) {
2066
0
        (aActor)->FatalError("Error deserializing 'length' (int64_t) member of 'InputStreamLengthWrapperParams'");
2067
0
        return false;
2068
0
    }
2069
0
    // Sentinel = 'length'
2070
0
    if ((!((aMsg)->ReadSentinel(aIter, 1726618354)))) {
2071
0
        mozilla::ipc::SentinelReadError("Error deserializing 'length' (int64_t) member of 'InputStreamLengthWrapperParams'");
2072
0
        return false;
2073
0
    }
2074
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->consumed())))))) {
2075
0
        (aActor)->FatalError("Error deserializing 'consumed' (bool) member of 'InputStreamLengthWrapperParams'");
2076
0
        return false;
2077
0
    }
2078
0
    // Sentinel = 'consumed'
2079
0
    if ((!((aMsg)->ReadSentinel(aIter, 722813930)))) {
2080
0
        mozilla::ipc::SentinelReadError("Error deserializing 'consumed' (bool) member of 'InputStreamLengthWrapperParams'");
2081
0
        return false;
2082
0
    }
2083
0
    return true;
2084
0
}
2085
2086
} // namespace ipc
2087
} // namespace mozilla