Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PClientManagerParent.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/PClientManagerParent.h"
8
9
#include "mozilla/ipc/PBackgroundParent.h"
10
#include "mozilla/dom/PClientHandleParent.h"
11
#include "mozilla/dom/PClientManagerOpParent.h"
12
#include "mozilla/dom/PClientNavigateOpParent.h"
13
#include "mozilla/dom/PClientSourceParent.h"
14
#include "mozilla/ipc/PIPCBlobInputStreamParent.h"
15
#include "mozilla/ipc/PChildToParentStreamParent.h"
16
#include "mozilla/ipc/PParentToChildStreamParent.h"
17
#include "mozilla/ipc/PFileDescriptorSetParent.h"
18
19
#include "nsIFile.h"
20
#include "GeckoProfiler.h"
21
22
namespace mozilla {
23
namespace dom {
24
25
26
auto PClientManagerParent::RecvPClientHandleConstructor(
27
        PClientHandleParent* actor,
28
        const IPCClientInfo& aClientInfo) -> mozilla::ipc::IPCResult
29
0
{
30
0
    return IPC_OK();
31
0
}
32
33
auto PClientManagerParent::RecvPClientManagerOpConstructor(
34
        PClientManagerOpParent* actor,
35
        const ClientOpConstructorArgs& aArgs) -> mozilla::ipc::IPCResult
36
0
{
37
0
    return IPC_OK();
38
0
}
39
40
auto PClientManagerParent::RecvPClientSourceConstructor(
41
        PClientSourceParent* actor,
42
        const ClientSourceConstructorArgs& aArgs) -> mozilla::ipc::IPCResult
43
0
{
44
0
    return IPC_OK();
45
0
}
46
47
auto PClientManagerParent::ActorDestroy(ActorDestroyReason aWhy) -> void
48
0
{
49
0
}
50
51
MOZ_IMPLICIT PClientManagerParent::PClientManagerParent() :
52
    mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
53
    mLivenessState(mozilla::ipc::LivenessState::Dead)
54
0
{
55
0
    MOZ_COUNT_CTOR(PClientManagerParent);
56
0
}
57
58
PClientManagerParent::~PClientManagerParent()
59
0
{
60
0
    MOZ_COUNT_DTOR(PClientManagerParent);
61
0
}
62
63
auto PClientManagerParent::Manager() const -> PBackgroundParent*
64
0
{
65
0
    return static_cast<PBackgroundParent*>(IProtocol::Manager());
66
0
}
67
68
auto PClientManagerParent::ManagedPClientHandleParent(nsTArray<PClientHandleParent*>& aArr) const -> void
69
0
{
70
0
    (mManagedPClientHandleParent).ToArray(aArr);
71
0
}
72
73
auto PClientManagerParent::ManagedPClientHandleParent() const -> const ManagedContainer<PClientHandleParent>&
74
0
{
75
0
    return mManagedPClientHandleParent;
76
0
}
77
78
auto PClientManagerParent::ManagedPClientManagerOpParent(nsTArray<PClientManagerOpParent*>& aArr) const -> void
79
0
{
80
0
    (mManagedPClientManagerOpParent).ToArray(aArr);
81
0
}
82
83
auto PClientManagerParent::ManagedPClientManagerOpParent() const -> const ManagedContainer<PClientManagerOpParent>&
84
0
{
85
0
    return mManagedPClientManagerOpParent;
86
0
}
87
88
auto PClientManagerParent::ManagedPClientNavigateOpParent(nsTArray<PClientNavigateOpParent*>& aArr) const -> void
89
0
{
90
0
    (mManagedPClientNavigateOpParent).ToArray(aArr);
91
0
}
92
93
auto PClientManagerParent::ManagedPClientNavigateOpParent() const -> const ManagedContainer<PClientNavigateOpParent>&
94
0
{
95
0
    return mManagedPClientNavigateOpParent;
96
0
}
97
98
auto PClientManagerParent::ManagedPClientSourceParent(nsTArray<PClientSourceParent*>& aArr) const -> void
99
0
{
100
0
    (mManagedPClientSourceParent).ToArray(aArr);
101
0
}
102
103
auto PClientManagerParent::ManagedPClientSourceParent() const -> const ManagedContainer<PClientSourceParent>&
104
0
{
105
0
    return mManagedPClientSourceParent;
106
0
}
107
108
auto PClientManagerParent::SendPClientNavigateOpConstructor(const ClientNavigateOpConstructorArgs& aArgs) -> PClientNavigateOpParent*
109
0
{
110
0
    return SendPClientNavigateOpConstructor(AllocPClientNavigateOpParent(aArgs), aArgs);
111
0
}
112
113
auto PClientManagerParent::SendPClientNavigateOpConstructor(
114
        PClientNavigateOpParent* actor,
115
        const ClientNavigateOpConstructorArgs& aArgs) -> PClientNavigateOpParent*
116
0
{
117
0
    if ((!(actor))) {
118
0
        NS_WARNING("Error constructing actor PClientNavigateOpParent");
119
0
        return nullptr;
120
0
    }
121
0
    (actor)->SetManagerAndRegister(this);
122
0
    (mManagedPClientNavigateOpParent).PutEntry(actor);
123
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
124
0
125
0
    IPC::Message* msg__ = PClientManager::Msg_PClientNavigateOpConstructor(Id());
126
0
127
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
128
0
    WriteIPDLParam(msg__, this, actor);
129
0
    // Sentinel = 'actor'
130
0
    (msg__)->WriteSentinel(875202478);
131
0
    WriteIPDLParam(msg__, this, aArgs);
132
0
    // Sentinel = 'aArgs'
133
0
    (msg__)->WriteSentinel(424150951);
134
0
135
0
136
0
137
0
    if (mozilla::ipc::LoggingEnabledFor("PClientManagerParent")) {
138
0
        mozilla::ipc::LogMessageForProtocol("PClientManagerParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
139
0
    }
140
0
    AUTO_PROFILER_LABEL("PClientManager::Msg_PClientNavigateOpConstructor", OTHER);
141
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
142
0
        mozilla::ipc::LogicError("Transition error");
143
0
    }
144
0
145
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
146
0
    if ((!(sendok__))) {
147
0
        IProtocol* mgr = (actor)->Manager();
148
0
        (actor)->DestroySubtree(FailedConstructor);
149
0
        (actor)->DeallocSubtree();
150
0
        (mgr)->RemoveManagee(PClientNavigateOpMsgStart, actor);
151
0
        return nullptr;
152
0
    }
153
0
    return actor;
154
0
}
155
156
auto PClientManagerParent::Send__delete__(PClientManagerParent* actor) -> bool
157
0
{
158
0
    if ((!(actor))) {
159
0
        return false;
160
0
    }
161
0
162
0
    IPC::Message* msg__ = PClientManager::Msg___delete__((actor)->Id());
163
0
164
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
165
0
    WriteIPDLParam(msg__, actor, actor);
166
0
    // Sentinel = 'actor'
167
0
    (msg__)->WriteSentinel(875202478);
168
0
169
0
170
0
171
0
    if (mozilla::ipc::LoggingEnabledFor("PClientManagerParent")) {
172
0
        mozilla::ipc::LogMessageForProtocol("PClientManagerParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
173
0
    }
174
0
    AUTO_PROFILER_LABEL("PClientManager::Msg___delete__", OTHER);
175
0
    if ((!(StateTransition(true, (&((actor)->mLivenessState)))))) {
176
0
        mozilla::ipc::LogicError("Transition error");
177
0
    }
178
0
179
0
    bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
180
0
181
0
    IProtocol* mgr = (actor)->Manager();
182
0
    (actor)->DestroySubtree(Deletion);
183
0
    (actor)->DeallocSubtree();
184
0
    (mgr)->RemoveManagee(PClientManagerMsgStart, actor);
185
0
    return sendok__;
186
0
}
187
188
auto PClientManagerParent::RemoveManagee(
189
        int32_t aProtocolId,
190
        IProtocol* aListener) -> void
191
0
{
192
0
    switch (aProtocolId) {
193
0
    case PClientHandleMsgStart:
194
0
        {
195
0
            PClientHandleParent* actor = static_cast<PClientHandleParent*>(aListener);
196
0
            auto& container = mManagedPClientHandleParent;
197
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
198
0
199
0
            (container).RemoveEntry(actor);
200
0
            DeallocPClientHandleParent(actor);
201
0
            return;
202
0
        }
203
0
    case PClientManagerOpMsgStart:
204
0
        {
205
0
            PClientManagerOpParent* actor = static_cast<PClientManagerOpParent*>(aListener);
206
0
            auto& container = mManagedPClientManagerOpParent;
207
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
208
0
209
0
            (container).RemoveEntry(actor);
210
0
            DeallocPClientManagerOpParent(actor);
211
0
            return;
212
0
        }
213
0
    case PClientNavigateOpMsgStart:
214
0
        {
215
0
            PClientNavigateOpParent* actor = static_cast<PClientNavigateOpParent*>(aListener);
216
0
            auto& container = mManagedPClientNavigateOpParent;
217
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
218
0
219
0
            (container).RemoveEntry(actor);
220
0
            DeallocPClientNavigateOpParent(actor);
221
0
            return;
222
0
        }
223
0
    case PClientSourceMsgStart:
224
0
        {
225
0
            PClientSourceParent* actor = static_cast<PClientSourceParent*>(aListener);
226
0
            auto& container = mManagedPClientSourceParent;
227
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
228
0
229
0
            (container).RemoveEntry(actor);
230
0
            DeallocPClientSourceParent(actor);
231
0
            return;
232
0
        }
233
0
    default:
234
0
        {
235
0
            FatalError("unreached");
236
0
            return;
237
0
        }
238
0
    }
239
0
}
240
241
auto PClientManagerParent::OnMessageReceived(const Message& msg__) -> PClientManagerParent::Result
242
0
{
243
0
    switch ((msg__).type()) {
244
0
    case PClientManager::Msg_Teardown__ID:
245
0
        {
246
0
            if (mozilla::ipc::LoggingEnabledFor("PClientManagerParent")) {
247
0
                mozilla::ipc::LogMessageForProtocol("PClientManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
248
0
            }
249
0
            AUTO_PROFILER_LABEL("PClientManager::Msg_Teardown", OTHER);
250
0
251
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
252
0
                FatalError("Transition error");
253
0
                return MsgValueError;
254
0
            }
255
0
            if ((!(RecvTeardown()))) {
256
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
257
0
                // Error handled in mozilla::ipc::IPCResult
258
0
                return MsgProcessingError;
259
0
            }
260
0
261
0
            return MsgProcessed;
262
0
        }
263
0
    case PClientManager::Msg_PClientHandleConstructor__ID:
264
0
        {
265
0
            if (mozilla::ipc::LoggingEnabledFor("PClientManagerParent")) {
266
0
                mozilla::ipc::LogMessageForProtocol("PClientManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
267
0
            }
268
0
            AUTO_PROFILER_LABEL("PClientManager::Msg_PClientHandleConstructor", OTHER);
269
0
270
0
            PickleIterator iter__(msg__);
271
0
            ActorHandle handle__;
272
0
            PClientHandleParent* actor;
273
0
            IPCClientInfo aClientInfo;
274
0
275
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) {
276
0
                FatalError("Error deserializing 'ActorHandle'");
277
0
                return MsgValueError;
278
0
            }
279
0
            // Sentinel = 'actor'
280
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
281
0
                mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'");
282
0
                return MsgValueError;
283
0
            }
284
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aClientInfo)))))) {
285
0
                FatalError("Error deserializing 'IPCClientInfo'");
286
0
                return MsgValueError;
287
0
            }
288
0
            // Sentinel = 'aClientInfo'
289
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2716254963)))) {
290
0
                mozilla::ipc::SentinelReadError("Error deserializing 'IPCClientInfo'");
291
0
                return MsgValueError;
292
0
            }
293
0
            (msg__).EndRead(iter__, (msg__).type());
294
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
295
0
                FatalError("Transition error");
296
0
                return MsgValueError;
297
0
            }
298
0
            actor = AllocPClientHandleParent(aClientInfo);
299
0
            if ((!(actor))) {
300
0
                NS_WARNING("Error constructing actor PClientHandleParent");
301
0
                return MsgValueError;
302
0
            }
303
0
            (actor)->SetManagerAndRegister(this, (handle__).mId);
304
0
            (mManagedPClientHandleParent).PutEntry(actor);
305
0
            (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
306
0
307
0
            if ((!(RecvPClientHandleConstructor(actor, aClientInfo)))) {
308
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
309
0
                // Error handled in mozilla::ipc::IPCResult
310
0
                return MsgProcessingError;
311
0
            }
312
0
313
0
            return MsgProcessed;
314
0
        }
315
0
    case PClientManager::Msg_PClientManagerOpConstructor__ID:
316
0
        {
317
0
            if (mozilla::ipc::LoggingEnabledFor("PClientManagerParent")) {
318
0
                mozilla::ipc::LogMessageForProtocol("PClientManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
319
0
            }
320
0
            AUTO_PROFILER_LABEL("PClientManager::Msg_PClientManagerOpConstructor", OTHER);
321
0
322
0
            PickleIterator iter__(msg__);
323
0
            ActorHandle handle__;
324
0
            PClientManagerOpParent* actor;
325
0
            ClientOpConstructorArgs aArgs;
326
0
327
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) {
328
0
                FatalError("Error deserializing 'ActorHandle'");
329
0
                return MsgValueError;
330
0
            }
331
0
            // Sentinel = 'actor'
332
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
333
0
                mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'");
334
0
                return MsgValueError;
335
0
            }
336
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aArgs)))))) {
337
0
                FatalError("Error deserializing 'ClientOpConstructorArgs'");
338
0
                return MsgValueError;
339
0
            }
340
0
            // Sentinel = 'aArgs'
341
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 424150951)))) {
342
0
                mozilla::ipc::SentinelReadError("Error deserializing 'ClientOpConstructorArgs'");
343
0
                return MsgValueError;
344
0
            }
345
0
            (msg__).EndRead(iter__, (msg__).type());
346
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
347
0
                FatalError("Transition error");
348
0
                return MsgValueError;
349
0
            }
350
0
            actor = AllocPClientManagerOpParent(aArgs);
351
0
            if ((!(actor))) {
352
0
                NS_WARNING("Error constructing actor PClientManagerOpParent");
353
0
                return MsgValueError;
354
0
            }
355
0
            (actor)->SetManagerAndRegister(this, (handle__).mId);
356
0
            (mManagedPClientManagerOpParent).PutEntry(actor);
357
0
            (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
358
0
359
0
            if ((!(RecvPClientManagerOpConstructor(actor, aArgs)))) {
360
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
361
0
                // Error handled in mozilla::ipc::IPCResult
362
0
                return MsgProcessingError;
363
0
            }
364
0
365
0
            return MsgProcessed;
366
0
        }
367
0
    case PClientManager::Msg_PClientSourceConstructor__ID:
368
0
        {
369
0
            if (mozilla::ipc::LoggingEnabledFor("PClientManagerParent")) {
370
0
                mozilla::ipc::LogMessageForProtocol("PClientManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
371
0
            }
372
0
            AUTO_PROFILER_LABEL("PClientManager::Msg_PClientSourceConstructor", OTHER);
373
0
374
0
            PickleIterator iter__(msg__);
375
0
            ActorHandle handle__;
376
0
            PClientSourceParent* actor;
377
0
            ClientSourceConstructorArgs aArgs;
378
0
379
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) {
380
0
                FatalError("Error deserializing 'ActorHandle'");
381
0
                return MsgValueError;
382
0
            }
383
0
            // Sentinel = 'actor'
384
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
385
0
                mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'");
386
0
                return MsgValueError;
387
0
            }
388
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aArgs)))))) {
389
0
                FatalError("Error deserializing 'ClientSourceConstructorArgs'");
390
0
                return MsgValueError;
391
0
            }
392
0
            // Sentinel = 'aArgs'
393
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 424150951)))) {
394
0
                mozilla::ipc::SentinelReadError("Error deserializing 'ClientSourceConstructorArgs'");
395
0
                return MsgValueError;
396
0
            }
397
0
            (msg__).EndRead(iter__, (msg__).type());
398
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
399
0
                FatalError("Transition error");
400
0
                return MsgValueError;
401
0
            }
402
0
            actor = AllocPClientSourceParent(aArgs);
403
0
            if ((!(actor))) {
404
0
                NS_WARNING("Error constructing actor PClientSourceParent");
405
0
                return MsgValueError;
406
0
            }
407
0
            (actor)->SetManagerAndRegister(this, (handle__).mId);
408
0
            (mManagedPClientSourceParent).PutEntry(actor);
409
0
            (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
410
0
411
0
            if ((!(RecvPClientSourceConstructor(actor, aArgs)))) {
412
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
413
0
                // Error handled in mozilla::ipc::IPCResult
414
0
                return MsgProcessingError;
415
0
            }
416
0
417
0
            return MsgProcessed;
418
0
        }
419
0
    case PClientManager::Reply_PClientNavigateOpConstructor__ID:
420
0
        {
421
0
            return MsgProcessed;
422
0
        }
423
0
    case PClientManager::Reply___delete____ID:
424
0
        {
425
0
            return MsgProcessed;
426
0
        }
427
0
    default:
428
0
        {
429
0
            return MsgNotKnown;
430
0
        }
431
0
    }
432
0
}
433
434
auto PClientManagerParent::OnMessageReceived(
435
        const Message& msg__,
436
        Message*& reply__) -> PClientManagerParent::Result
437
0
{
438
0
    return MsgNotKnown;
439
0
}
440
441
auto PClientManagerParent::OnCallReceived(
442
        const Message& msg__,
443
        Message*& reply__) -> PClientManagerParent::Result
444
0
{
445
0
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
446
0
    return MsgNotKnown;
447
0
}
448
449
auto PClientManagerParent::GetProtocolTypeId() -> int32_t
450
0
{
451
0
    return PClientManagerMsgStart;
452
0
}
453
454
auto PClientManagerParent::DestroySubtree(ActorDestroyReason why) -> void
455
0
{
456
0
    // Unregister from our manager.
457
0
    Unregister(Id());
458
0
459
0
    ActorDestroyReason subtreewhy = (((why) == (Deletion)) || ((why) == (FailedConstructor)) ? AncestorDeletion : why);
460
0
461
0
    {
462
0
        // Recursively shutting down PClientHandle kids
463
0
        nsTArray<PClientHandleParent*> kids;
464
0
        // Accumulate kids into a stable structure to iterate over
465
0
        ManagedPClientHandleParent(kids);
466
0
        for (auto& kid : kids) {
467
0
            // Guarding against a child removing a sibling from the list during the iteration.
468
0
            if ((mManagedPClientHandleParent).Contains(kid)) {
469
0
                (kid)->DestroySubtree(subtreewhy);
470
0
            }
471
0
        }
472
0
    }
473
0
    {
474
0
        // Recursively shutting down PClientManagerOp kids
475
0
        nsTArray<PClientManagerOpParent*> kids;
476
0
        // Accumulate kids into a stable structure to iterate over
477
0
        ManagedPClientManagerOpParent(kids);
478
0
        for (auto& kid : kids) {
479
0
            // Guarding against a child removing a sibling from the list during the iteration.
480
0
            if ((mManagedPClientManagerOpParent).Contains(kid)) {
481
0
                (kid)->DestroySubtree(subtreewhy);
482
0
            }
483
0
        }
484
0
    }
485
0
    {
486
0
        // Recursively shutting down PClientNavigateOp kids
487
0
        nsTArray<PClientNavigateOpParent*> kids;
488
0
        // Accumulate kids into a stable structure to iterate over
489
0
        ManagedPClientNavigateOpParent(kids);
490
0
        for (auto& kid : kids) {
491
0
            // Guarding against a child removing a sibling from the list during the iteration.
492
0
            if ((mManagedPClientNavigateOpParent).Contains(kid)) {
493
0
                (kid)->DestroySubtree(subtreewhy);
494
0
            }
495
0
        }
496
0
    }
497
0
    {
498
0
        // Recursively shutting down PClientSource kids
499
0
        nsTArray<PClientSourceParent*> kids;
500
0
        // Accumulate kids into a stable structure to iterate over
501
0
        ManagedPClientSourceParent(kids);
502
0
        for (auto& kid : kids) {
503
0
            // Guarding against a child removing a sibling from the list during the iteration.
504
0
            if ((mManagedPClientSourceParent).Contains(kid)) {
505
0
                (kid)->DestroySubtree(subtreewhy);
506
0
            }
507
0
        }
508
0
    }
509
0
510
0
    // Reject owning pending responses.
511
0
    (GetIPCChannel())->RejectPendingResponsesForActor(this);
512
0
513
0
    // Finally, destroy "us".
514
0
    ActorDestroy(why);
515
0
}
516
517
auto PClientManagerParent::DeallocSubtree() -> void
518
0
{
519
0
    {
520
0
        // Recursively deleting PClientHandle kids
521
0
        for (auto iter = (mManagedPClientHandleParent).Iter(); (!((iter).Done())); (iter).Next()) {
522
0
            (((iter).Get())->GetKey())->DeallocSubtree();
523
0
        }
524
0
525
0
        for (auto iter = (mManagedPClientHandleParent).Iter(); (!((iter).Done())); (iter).Next()) {
526
0
            DeallocPClientHandleParent(((iter).Get())->GetKey());
527
0
        }
528
0
        (mManagedPClientHandleParent).Clear();
529
0
    }
530
0
    {
531
0
        // Recursively deleting PClientManagerOp kids
532
0
        for (auto iter = (mManagedPClientManagerOpParent).Iter(); (!((iter).Done())); (iter).Next()) {
533
0
            (((iter).Get())->GetKey())->DeallocSubtree();
534
0
        }
535
0
536
0
        for (auto iter = (mManagedPClientManagerOpParent).Iter(); (!((iter).Done())); (iter).Next()) {
537
0
            DeallocPClientManagerOpParent(((iter).Get())->GetKey());
538
0
        }
539
0
        (mManagedPClientManagerOpParent).Clear();
540
0
    }
541
0
    {
542
0
        // Recursively deleting PClientNavigateOp kids
543
0
        for (auto iter = (mManagedPClientNavigateOpParent).Iter(); (!((iter).Done())); (iter).Next()) {
544
0
            (((iter).Get())->GetKey())->DeallocSubtree();
545
0
        }
546
0
547
0
        for (auto iter = (mManagedPClientNavigateOpParent).Iter(); (!((iter).Done())); (iter).Next()) {
548
0
            DeallocPClientNavigateOpParent(((iter).Get())->GetKey());
549
0
        }
550
0
        (mManagedPClientNavigateOpParent).Clear();
551
0
    }
552
0
    {
553
0
        // Recursively deleting PClientSource kids
554
0
        for (auto iter = (mManagedPClientSourceParent).Iter(); (!((iter).Done())); (iter).Next()) {
555
0
            (((iter).Get())->GetKey())->DeallocSubtree();
556
0
        }
557
0
558
0
        for (auto iter = (mManagedPClientSourceParent).Iter(); (!((iter).Done())); (iter).Next()) {
559
0
            DeallocPClientSourceParent(((iter).Get())->GetKey());
560
0
        }
561
0
        (mManagedPClientSourceParent).Clear();
562
0
    }
563
0
}
564
565
566
567
} // namespace dom
568
} // namespace mozilla
569
namespace mozilla {
570
namespace ipc {
571
auto IPDLParamTraits<mozilla::dom::PClientManagerParent>::Write(
572
        IPC::Message* aMsg,
573
        mozilla::ipc::IProtocol* aActor,
574
        const paramType& aVar) -> void
575
0
{
576
0
    int32_t id;
577
0
    if ((!(aVar))) {
578
0
        id = 0;
579
0
    }
580
0
    else {
581
0
        id = (aVar)->Id();
582
0
        if ((1) == (id)) {
583
0
            (aActor)->FatalError("actor has been |delete|d");
584
0
        }
585
0
    }
586
0
    WriteIPDLParam(aMsg, aActor, id);
587
0
}
588
589
auto IPDLParamTraits<mozilla::dom::PClientManagerParent>::Read(
590
        const IPC::Message* aMsg,
591
        PickleIterator* aIter,
592
        mozilla::ipc::IProtocol* aActor,
593
        paramType* aVar) -> bool
594
0
{
595
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PClientManager", PClientManagerMsgStart);
596
0
    if ((actor).isNothing()) {
597
0
        return false;
598
0
    }
599
0
600
0
    (*(aVar)) = static_cast<mozilla::dom::PClientManagerParent*>((actor).value());
601
0
    return true;
602
0
}
603
604
} // namespace ipc
605
} // namespace mozilla