Coverage Report

Created: 2018-09-25 14:53

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