Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PBackgroundSDBConnection.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/PBackgroundParent.h"
8
#include "mozilla/ipc/PBackgroundChild.h"
9
#include "mozilla/dom/PBackgroundSDBRequestParent.h"
10
#include "mozilla/dom/PBackgroundSDBRequestChild.h"
11
#include "mozilla/dom/PBackgroundSDBConnection.h"
12
13
namespace mozilla {
14
namespace dom {
15
namespace PBackgroundSDBConnection {
16
17
nsresult
18
CreateEndpoints(
19
        base::ProcessId aParentDestPid,
20
        base::ProcessId aChildDestPid,
21
        mozilla::ipc::Endpoint<mozilla::dom::PBackgroundSDBConnectionParent>* aParent,
22
        mozilla::ipc::Endpoint<mozilla::dom::PBackgroundSDBConnectionChild>* aChild)
23
0
{
24
0
    return mozilla::ipc::CreateEndpoints(mozilla::ipc::PrivateIPDLInterface(), aParentDestPid, aChildDestPid, aParent, aChild);
25
0
}
26
IPC::Message*
27
Msg_DeleteMe(int32_t routingId)
28
0
{
29
0
    return IPC::Message::IPDLMessage(routingId, Msg_DeleteMe__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY));
30
0
}
31
IPC::Message*
32
Msg_PBackgroundSDBRequestConstructor(int32_t routingId)
33
0
{
34
0
    return IPC::Message::IPDLMessage(routingId, Msg_PBackgroundSDBRequestConstructor__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY));
35
0
}
36
IPC::Message*
37
Reply_PBackgroundSDBRequestConstructor(int32_t routingId)
38
0
{
39
0
    return IPC::Message::IPDLMessage(routingId, Reply_PBackgroundSDBRequestConstructor__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::REPLY));
40
0
}
41
IPC::Message*
42
Msg___delete__(int32_t routingId)
43
0
{
44
0
    return IPC::Message::IPDLMessage(routingId, Msg___delete____ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY));
45
0
}
46
IPC::Message*
47
Reply___delete__(int32_t routingId)
48
0
{
49
0
    return IPC::Message::IPDLMessage(routingId, Reply___delete____ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::REPLY));
50
0
}
51
IPC::Message*
52
Msg_AllowToClose(int32_t routingId)
53
0
{
54
0
    return IPC::Message::IPDLMessage(routingId, Msg_AllowToClose__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY));
55
0
}
56
IPC::Message*
57
Msg_Closed(int32_t routingId)
58
0
{
59
0
    return IPC::Message::IPDLMessage(routingId, Msg_Closed__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY));
60
0
}
61
62
} // namespace PBackgroundSDBConnection
63
} // namespace dom
64
} // namespace mozilla
65
66
//-----------------------------------------------------------------------------
67
// Method definitions for the IPDL type |struct SDBRequestOpenParams|
68
//
69
namespace mozilla {
70
namespace dom {
71
auto SDBRequestOpenParams::operator==(const SDBRequestOpenParams& _o) const -> bool
72
0
{
73
0
    if ((!((name()) == ((_o).name())))) {
74
0
        return false;
75
0
    }
76
0
    return true;
77
0
}
78
79
auto SDBRequestOpenParams::operator!=(const SDBRequestOpenParams& _o) const -> bool
80
0
{
81
0
    return (!(operator==(_o)));
82
0
}
83
84
} // namespace dom
85
} // namespace mozilla
86
87
namespace mozilla {
88
namespace ipc {
89
auto IPDLParamTraits<mozilla::dom::SDBRequestOpenParams>::Write(
90
        IPC::Message* aMsg,
91
        mozilla::ipc::IProtocol* aActor,
92
        const paramType& aVar) -> void
93
0
{
94
0
    WriteIPDLParam(aMsg, aActor, (aVar).name());
95
0
    // Sentinel = 'name'
96
0
    (aMsg)->WriteSentinel(15034981);
97
0
}
98
99
auto IPDLParamTraits<mozilla::dom::SDBRequestOpenParams>::Read(
100
        const IPC::Message* aMsg,
101
        PickleIterator* aIter,
102
        mozilla::ipc::IProtocol* aActor,
103
        paramType* aVar) -> bool
104
0
{
105
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->name())))))) {
106
0
        (aActor)->FatalError("Error deserializing 'name' (nsString) member of 'SDBRequestOpenParams'");
107
0
        return false;
108
0
    }
109
0
    // Sentinel = 'name'
110
0
    if ((!((aMsg)->ReadSentinel(aIter, 15034981)))) {
111
0
        mozilla::ipc::SentinelReadError("Error deserializing 'name' (nsString) member of 'SDBRequestOpenParams'");
112
0
        return false;
113
0
    }
114
0
    return true;
115
0
}
116
117
} // namespace ipc
118
} // namespace mozilla
119
120
//-----------------------------------------------------------------------------
121
// Method definitions for the IPDL type |struct SDBRequestSeekParams|
122
//
123
namespace mozilla {
124
namespace dom {
125
auto SDBRequestSeekParams::operator==(const SDBRequestSeekParams& _o) const -> bool
126
0
{
127
0
    if ((!((offset()) == ((_o).offset())))) {
128
0
        return false;
129
0
    }
130
0
    return true;
131
0
}
132
133
auto SDBRequestSeekParams::operator!=(const SDBRequestSeekParams& _o) const -> bool
134
0
{
135
0
    return (!(operator==(_o)));
136
0
}
137
138
} // namespace dom
139
} // namespace mozilla
140
141
namespace mozilla {
142
namespace ipc {
143
auto IPDLParamTraits<mozilla::dom::SDBRequestSeekParams>::Write(
144
        IPC::Message* aMsg,
145
        mozilla::ipc::IProtocol* aActor,
146
        const paramType& aVar) -> void
147
0
{
148
0
    WriteIPDLParam(aMsg, aActor, (aVar).offset());
149
0
    // Sentinel = 'offset'
150
0
    (aMsg)->WriteSentinel(1369947863);
151
0
}
152
153
auto IPDLParamTraits<mozilla::dom::SDBRequestSeekParams>::Read(
154
        const IPC::Message* aMsg,
155
        PickleIterator* aIter,
156
        mozilla::ipc::IProtocol* aActor,
157
        paramType* aVar) -> bool
158
0
{
159
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->offset())))))) {
160
0
        (aActor)->FatalError("Error deserializing 'offset' (uint64_t) member of 'SDBRequestSeekParams'");
161
0
        return false;
162
0
    }
163
0
    // Sentinel = 'offset'
164
0
    if ((!((aMsg)->ReadSentinel(aIter, 1369947863)))) {
165
0
        mozilla::ipc::SentinelReadError("Error deserializing 'offset' (uint64_t) member of 'SDBRequestSeekParams'");
166
0
        return false;
167
0
    }
168
0
    return true;
169
0
}
170
171
} // namespace ipc
172
} // namespace mozilla
173
174
//-----------------------------------------------------------------------------
175
// Method definitions for the IPDL type |struct SDBRequestReadParams|
176
//
177
namespace mozilla {
178
namespace dom {
179
auto SDBRequestReadParams::operator==(const SDBRequestReadParams& _o) const -> bool
180
0
{
181
0
    if ((!((size()) == ((_o).size())))) {
182
0
        return false;
183
0
    }
184
0
    return true;
185
0
}
186
187
auto SDBRequestReadParams::operator!=(const SDBRequestReadParams& _o) const -> bool
188
0
{
189
0
    return (!(operator==(_o)));
190
0
}
191
192
} // namespace dom
193
} // namespace mozilla
194
195
namespace mozilla {
196
namespace ipc {
197
auto IPDLParamTraits<mozilla::dom::SDBRequestReadParams>::Write(
198
        IPC::Message* aMsg,
199
        mozilla::ipc::IProtocol* aActor,
200
        const paramType& aVar) -> void
201
0
{
202
0
    WriteIPDLParam(aMsg, aActor, (aVar).size());
203
0
    // Sentinel = 'size'
204
0
    (aMsg)->WriteSentinel(931048223);
205
0
}
206
207
auto IPDLParamTraits<mozilla::dom::SDBRequestReadParams>::Read(
208
        const IPC::Message* aMsg,
209
        PickleIterator* aIter,
210
        mozilla::ipc::IProtocol* aActor,
211
        paramType* aVar) -> bool
212
0
{
213
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->size())))))) {
214
0
        (aActor)->FatalError("Error deserializing 'size' (uint64_t) member of 'SDBRequestReadParams'");
215
0
        return false;
216
0
    }
217
0
    // Sentinel = 'size'
218
0
    if ((!((aMsg)->ReadSentinel(aIter, 931048223)))) {
219
0
        mozilla::ipc::SentinelReadError("Error deserializing 'size' (uint64_t) member of 'SDBRequestReadParams'");
220
0
        return false;
221
0
    }
222
0
    return true;
223
0
}
224
225
} // namespace ipc
226
} // namespace mozilla
227
228
//-----------------------------------------------------------------------------
229
// Method definitions for the IPDL type |struct SDBRequestWriteParams|
230
//
231
namespace mozilla {
232
namespace dom {
233
auto SDBRequestWriteParams::operator==(const SDBRequestWriteParams& _o) const -> bool
234
0
{
235
0
    if ((!((data()) == ((_o).data())))) {
236
0
        return false;
237
0
    }
238
0
    return true;
239
0
}
240
241
auto SDBRequestWriteParams::operator!=(const SDBRequestWriteParams& _o) const -> bool
242
0
{
243
0
    return (!(operator==(_o)));
244
0
}
245
246
} // namespace dom
247
} // namespace mozilla
248
249
namespace mozilla {
250
namespace ipc {
251
auto IPDLParamTraits<mozilla::dom::SDBRequestWriteParams>::Write(
252
        IPC::Message* aMsg,
253
        mozilla::ipc::IProtocol* aActor,
254
        const paramType& aVar) -> void
255
0
{
256
0
    WriteIPDLParam(aMsg, aActor, (aVar).data());
257
0
    // Sentinel = 'data'
258
0
    (aMsg)->WriteSentinel(843352540);
259
0
}
260
261
auto IPDLParamTraits<mozilla::dom::SDBRequestWriteParams>::Read(
262
        const IPC::Message* aMsg,
263
        PickleIterator* aIter,
264
        mozilla::ipc::IProtocol* aActor,
265
        paramType* aVar) -> bool
266
0
{
267
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->data())))))) {
268
0
        (aActor)->FatalError("Error deserializing 'data' (nsCString) member of 'SDBRequestWriteParams'");
269
0
        return false;
270
0
    }
271
0
    // Sentinel = 'data'
272
0
    if ((!((aMsg)->ReadSentinel(aIter, 843352540)))) {
273
0
        mozilla::ipc::SentinelReadError("Error deserializing 'data' (nsCString) member of 'SDBRequestWriteParams'");
274
0
        return false;
275
0
    }
276
0
    return true;
277
0
}
278
279
} // namespace ipc
280
} // namespace mozilla
281
282
//-----------------------------------------------------------------------------
283
// Method definitions for the IPDL type |struct SDBRequestCloseParams|
284
//
285
namespace mozilla {
286
namespace dom {
287
auto SDBRequestCloseParams::operator==(const SDBRequestCloseParams& _o) const -> bool
288
0
{
289
0
    return true;
290
0
}
291
292
auto SDBRequestCloseParams::operator!=(const SDBRequestCloseParams& _o) const -> bool
293
0
{
294
0
    return (!(operator==(_o)));
295
0
}
296
297
} // namespace dom
298
} // namespace mozilla
299
300
namespace mozilla {
301
namespace ipc {
302
auto IPDLParamTraits<mozilla::dom::SDBRequestCloseParams>::Write(
303
        IPC::Message* aMsg,
304
        mozilla::ipc::IProtocol* aActor,
305
        const paramType& aVar) -> void
306
0
{
307
0
}
308
309
auto IPDLParamTraits<mozilla::dom::SDBRequestCloseParams>::Read(
310
        const IPC::Message* aMsg,
311
        PickleIterator* aIter,
312
        mozilla::ipc::IProtocol* aActor,
313
        paramType* aVar) -> bool
314
0
{
315
0
    return true;
316
0
}
317
318
} // namespace ipc
319
} // namespace mozilla
320
321
//-----------------------------------------------------------------------------
322
// Method definitions for the IPDL type |union SDBRequestParams|
323
//
324
namespace mozilla {
325
namespace dom {
326
auto SDBRequestParams::MaybeDestroy(Type aNewType) -> bool
327
0
{
328
0
    if ((mType) == (T__None)) {
329
0
        return true;
330
0
    }
331
0
    if ((mType) == (aNewType)) {
332
0
        return false;
333
0
    }
334
0
    switch (mType) {
335
0
    case TSDBRequestOpenParams:
336
0
        {
337
0
            (ptr_SDBRequestOpenParams())->~SDBRequestOpenParams__tdef();
338
0
            break;
339
0
        }
340
0
    case TSDBRequestSeekParams:
341
0
        {
342
0
            (ptr_SDBRequestSeekParams())->~SDBRequestSeekParams__tdef();
343
0
            break;
344
0
        }
345
0
    case TSDBRequestReadParams:
346
0
        {
347
0
            (ptr_SDBRequestReadParams())->~SDBRequestReadParams__tdef();
348
0
            break;
349
0
        }
350
0
    case TSDBRequestWriteParams:
351
0
        {
352
0
            (ptr_SDBRequestWriteParams())->~SDBRequestWriteParams__tdef();
353
0
            break;
354
0
        }
355
0
    case TSDBRequestCloseParams:
356
0
        {
357
0
            (ptr_SDBRequestCloseParams())->~SDBRequestCloseParams__tdef();
358
0
            break;
359
0
        }
360
0
    default:
361
0
        {
362
0
            mozilla::ipc::LogicError("not reached");
363
0
            break;
364
0
        }
365
0
    }
366
0
    return true;
367
0
}
368
369
MOZ_IMPLICIT SDBRequestParams::SDBRequestParams(const SDBRequestOpenParams& aOther)
370
0
{
371
0
    new (mozilla::KnownNotNull, ptr_SDBRequestOpenParams()) SDBRequestOpenParams(aOther);
372
0
    mType = TSDBRequestOpenParams;
373
0
}
374
375
MOZ_IMPLICIT SDBRequestParams::SDBRequestParams(SDBRequestOpenParams&& aOther)
376
0
{
377
0
    new (mozilla::KnownNotNull, ptr_SDBRequestOpenParams()) SDBRequestOpenParams(std::move(aOther));
378
0
    mType = TSDBRequestOpenParams;
379
0
}
380
381
MOZ_IMPLICIT SDBRequestParams::SDBRequestParams(const SDBRequestSeekParams& aOther)
382
0
{
383
0
    new (mozilla::KnownNotNull, ptr_SDBRequestSeekParams()) SDBRequestSeekParams(aOther);
384
0
    mType = TSDBRequestSeekParams;
385
0
}
386
387
MOZ_IMPLICIT SDBRequestParams::SDBRequestParams(SDBRequestSeekParams&& aOther)
388
0
{
389
0
    new (mozilla::KnownNotNull, ptr_SDBRequestSeekParams()) SDBRequestSeekParams(std::move(aOther));
390
0
    mType = TSDBRequestSeekParams;
391
0
}
392
393
MOZ_IMPLICIT SDBRequestParams::SDBRequestParams(const SDBRequestReadParams& aOther)
394
0
{
395
0
    new (mozilla::KnownNotNull, ptr_SDBRequestReadParams()) SDBRequestReadParams(aOther);
396
0
    mType = TSDBRequestReadParams;
397
0
}
398
399
MOZ_IMPLICIT SDBRequestParams::SDBRequestParams(SDBRequestReadParams&& aOther)
400
0
{
401
0
    new (mozilla::KnownNotNull, ptr_SDBRequestReadParams()) SDBRequestReadParams(std::move(aOther));
402
0
    mType = TSDBRequestReadParams;
403
0
}
404
405
MOZ_IMPLICIT SDBRequestParams::SDBRequestParams(const SDBRequestWriteParams& aOther)
406
0
{
407
0
    new (mozilla::KnownNotNull, ptr_SDBRequestWriteParams()) SDBRequestWriteParams(aOther);
408
0
    mType = TSDBRequestWriteParams;
409
0
}
410
411
MOZ_IMPLICIT SDBRequestParams::SDBRequestParams(SDBRequestWriteParams&& aOther)
412
0
{
413
0
    new (mozilla::KnownNotNull, ptr_SDBRequestWriteParams()) SDBRequestWriteParams(std::move(aOther));
414
0
    mType = TSDBRequestWriteParams;
415
0
}
416
417
MOZ_IMPLICIT SDBRequestParams::SDBRequestParams(const SDBRequestCloseParams& aOther)
418
0
{
419
0
    new (mozilla::KnownNotNull, ptr_SDBRequestCloseParams()) SDBRequestCloseParams(aOther);
420
0
    mType = TSDBRequestCloseParams;
421
0
}
422
423
MOZ_IMPLICIT SDBRequestParams::SDBRequestParams(SDBRequestCloseParams&& aOther)
424
0
{
425
0
    new (mozilla::KnownNotNull, ptr_SDBRequestCloseParams()) SDBRequestCloseParams(std::move(aOther));
426
0
    mType = TSDBRequestCloseParams;
427
0
}
428
429
MOZ_IMPLICIT SDBRequestParams::SDBRequestParams(const SDBRequestParams& aOther)
430
0
{
431
0
    (aOther).AssertSanity();
432
0
    switch ((aOther).type()) {
433
0
    case TSDBRequestOpenParams:
434
0
        {
435
0
            new (mozilla::KnownNotNull, ptr_SDBRequestOpenParams()) SDBRequestOpenParams((aOther).get_SDBRequestOpenParams());
436
0
            break;
437
0
        }
438
0
    case TSDBRequestSeekParams:
439
0
        {
440
0
            new (mozilla::KnownNotNull, ptr_SDBRequestSeekParams()) SDBRequestSeekParams((aOther).get_SDBRequestSeekParams());
441
0
            break;
442
0
        }
443
0
    case TSDBRequestReadParams:
444
0
        {
445
0
            new (mozilla::KnownNotNull, ptr_SDBRequestReadParams()) SDBRequestReadParams((aOther).get_SDBRequestReadParams());
446
0
            break;
447
0
        }
448
0
    case TSDBRequestWriteParams:
449
0
        {
450
0
            new (mozilla::KnownNotNull, ptr_SDBRequestWriteParams()) SDBRequestWriteParams((aOther).get_SDBRequestWriteParams());
451
0
            break;
452
0
        }
453
0
    case TSDBRequestCloseParams:
454
0
        {
455
0
            new (mozilla::KnownNotNull, ptr_SDBRequestCloseParams()) SDBRequestCloseParams((aOther).get_SDBRequestCloseParams());
456
0
            break;
457
0
        }
458
0
    case T__None:
459
0
        {
460
0
            break;
461
0
        }
462
0
    default:
463
0
        {
464
0
            mozilla::ipc::LogicError("unreached");
465
0
            return;
466
0
        }
467
0
    }
468
0
    mType = (aOther).type();
469
0
}
470
471
MOZ_IMPLICIT SDBRequestParams::SDBRequestParams(SDBRequestParams&& aOther)
472
0
{
473
0
    (aOther).AssertSanity();
474
0
    Type t = (aOther).type();
475
0
    switch (t) {
476
0
    case TSDBRequestOpenParams:
477
0
        {
478
0
            new (mozilla::KnownNotNull, ptr_SDBRequestOpenParams()) SDBRequestOpenParams(std::move((aOther).get_SDBRequestOpenParams()));
479
0
            static_cast<void>((aOther).MaybeDestroy(T__None));
480
0
            break;
481
0
        }
482
0
    case TSDBRequestSeekParams:
483
0
        {
484
0
            new (mozilla::KnownNotNull, ptr_SDBRequestSeekParams()) SDBRequestSeekParams(std::move((aOther).get_SDBRequestSeekParams()));
485
0
            static_cast<void>((aOther).MaybeDestroy(T__None));
486
0
            break;
487
0
        }
488
0
    case TSDBRequestReadParams:
489
0
        {
490
0
            new (mozilla::KnownNotNull, ptr_SDBRequestReadParams()) SDBRequestReadParams(std::move((aOther).get_SDBRequestReadParams()));
491
0
            static_cast<void>((aOther).MaybeDestroy(T__None));
492
0
            break;
493
0
        }
494
0
    case TSDBRequestWriteParams:
495
0
        {
496
0
            new (mozilla::KnownNotNull, ptr_SDBRequestWriteParams()) SDBRequestWriteParams(std::move((aOther).get_SDBRequestWriteParams()));
497
0
            static_cast<void>((aOther).MaybeDestroy(T__None));
498
0
            break;
499
0
        }
500
0
    case TSDBRequestCloseParams:
501
0
        {
502
0
            new (mozilla::KnownNotNull, ptr_SDBRequestCloseParams()) SDBRequestCloseParams(std::move((aOther).get_SDBRequestCloseParams()));
503
0
            static_cast<void>((aOther).MaybeDestroy(T__None));
504
0
            break;
505
0
        }
506
0
    case T__None:
507
0
        {
508
0
            break;
509
0
        }
510
0
    default:
511
0
        {
512
0
            mozilla::ipc::LogicError("unreached");
513
0
            return;
514
0
        }
515
0
    }
516
0
    (aOther).mType = T__None;
517
0
    mType = t;
518
0
}
519
520
SDBRequestParams::~SDBRequestParams()
521
0
{
522
0
    static_cast<void>(MaybeDestroy(T__None));
523
0
}
524
525
auto SDBRequestParams::operator=(const SDBRequestOpenParams& aRhs) -> SDBRequestParams&
526
0
{
527
0
    if (MaybeDestroy(TSDBRequestOpenParams)) {
528
0
        new (mozilla::KnownNotNull, ptr_SDBRequestOpenParams()) SDBRequestOpenParams;
529
0
    }
530
0
    (*(ptr_SDBRequestOpenParams())) = aRhs;
531
0
    mType = TSDBRequestOpenParams;
532
0
    return (*(this));
533
0
}
534
535
auto SDBRequestParams::operator=(SDBRequestOpenParams&& aRhs) -> SDBRequestParams&
536
0
{
537
0
    if (MaybeDestroy(TSDBRequestOpenParams)) {
538
0
        new (mozilla::KnownNotNull, ptr_SDBRequestOpenParams()) SDBRequestOpenParams;
539
0
    }
540
0
    (*(ptr_SDBRequestOpenParams())) = std::move(aRhs);
541
0
    mType = TSDBRequestOpenParams;
542
0
    return (*(this));
543
0
}
544
545
auto SDBRequestParams::operator=(const SDBRequestSeekParams& aRhs) -> SDBRequestParams&
546
0
{
547
0
    if (MaybeDestroy(TSDBRequestSeekParams)) {
548
0
        new (mozilla::KnownNotNull, ptr_SDBRequestSeekParams()) SDBRequestSeekParams;
549
0
    }
550
0
    (*(ptr_SDBRequestSeekParams())) = aRhs;
551
0
    mType = TSDBRequestSeekParams;
552
0
    return (*(this));
553
0
}
554
555
auto SDBRequestParams::operator=(SDBRequestSeekParams&& aRhs) -> SDBRequestParams&
556
0
{
557
0
    if (MaybeDestroy(TSDBRequestSeekParams)) {
558
0
        new (mozilla::KnownNotNull, ptr_SDBRequestSeekParams()) SDBRequestSeekParams;
559
0
    }
560
0
    (*(ptr_SDBRequestSeekParams())) = std::move(aRhs);
561
0
    mType = TSDBRequestSeekParams;
562
0
    return (*(this));
563
0
}
564
565
auto SDBRequestParams::operator=(const SDBRequestReadParams& aRhs) -> SDBRequestParams&
566
0
{
567
0
    if (MaybeDestroy(TSDBRequestReadParams)) {
568
0
        new (mozilla::KnownNotNull, ptr_SDBRequestReadParams()) SDBRequestReadParams;
569
0
    }
570
0
    (*(ptr_SDBRequestReadParams())) = aRhs;
571
0
    mType = TSDBRequestReadParams;
572
0
    return (*(this));
573
0
}
574
575
auto SDBRequestParams::operator=(SDBRequestReadParams&& aRhs) -> SDBRequestParams&
576
0
{
577
0
    if (MaybeDestroy(TSDBRequestReadParams)) {
578
0
        new (mozilla::KnownNotNull, ptr_SDBRequestReadParams()) SDBRequestReadParams;
579
0
    }
580
0
    (*(ptr_SDBRequestReadParams())) = std::move(aRhs);
581
0
    mType = TSDBRequestReadParams;
582
0
    return (*(this));
583
0
}
584
585
auto SDBRequestParams::operator=(const SDBRequestWriteParams& aRhs) -> SDBRequestParams&
586
0
{
587
0
    if (MaybeDestroy(TSDBRequestWriteParams)) {
588
0
        new (mozilla::KnownNotNull, ptr_SDBRequestWriteParams()) SDBRequestWriteParams;
589
0
    }
590
0
    (*(ptr_SDBRequestWriteParams())) = aRhs;
591
0
    mType = TSDBRequestWriteParams;
592
0
    return (*(this));
593
0
}
594
595
auto SDBRequestParams::operator=(SDBRequestWriteParams&& aRhs) -> SDBRequestParams&
596
0
{
597
0
    if (MaybeDestroy(TSDBRequestWriteParams)) {
598
0
        new (mozilla::KnownNotNull, ptr_SDBRequestWriteParams()) SDBRequestWriteParams;
599
0
    }
600
0
    (*(ptr_SDBRequestWriteParams())) = std::move(aRhs);
601
0
    mType = TSDBRequestWriteParams;
602
0
    return (*(this));
603
0
}
604
605
auto SDBRequestParams::operator=(const SDBRequestCloseParams& aRhs) -> SDBRequestParams&
606
0
{
607
0
    if (MaybeDestroy(TSDBRequestCloseParams)) {
608
0
        new (mozilla::KnownNotNull, ptr_SDBRequestCloseParams()) SDBRequestCloseParams;
609
0
    }
610
0
    (*(ptr_SDBRequestCloseParams())) = aRhs;
611
0
    mType = TSDBRequestCloseParams;
612
0
    return (*(this));
613
0
}
614
615
auto SDBRequestParams::operator=(SDBRequestCloseParams&& aRhs) -> SDBRequestParams&
616
0
{
617
0
    if (MaybeDestroy(TSDBRequestCloseParams)) {
618
0
        new (mozilla::KnownNotNull, ptr_SDBRequestCloseParams()) SDBRequestCloseParams;
619
0
    }
620
0
    (*(ptr_SDBRequestCloseParams())) = std::move(aRhs);
621
0
    mType = TSDBRequestCloseParams;
622
0
    return (*(this));
623
0
}
624
625
auto SDBRequestParams::operator=(const SDBRequestParams& aRhs) -> SDBRequestParams&
626
0
{
627
0
    (aRhs).AssertSanity();
628
0
    Type t = (aRhs).type();
629
0
    switch (t) {
630
0
    case TSDBRequestOpenParams:
631
0
        {
632
0
            if (MaybeDestroy(t)) {
633
0
                new (mozilla::KnownNotNull, ptr_SDBRequestOpenParams()) SDBRequestOpenParams;
634
0
            }
635
0
            (*(ptr_SDBRequestOpenParams())) = (aRhs).get_SDBRequestOpenParams();
636
0
            break;
637
0
        }
638
0
    case TSDBRequestSeekParams:
639
0
        {
640
0
            if (MaybeDestroy(t)) {
641
0
                new (mozilla::KnownNotNull, ptr_SDBRequestSeekParams()) SDBRequestSeekParams;
642
0
            }
643
0
            (*(ptr_SDBRequestSeekParams())) = (aRhs).get_SDBRequestSeekParams();
644
0
            break;
645
0
        }
646
0
    case TSDBRequestReadParams:
647
0
        {
648
0
            if (MaybeDestroy(t)) {
649
0
                new (mozilla::KnownNotNull, ptr_SDBRequestReadParams()) SDBRequestReadParams;
650
0
            }
651
0
            (*(ptr_SDBRequestReadParams())) = (aRhs).get_SDBRequestReadParams();
652
0
            break;
653
0
        }
654
0
    case TSDBRequestWriteParams:
655
0
        {
656
0
            if (MaybeDestroy(t)) {
657
0
                new (mozilla::KnownNotNull, ptr_SDBRequestWriteParams()) SDBRequestWriteParams;
658
0
            }
659
0
            (*(ptr_SDBRequestWriteParams())) = (aRhs).get_SDBRequestWriteParams();
660
0
            break;
661
0
        }
662
0
    case TSDBRequestCloseParams:
663
0
        {
664
0
            if (MaybeDestroy(t)) {
665
0
                new (mozilla::KnownNotNull, ptr_SDBRequestCloseParams()) SDBRequestCloseParams;
666
0
            }
667
0
            (*(ptr_SDBRequestCloseParams())) = (aRhs).get_SDBRequestCloseParams();
668
0
            break;
669
0
        }
670
0
    case T__None:
671
0
        {
672
0
            static_cast<void>(MaybeDestroy(t));
673
0
            break;
674
0
        }
675
0
    default:
676
0
        {
677
0
            mozilla::ipc::LogicError("unreached");
678
0
            break;
679
0
        }
680
0
    }
681
0
    mType = t;
682
0
    return (*(this));
683
0
}
684
685
auto SDBRequestParams::operator=(SDBRequestParams&& aRhs) -> SDBRequestParams&
686
0
{
687
0
    (aRhs).AssertSanity();
688
0
    Type t = (aRhs).type();
689
0
    switch (t) {
690
0
    case TSDBRequestOpenParams:
691
0
        {
692
0
            if (MaybeDestroy(t)) {
693
0
                new (mozilla::KnownNotNull, ptr_SDBRequestOpenParams()) SDBRequestOpenParams;
694
0
            }
695
0
            (*(ptr_SDBRequestOpenParams())) = std::move((aRhs).get_SDBRequestOpenParams());
696
0
            static_cast<void>((aRhs).MaybeDestroy(T__None));
697
0
            break;
698
0
        }
699
0
    case TSDBRequestSeekParams:
700
0
        {
701
0
            if (MaybeDestroy(t)) {
702
0
                new (mozilla::KnownNotNull, ptr_SDBRequestSeekParams()) SDBRequestSeekParams;
703
0
            }
704
0
            (*(ptr_SDBRequestSeekParams())) = std::move((aRhs).get_SDBRequestSeekParams());
705
0
            static_cast<void>((aRhs).MaybeDestroy(T__None));
706
0
            break;
707
0
        }
708
0
    case TSDBRequestReadParams:
709
0
        {
710
0
            if (MaybeDestroy(t)) {
711
0
                new (mozilla::KnownNotNull, ptr_SDBRequestReadParams()) SDBRequestReadParams;
712
0
            }
713
0
            (*(ptr_SDBRequestReadParams())) = std::move((aRhs).get_SDBRequestReadParams());
714
0
            static_cast<void>((aRhs).MaybeDestroy(T__None));
715
0
            break;
716
0
        }
717
0
    case TSDBRequestWriteParams:
718
0
        {
719
0
            if (MaybeDestroy(t)) {
720
0
                new (mozilla::KnownNotNull, ptr_SDBRequestWriteParams()) SDBRequestWriteParams;
721
0
            }
722
0
            (*(ptr_SDBRequestWriteParams())) = std::move((aRhs).get_SDBRequestWriteParams());
723
0
            static_cast<void>((aRhs).MaybeDestroy(T__None));
724
0
            break;
725
0
        }
726
0
    case TSDBRequestCloseParams:
727
0
        {
728
0
            if (MaybeDestroy(t)) {
729
0
                new (mozilla::KnownNotNull, ptr_SDBRequestCloseParams()) SDBRequestCloseParams;
730
0
            }
731
0
            (*(ptr_SDBRequestCloseParams())) = std::move((aRhs).get_SDBRequestCloseParams());
732
0
            static_cast<void>((aRhs).MaybeDestroy(T__None));
733
0
            break;
734
0
        }
735
0
    case T__None:
736
0
        {
737
0
            static_cast<void>(MaybeDestroy(t));
738
0
            break;
739
0
        }
740
0
    default:
741
0
        {
742
0
            mozilla::ipc::LogicError("unreached");
743
0
            break;
744
0
        }
745
0
    }
746
0
    (aRhs).mType = T__None;
747
0
    mType = t;
748
0
    return (*(this));
749
0
}
750
751
auto SDBRequestParams::operator==(const SDBRequestOpenParams& aRhs) const -> bool
752
0
{
753
0
    return (get_SDBRequestOpenParams()) == (aRhs);
754
0
}
755
756
auto SDBRequestParams::operator==(const SDBRequestSeekParams& aRhs) const -> bool
757
0
{
758
0
    return (get_SDBRequestSeekParams()) == (aRhs);
759
0
}
760
761
auto SDBRequestParams::operator==(const SDBRequestReadParams& aRhs) const -> bool
762
0
{
763
0
    return (get_SDBRequestReadParams()) == (aRhs);
764
0
}
765
766
auto SDBRequestParams::operator==(const SDBRequestWriteParams& aRhs) const -> bool
767
0
{
768
0
    return (get_SDBRequestWriteParams()) == (aRhs);
769
0
}
770
771
auto SDBRequestParams::operator==(const SDBRequestCloseParams& aRhs) const -> bool
772
0
{
773
0
    return (get_SDBRequestCloseParams()) == (aRhs);
774
0
}
775
776
auto SDBRequestParams::operator==(const SDBRequestParams& aRhs) const -> bool
777
0
{
778
0
    if ((type()) != ((aRhs).type())) {
779
0
        return false;
780
0
    }
781
0
782
0
    switch (type()) {
783
0
    case TSDBRequestOpenParams:
784
0
        {
785
0
            return (get_SDBRequestOpenParams()) == ((aRhs).get_SDBRequestOpenParams());
786
0
        }
787
0
    case TSDBRequestSeekParams:
788
0
        {
789
0
            return (get_SDBRequestSeekParams()) == ((aRhs).get_SDBRequestSeekParams());
790
0
        }
791
0
    case TSDBRequestReadParams:
792
0
        {
793
0
            return (get_SDBRequestReadParams()) == ((aRhs).get_SDBRequestReadParams());
794
0
        }
795
0
    case TSDBRequestWriteParams:
796
0
        {
797
0
            return (get_SDBRequestWriteParams()) == ((aRhs).get_SDBRequestWriteParams());
798
0
        }
799
0
    case TSDBRequestCloseParams:
800
0
        {
801
0
            return (get_SDBRequestCloseParams()) == ((aRhs).get_SDBRequestCloseParams());
802
0
        }
803
0
    default:
804
0
        {
805
0
            mozilla::ipc::LogicError("unreached");
806
0
            return false;
807
0
        }
808
0
    }
809
0
}
810
811
auto SDBRequestParams::get(SDBRequestOpenParams* aOutValue) const -> void
812
0
{
813
0
    (*(aOutValue)) = get_SDBRequestOpenParams();
814
0
}
815
816
auto SDBRequestParams::get(SDBRequestSeekParams* aOutValue) const -> void
817
0
{
818
0
    (*(aOutValue)) = get_SDBRequestSeekParams();
819
0
}
820
821
auto SDBRequestParams::get(SDBRequestReadParams* aOutValue) const -> void
822
0
{
823
0
    (*(aOutValue)) = get_SDBRequestReadParams();
824
0
}
825
826
auto SDBRequestParams::get(SDBRequestWriteParams* aOutValue) const -> void
827
0
{
828
0
    (*(aOutValue)) = get_SDBRequestWriteParams();
829
0
}
830
831
auto SDBRequestParams::get(SDBRequestCloseParams* aOutValue) const -> void
832
0
{
833
0
    (*(aOutValue)) = get_SDBRequestCloseParams();
834
0
}
835
836
} // namespace dom
837
} // namespace mozilla
838
839
namespace mozilla {
840
namespace ipc {
841
auto IPDLParamTraits<mozilla::dom::SDBRequestParams>::Write(
842
        IPC::Message* aMsg,
843
        mozilla::ipc::IProtocol* aActor,
844
        const paramType& aVar) -> void
845
{
846
    typedef mozilla::dom::SDBRequestParams union__;
847
    int type;
848
    type = (aVar).type();
849
    WriteIPDLParam(aMsg, aActor, type);
850
    // Sentinel = 'SDBRequestParams'
851
    (aMsg)->WriteSentinel(627460754);
852
853
    switch (type) {
854
    case union__::TSDBRequestOpenParams:
855
        {
856
            WriteIPDLParam(aMsg, aActor, (aVar).get_SDBRequestOpenParams());
857
            // Sentinel = 'TSDBRequestOpenParams'
858
            (aMsg)->WriteSentinel(1649184051);
859
            return;
860
        }
861
    case union__::TSDBRequestSeekParams:
862
        {
863
            WriteIPDLParam(aMsg, aActor, (aVar).get_SDBRequestSeekParams());
864
            // Sentinel = 'TSDBRequestSeekParams'
865
            (aMsg)->WriteSentinel(2894901787);
866
            return;
867
        }
868
    case union__::TSDBRequestReadParams:
869
        {
870
            WriteIPDLParam(aMsg, aActor, (aVar).get_SDBRequestReadParams());
871
            // Sentinel = 'TSDBRequestReadParams'
872
            (aMsg)->WriteSentinel(1566846703);
873
            return;
874
        }
875
    case union__::TSDBRequestWriteParams:
876
        {
877
            WriteIPDLParam(aMsg, aActor, (aVar).get_SDBRequestWriteParams());
878
            // Sentinel = 'TSDBRequestWriteParams'
879
            (aMsg)->WriteSentinel(156883525);
880
            return;
881
        }
882
    case union__::TSDBRequestCloseParams:
883
        {
884
            WriteIPDLParam(aMsg, aActor, (aVar).get_SDBRequestCloseParams());
885
            // Sentinel = 'TSDBRequestCloseParams'
886
            (aMsg)->WriteSentinel(2167451436);
887
            return;
888
        }
889
    default:
890
        {
891
            (aActor)->FatalError("unknown union type");
892
            return;
893
        }
894
    }
895
}
896
897
auto IPDLParamTraits<mozilla::dom::SDBRequestParams>::Read(
898
        const IPC::Message* aMsg,
899
        PickleIterator* aIter,
900
        mozilla::ipc::IProtocol* aActor,
901
        paramType* aVar) -> bool
902
0
{
903
0
    typedef mozilla::dom::SDBRequestParams union__;
904
0
    int type;
905
0
    if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) {
906
0
        (aActor)->FatalError("Error deserializing type of union SDBRequestParams");
907
0
        return false;
908
0
    }
909
0
    // Sentinel = 'SDBRequestParams'
910
0
    if ((!((aMsg)->ReadSentinel(aIter, 627460754)))) {
911
0
        mozilla::ipc::SentinelReadError("Error deserializing type of union SDBRequestParams");
912
0
        return false;
913
0
    }
914
0
915
0
    switch (type) {
916
0
    case union__::TSDBRequestOpenParams:
917
0
        {
918
0
            mozilla::dom::SDBRequestOpenParams tmp = mozilla::dom::SDBRequestOpenParams();
919
0
            (*(aVar)) = tmp;
920
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SDBRequestOpenParams())))))) {
921
0
                (aActor)->FatalError("Error deserializing variant TSDBRequestOpenParams of union SDBRequestParams");
922
0
                return false;
923
0
            }
924
0
            // Sentinel = 'TSDBRequestOpenParams'
925
0
            if ((!((aMsg)->ReadSentinel(aIter, 1649184051)))) {
926
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TSDBRequestOpenParams of union SDBRequestParams");
927
0
                return false;
928
0
            }
929
0
            return true;
930
0
        }
931
0
    case union__::TSDBRequestSeekParams:
932
0
        {
933
0
            mozilla::dom::SDBRequestSeekParams tmp = mozilla::dom::SDBRequestSeekParams();
934
0
            (*(aVar)) = tmp;
935
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SDBRequestSeekParams())))))) {
936
0
                (aActor)->FatalError("Error deserializing variant TSDBRequestSeekParams of union SDBRequestParams");
937
0
                return false;
938
0
            }
939
0
            // Sentinel = 'TSDBRequestSeekParams'
940
0
            if ((!((aMsg)->ReadSentinel(aIter, 2894901787)))) {
941
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TSDBRequestSeekParams of union SDBRequestParams");
942
0
                return false;
943
0
            }
944
0
            return true;
945
0
        }
946
0
    case union__::TSDBRequestReadParams:
947
0
        {
948
0
            mozilla::dom::SDBRequestReadParams tmp = mozilla::dom::SDBRequestReadParams();
949
0
            (*(aVar)) = tmp;
950
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SDBRequestReadParams())))))) {
951
0
                (aActor)->FatalError("Error deserializing variant TSDBRequestReadParams of union SDBRequestParams");
952
0
                return false;
953
0
            }
954
0
            // Sentinel = 'TSDBRequestReadParams'
955
0
            if ((!((aMsg)->ReadSentinel(aIter, 1566846703)))) {
956
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TSDBRequestReadParams of union SDBRequestParams");
957
0
                return false;
958
0
            }
959
0
            return true;
960
0
        }
961
0
    case union__::TSDBRequestWriteParams:
962
0
        {
963
0
            mozilla::dom::SDBRequestWriteParams tmp = mozilla::dom::SDBRequestWriteParams();
964
0
            (*(aVar)) = tmp;
965
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SDBRequestWriteParams())))))) {
966
0
                (aActor)->FatalError("Error deserializing variant TSDBRequestWriteParams of union SDBRequestParams");
967
0
                return false;
968
0
            }
969
0
            // Sentinel = 'TSDBRequestWriteParams'
970
0
            if ((!((aMsg)->ReadSentinel(aIter, 156883525)))) {
971
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TSDBRequestWriteParams of union SDBRequestParams");
972
0
                return false;
973
0
            }
974
0
            return true;
975
0
        }
976
0
    case union__::TSDBRequestCloseParams:
977
0
        {
978
0
            mozilla::dom::SDBRequestCloseParams tmp = mozilla::dom::SDBRequestCloseParams();
979
0
            (*(aVar)) = tmp;
980
0
            if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_SDBRequestCloseParams())))))) {
981
0
                (aActor)->FatalError("Error deserializing variant TSDBRequestCloseParams of union SDBRequestParams");
982
0
                return false;
983
0
            }
984
0
            // Sentinel = 'TSDBRequestCloseParams'
985
0
            if ((!((aMsg)->ReadSentinel(aIter, 2167451436)))) {
986
0
                mozilla::ipc::SentinelReadError("Error deserializing variant TSDBRequestCloseParams of union SDBRequestParams");
987
0
                return false;
988
0
            }
989
0
            return true;
990
0
        }
991
0
    default:
992
0
        {
993
0
            (aActor)->FatalError("unknown union type");
994
0
            return false;
995
0
        }
996
0
    }
997
0
}
998
999
} // namespace ipc
1000
} // namespace mozilla