Coverage Report

Created: 2018-09-25 14:53

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