Coverage Report

Created: 2018-09-25 14:53

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