Coverage Report

Created: 2018-09-25 14:53

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