Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PNeckoChild.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/net/PNeckoChild.h"
8
#include "SerializedLoadContext.h"
9
#include "mozilla/dom/PermissionMessageUtils.h"
10
#include "mozilla/ipc/IPCStreamUtils.h"
11
#include "mozilla/ipc/URIUtils.h"
12
13
#include "mozilla/dom/PContentChild.h"
14
#include "mozilla/net/PHttpChannelChild.h"
15
#include "mozilla/net/PCookieServiceChild.h"
16
#include "mozilla/dom/PBrowserChild.h"
17
#include "mozilla/net/PWyciwygChannelChild.h"
18
#include "mozilla/net/PFTPChannelChild.h"
19
#include "mozilla/net/PWebSocketChild.h"
20
#include "mozilla/net/PWebSocketEventListenerChild.h"
21
#include "mozilla/net/PTCPSocketChild.h"
22
#include "mozilla/net/PTCPServerSocketChild.h"
23
#include "mozilla/net/PUDPSocketChild.h"
24
#include "mozilla/net/PDNSRequestChild.h"
25
#include "mozilla/net/PChannelDiverterChild.h"
26
#include "mozilla/ipc/PFileDescriptorSetChild.h"
27
#include "mozilla/net/PDataChannelChild.h"
28
#include "mozilla/net/PSimpleChannelChild.h"
29
#include "mozilla/net/PTransportProviderChild.h"
30
#include "mozilla/ipc/PChildToParentStreamChild.h"
31
#include "mozilla/ipc/PParentToChildStreamChild.h"
32
#include "mozilla/net/PStunAddrsRequestChild.h"
33
#include "mozilla/net/PFileChannelChild.h"
34
#include "mozilla/net/PAltDataOutputStreamChild.h"
35
36
#include "nsIFile.h"
37
#include "GeckoProfiler.h"
38
39
namespace mozilla {
40
namespace net {
41
42
43
auto PNeckoChild::RecvPTransportProviderConstructor(PTransportProviderChild* actor) -> mozilla::ipc::IPCResult
44
0
{
45
0
    return IPC_OK();
46
0
}
47
48
auto PNeckoChild::RecvPTCPSocketConstructor(
49
        PTCPSocketChild* actor,
50
        const nsString& host,
51
        const uint16_t& port) -> mozilla::ipc::IPCResult
52
0
{
53
0
    return IPC_OK();
54
0
}
55
56
auto PNeckoChild::ActorDestroy(ActorDestroyReason aWhy) -> void
57
0
{
58
0
}
59
60
MOZ_IMPLICIT PNeckoChild::PNeckoChild() :
61
    mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
62
    mLivenessState(mozilla::ipc::LivenessState::Dead)
63
0
{
64
0
    MOZ_COUNT_CTOR(PNeckoChild);
65
0
}
66
67
PNeckoChild::~PNeckoChild()
68
0
{
69
0
    MOZ_COUNT_DTOR(PNeckoChild);
70
0
}
71
72
auto PNeckoChild::Manager() const -> PContentChild*
73
0
{
74
0
    return static_cast<PContentChild*>(IProtocol::Manager());
75
0
}
76
77
auto PNeckoChild::ManagedPHttpChannelChild(nsTArray<PHttpChannelChild*>& aArr) const -> void
78
0
{
79
0
    (mManagedPHttpChannelChild).ToArray(aArr);
80
0
}
81
82
auto PNeckoChild::ManagedPHttpChannelChild() const -> const ManagedContainer<PHttpChannelChild>&
83
0
{
84
0
    return mManagedPHttpChannelChild;
85
0
}
86
87
auto PNeckoChild::ManagedPCookieServiceChild(nsTArray<PCookieServiceChild*>& aArr) const -> void
88
0
{
89
0
    (mManagedPCookieServiceChild).ToArray(aArr);
90
0
}
91
92
auto PNeckoChild::ManagedPCookieServiceChild() const -> const ManagedContainer<PCookieServiceChild>&
93
0
{
94
0
    return mManagedPCookieServiceChild;
95
0
}
96
97
auto PNeckoChild::ManagedPWyciwygChannelChild(nsTArray<PWyciwygChannelChild*>& aArr) const -> void
98
0
{
99
0
    (mManagedPWyciwygChannelChild).ToArray(aArr);
100
0
}
101
102
auto PNeckoChild::ManagedPWyciwygChannelChild() const -> const ManagedContainer<PWyciwygChannelChild>&
103
0
{
104
0
    return mManagedPWyciwygChannelChild;
105
0
}
106
107
auto PNeckoChild::ManagedPFTPChannelChild(nsTArray<PFTPChannelChild*>& aArr) const -> void
108
0
{
109
0
    (mManagedPFTPChannelChild).ToArray(aArr);
110
0
}
111
112
auto PNeckoChild::ManagedPFTPChannelChild() const -> const ManagedContainer<PFTPChannelChild>&
113
0
{
114
0
    return mManagedPFTPChannelChild;
115
0
}
116
117
auto PNeckoChild::ManagedPWebSocketChild(nsTArray<PWebSocketChild*>& aArr) const -> void
118
0
{
119
0
    (mManagedPWebSocketChild).ToArray(aArr);
120
0
}
121
122
auto PNeckoChild::ManagedPWebSocketChild() const -> const ManagedContainer<PWebSocketChild>&
123
0
{
124
0
    return mManagedPWebSocketChild;
125
0
}
126
127
auto PNeckoChild::ManagedPWebSocketEventListenerChild(nsTArray<PWebSocketEventListenerChild*>& aArr) const -> void
128
0
{
129
0
    (mManagedPWebSocketEventListenerChild).ToArray(aArr);
130
0
}
131
132
auto PNeckoChild::ManagedPWebSocketEventListenerChild() const -> const ManagedContainer<PWebSocketEventListenerChild>&
133
0
{
134
0
    return mManagedPWebSocketEventListenerChild;
135
0
}
136
137
auto PNeckoChild::ManagedPTCPSocketChild(nsTArray<PTCPSocketChild*>& aArr) const -> void
138
0
{
139
0
    (mManagedPTCPSocketChild).ToArray(aArr);
140
0
}
141
142
auto PNeckoChild::ManagedPTCPSocketChild() const -> const ManagedContainer<PTCPSocketChild>&
143
0
{
144
0
    return mManagedPTCPSocketChild;
145
0
}
146
147
auto PNeckoChild::ManagedPTCPServerSocketChild(nsTArray<PTCPServerSocketChild*>& aArr) const -> void
148
0
{
149
0
    (mManagedPTCPServerSocketChild).ToArray(aArr);
150
0
}
151
152
auto PNeckoChild::ManagedPTCPServerSocketChild() const -> const ManagedContainer<PTCPServerSocketChild>&
153
0
{
154
0
    return mManagedPTCPServerSocketChild;
155
0
}
156
157
auto PNeckoChild::ManagedPUDPSocketChild(nsTArray<PUDPSocketChild*>& aArr) const -> void
158
0
{
159
0
    (mManagedPUDPSocketChild).ToArray(aArr);
160
0
}
161
162
auto PNeckoChild::ManagedPUDPSocketChild() const -> const ManagedContainer<PUDPSocketChild>&
163
0
{
164
0
    return mManagedPUDPSocketChild;
165
0
}
166
167
auto PNeckoChild::ManagedPDNSRequestChild(nsTArray<PDNSRequestChild*>& aArr) const -> void
168
0
{
169
0
    (mManagedPDNSRequestChild).ToArray(aArr);
170
0
}
171
172
auto PNeckoChild::ManagedPDNSRequestChild() const -> const ManagedContainer<PDNSRequestChild>&
173
0
{
174
0
    return mManagedPDNSRequestChild;
175
0
}
176
177
auto PNeckoChild::ManagedPDataChannelChild(nsTArray<PDataChannelChild*>& aArr) const -> void
178
0
{
179
0
    (mManagedPDataChannelChild).ToArray(aArr);
180
0
}
181
182
auto PNeckoChild::ManagedPDataChannelChild() const -> const ManagedContainer<PDataChannelChild>&
183
0
{
184
0
    return mManagedPDataChannelChild;
185
0
}
186
187
auto PNeckoChild::ManagedPSimpleChannelChild(nsTArray<PSimpleChannelChild*>& aArr) const -> void
188
0
{
189
0
    (mManagedPSimpleChannelChild).ToArray(aArr);
190
0
}
191
192
auto PNeckoChild::ManagedPSimpleChannelChild() const -> const ManagedContainer<PSimpleChannelChild>&
193
0
{
194
0
    return mManagedPSimpleChannelChild;
195
0
}
196
197
auto PNeckoChild::ManagedPFileChannelChild(nsTArray<PFileChannelChild*>& aArr) const -> void
198
0
{
199
0
    (mManagedPFileChannelChild).ToArray(aArr);
200
0
}
201
202
auto PNeckoChild::ManagedPFileChannelChild() const -> const ManagedContainer<PFileChannelChild>&
203
0
{
204
0
    return mManagedPFileChannelChild;
205
0
}
206
207
auto PNeckoChild::ManagedPChannelDiverterChild(nsTArray<PChannelDiverterChild*>& aArr) const -> void
208
0
{
209
0
    (mManagedPChannelDiverterChild).ToArray(aArr);
210
0
}
211
212
auto PNeckoChild::ManagedPChannelDiverterChild() const -> const ManagedContainer<PChannelDiverterChild>&
213
0
{
214
0
    return mManagedPChannelDiverterChild;
215
0
}
216
217
auto PNeckoChild::ManagedPTransportProviderChild(nsTArray<PTransportProviderChild*>& aArr) const -> void
218
0
{
219
0
    (mManagedPTransportProviderChild).ToArray(aArr);
220
0
}
221
222
auto PNeckoChild::ManagedPTransportProviderChild() const -> const ManagedContainer<PTransportProviderChild>&
223
0
{
224
0
    return mManagedPTransportProviderChild;
225
0
}
226
227
auto PNeckoChild::ManagedPAltDataOutputStreamChild(nsTArray<PAltDataOutputStreamChild*>& aArr) const -> void
228
0
{
229
0
    (mManagedPAltDataOutputStreamChild).ToArray(aArr);
230
0
}
231
232
auto PNeckoChild::ManagedPAltDataOutputStreamChild() const -> const ManagedContainer<PAltDataOutputStreamChild>&
233
0
{
234
0
    return mManagedPAltDataOutputStreamChild;
235
0
}
236
237
auto PNeckoChild::ManagedPStunAddrsRequestChild(nsTArray<PStunAddrsRequestChild*>& aArr) const -> void
238
0
{
239
0
    (mManagedPStunAddrsRequestChild).ToArray(aArr);
240
0
}
241
242
auto PNeckoChild::ManagedPStunAddrsRequestChild() const -> const ManagedContainer<PStunAddrsRequestChild>&
243
0
{
244
0
    return mManagedPStunAddrsRequestChild;
245
0
}
246
247
auto PNeckoChild::Send__delete__(PNeckoChild* actor) -> bool
248
0
{
249
0
    if ((!(actor))) {
250
0
        return false;
251
0
    }
252
0
253
0
    IPC::Message* msg__ = PNecko::Msg___delete__((actor)->Id());
254
0
255
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
256
0
    WriteIPDLParam(msg__, actor, actor);
257
0
    // Sentinel = 'actor'
258
0
    (msg__)->WriteSentinel(875202478);
259
0
260
0
261
0
262
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
263
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
264
0
    }
265
0
    AUTO_PROFILER_LABEL("PNecko::Msg___delete__", OTHER);
266
0
    if ((!(StateTransition(true, (&((actor)->mLivenessState)))))) {
267
0
        mozilla::ipc::LogicError("Transition error");
268
0
    }
269
0
270
0
    bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
271
0
272
0
    IProtocol* mgr = (actor)->Manager();
273
0
    (actor)->DestroySubtree(Deletion);
274
0
    (actor)->DeallocSubtree();
275
0
    (mgr)->RemoveManagee(PNeckoMsgStart, actor);
276
0
    return sendok__;
277
0
}
278
279
auto PNeckoChild::SendPCookieServiceConstructor() -> PCookieServiceChild*
280
0
{
281
0
    return SendPCookieServiceConstructor(AllocPCookieServiceChild());
282
0
}
283
284
auto PNeckoChild::SendPCookieServiceConstructor(PCookieServiceChild* actor) -> PCookieServiceChild*
285
0
{
286
0
    if ((!(actor))) {
287
0
        NS_WARNING("Error constructing actor PCookieServiceChild");
288
0
        return nullptr;
289
0
    }
290
0
    (actor)->SetManagerAndRegister(this);
291
0
    (mManagedPCookieServiceChild).PutEntry(actor);
292
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
293
0
294
0
    IPC::Message* msg__ = PNecko::Msg_PCookieServiceConstructor(Id());
295
0
296
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
297
0
    WriteIPDLParam(msg__, this, actor);
298
0
    // Sentinel = 'actor'
299
0
    (msg__)->WriteSentinel(875202478);
300
0
301
0
302
0
303
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
304
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
305
0
    }
306
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PCookieServiceConstructor", OTHER);
307
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
308
0
        mozilla::ipc::LogicError("Transition error");
309
0
    }
310
0
311
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
312
0
    if ((!(sendok__))) {
313
0
        FatalError("constructor for actor failed");
314
0
        return nullptr;
315
0
    }
316
0
    return actor;
317
0
}
318
319
auto PNeckoChild::SendPHttpChannelConstructor(
320
        const PBrowserOrId& browser,
321
        const SerializedLoadContext& loadContext,
322
        const HttpChannelCreationArgs& args) -> PHttpChannelChild*
323
0
{
324
0
    return SendPHttpChannelConstructor(AllocPHttpChannelChild(browser, loadContext, args), browser, loadContext, args);
325
0
}
326
327
auto PNeckoChild::SendPHttpChannelConstructor(
328
        PHttpChannelChild* actor,
329
        const PBrowserOrId& browser,
330
        const SerializedLoadContext& loadContext,
331
        const HttpChannelCreationArgs& args) -> PHttpChannelChild*
332
0
{
333
0
    if ((!(actor))) {
334
0
        NS_WARNING("Error constructing actor PHttpChannelChild");
335
0
        return nullptr;
336
0
    }
337
0
    (actor)->SetManagerAndRegister(this);
338
0
    (mManagedPHttpChannelChild).PutEntry(actor);
339
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
340
0
341
0
    IPC::Message* msg__ = PNecko::Msg_PHttpChannelConstructor(Id());
342
0
343
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
344
0
    WriteIPDLParam(msg__, this, actor);
345
0
    // Sentinel = 'actor'
346
0
    (msg__)->WriteSentinel(875202478);
347
0
    WriteIPDLParam(msg__, this, browser);
348
0
    // Sentinel = 'browser'
349
0
    (msg__)->WriteSentinel(2836343679);
350
0
    WriteIPDLParam(msg__, this, loadContext);
351
0
    // Sentinel = 'loadContext'
352
0
    (msg__)->WriteSentinel(2917317838);
353
0
    WriteIPDLParam(msg__, this, args);
354
0
    // Sentinel = 'args'
355
0
    (msg__)->WriteSentinel(2823760587);
356
0
357
0
358
0
359
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
360
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
361
0
    }
362
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PHttpChannelConstructor", OTHER);
363
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
364
0
        mozilla::ipc::LogicError("Transition error");
365
0
    }
366
0
367
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
368
0
    if ((!(sendok__))) {
369
0
        FatalError("constructor for actor failed");
370
0
        return nullptr;
371
0
    }
372
0
    return actor;
373
0
}
374
375
auto PNeckoChild::SendPWyciwygChannelConstructor() -> PWyciwygChannelChild*
376
0
{
377
0
    return SendPWyciwygChannelConstructor(AllocPWyciwygChannelChild());
378
0
}
379
380
auto PNeckoChild::SendPWyciwygChannelConstructor(PWyciwygChannelChild* actor) -> PWyciwygChannelChild*
381
0
{
382
0
    if ((!(actor))) {
383
0
        NS_WARNING("Error constructing actor PWyciwygChannelChild");
384
0
        return nullptr;
385
0
    }
386
0
    (actor)->SetManagerAndRegister(this);
387
0
    (mManagedPWyciwygChannelChild).PutEntry(actor);
388
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
389
0
390
0
    IPC::Message* msg__ = PNecko::Msg_PWyciwygChannelConstructor(Id());
391
0
392
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
393
0
    WriteIPDLParam(msg__, this, actor);
394
0
    // Sentinel = 'actor'
395
0
    (msg__)->WriteSentinel(875202478);
396
0
397
0
398
0
399
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
400
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
401
0
    }
402
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PWyciwygChannelConstructor", OTHER);
403
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
404
0
        mozilla::ipc::LogicError("Transition error");
405
0
    }
406
0
407
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
408
0
    if ((!(sendok__))) {
409
0
        FatalError("constructor for actor failed");
410
0
        return nullptr;
411
0
    }
412
0
    return actor;
413
0
}
414
415
auto PNeckoChild::SendPFTPChannelConstructor(
416
        const PBrowserOrId& browser,
417
        const SerializedLoadContext& loadContext,
418
        const FTPChannelCreationArgs& args) -> PFTPChannelChild*
419
0
{
420
0
    return SendPFTPChannelConstructor(AllocPFTPChannelChild(browser, loadContext, args), browser, loadContext, args);
421
0
}
422
423
auto PNeckoChild::SendPFTPChannelConstructor(
424
        PFTPChannelChild* actor,
425
        const PBrowserOrId& browser,
426
        const SerializedLoadContext& loadContext,
427
        const FTPChannelCreationArgs& args) -> PFTPChannelChild*
428
0
{
429
0
    if ((!(actor))) {
430
0
        NS_WARNING("Error constructing actor PFTPChannelChild");
431
0
        return nullptr;
432
0
    }
433
0
    (actor)->SetManagerAndRegister(this);
434
0
    (mManagedPFTPChannelChild).PutEntry(actor);
435
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
436
0
437
0
    IPC::Message* msg__ = PNecko::Msg_PFTPChannelConstructor(Id());
438
0
439
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
440
0
    WriteIPDLParam(msg__, this, actor);
441
0
    // Sentinel = 'actor'
442
0
    (msg__)->WriteSentinel(875202478);
443
0
    WriteIPDLParam(msg__, this, browser);
444
0
    // Sentinel = 'browser'
445
0
    (msg__)->WriteSentinel(2836343679);
446
0
    WriteIPDLParam(msg__, this, loadContext);
447
0
    // Sentinel = 'loadContext'
448
0
    (msg__)->WriteSentinel(2917317838);
449
0
    WriteIPDLParam(msg__, this, args);
450
0
    // Sentinel = 'args'
451
0
    (msg__)->WriteSentinel(2823760587);
452
0
453
0
454
0
455
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
456
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
457
0
    }
458
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PFTPChannelConstructor", OTHER);
459
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
460
0
        mozilla::ipc::LogicError("Transition error");
461
0
    }
462
0
463
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
464
0
    if ((!(sendok__))) {
465
0
        FatalError("constructor for actor failed");
466
0
        return nullptr;
467
0
    }
468
0
    return actor;
469
0
}
470
471
auto PNeckoChild::SendPWebSocketConstructor(
472
        const PBrowserOrId& browser,
473
        const SerializedLoadContext& loadContext,
474
        const uint32_t& aSerialID) -> PWebSocketChild*
475
0
{
476
0
    return SendPWebSocketConstructor(AllocPWebSocketChild(browser, loadContext, aSerialID), browser, loadContext, aSerialID);
477
0
}
478
479
auto PNeckoChild::SendPWebSocketConstructor(
480
        PWebSocketChild* actor,
481
        const PBrowserOrId& browser,
482
        const SerializedLoadContext& loadContext,
483
        const uint32_t& aSerialID) -> PWebSocketChild*
484
0
{
485
0
    if ((!(actor))) {
486
0
        NS_WARNING("Error constructing actor PWebSocketChild");
487
0
        return nullptr;
488
0
    }
489
0
    (actor)->SetManagerAndRegister(this);
490
0
    (mManagedPWebSocketChild).PutEntry(actor);
491
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
492
0
493
0
    IPC::Message* msg__ = PNecko::Msg_PWebSocketConstructor(Id());
494
0
495
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
496
0
    WriteIPDLParam(msg__, this, actor);
497
0
    // Sentinel = 'actor'
498
0
    (msg__)->WriteSentinel(875202478);
499
0
    WriteIPDLParam(msg__, this, browser);
500
0
    // Sentinel = 'browser'
501
0
    (msg__)->WriteSentinel(2836343679);
502
0
    WriteIPDLParam(msg__, this, loadContext);
503
0
    // Sentinel = 'loadContext'
504
0
    (msg__)->WriteSentinel(2917317838);
505
0
    WriteIPDLParam(msg__, this, aSerialID);
506
0
    // Sentinel = 'aSerialID'
507
0
    (msg__)->WriteSentinel(1337008615);
508
0
509
0
510
0
511
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
512
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
513
0
    }
514
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PWebSocketConstructor", OTHER);
515
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
516
0
        mozilla::ipc::LogicError("Transition error");
517
0
    }
518
0
519
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
520
0
    if ((!(sendok__))) {
521
0
        FatalError("constructor for actor failed");
522
0
        return nullptr;
523
0
    }
524
0
    return actor;
525
0
}
526
527
auto PNeckoChild::SendPTCPServerSocketConstructor(
528
        const uint16_t& localPort,
529
        const uint16_t& backlog,
530
        const bool& useArrayBuffers) -> PTCPServerSocketChild*
531
0
{
532
0
    return SendPTCPServerSocketConstructor(AllocPTCPServerSocketChild(localPort, backlog, useArrayBuffers), localPort, backlog, useArrayBuffers);
533
0
}
534
535
auto PNeckoChild::SendPTCPServerSocketConstructor(
536
        PTCPServerSocketChild* actor,
537
        const uint16_t& localPort,
538
        const uint16_t& backlog,
539
        const bool& useArrayBuffers) -> PTCPServerSocketChild*
540
0
{
541
0
    if ((!(actor))) {
542
0
        NS_WARNING("Error constructing actor PTCPServerSocketChild");
543
0
        return nullptr;
544
0
    }
545
0
    (actor)->SetManagerAndRegister(this);
546
0
    (mManagedPTCPServerSocketChild).PutEntry(actor);
547
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
548
0
549
0
    IPC::Message* msg__ = PNecko::Msg_PTCPServerSocketConstructor(Id());
550
0
551
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
552
0
    WriteIPDLParam(msg__, this, actor);
553
0
    // Sentinel = 'actor'
554
0
    (msg__)->WriteSentinel(875202478);
555
0
    WriteIPDLParam(msg__, this, localPort);
556
0
    // Sentinel = 'localPort'
557
0
    (msg__)->WriteSentinel(2930268933);
558
0
    WriteIPDLParam(msg__, this, backlog);
559
0
    // Sentinel = 'backlog'
560
0
    (msg__)->WriteSentinel(403095166);
561
0
    WriteIPDLParam(msg__, this, useArrayBuffers);
562
0
    // Sentinel = 'useArrayBuffers'
563
0
    (msg__)->WriteSentinel(1444022734);
564
0
565
0
566
0
567
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
568
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
569
0
    }
570
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PTCPServerSocketConstructor", OTHER);
571
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
572
0
        mozilla::ipc::LogicError("Transition error");
573
0
    }
574
0
575
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
576
0
    if ((!(sendok__))) {
577
0
        FatalError("constructor for actor failed");
578
0
        return nullptr;
579
0
    }
580
0
    return actor;
581
0
}
582
583
auto PNeckoChild::SendPUDPSocketConstructor(
584
        const Principal& principal,
585
        const nsCString& filter) -> PUDPSocketChild*
586
0
{
587
0
    return SendPUDPSocketConstructor(AllocPUDPSocketChild(principal, filter), principal, filter);
588
0
}
589
590
auto PNeckoChild::SendPUDPSocketConstructor(
591
        PUDPSocketChild* actor,
592
        const Principal& principal,
593
        const nsCString& filter) -> PUDPSocketChild*
594
0
{
595
0
    if ((!(actor))) {
596
0
        NS_WARNING("Error constructing actor PUDPSocketChild");
597
0
        return nullptr;
598
0
    }
599
0
    (actor)->SetManagerAndRegister(this);
600
0
    (mManagedPUDPSocketChild).PutEntry(actor);
601
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
602
0
603
0
    IPC::Message* msg__ = PNecko::Msg_PUDPSocketConstructor(Id());
604
0
605
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
606
0
    WriteIPDLParam(msg__, this, actor);
607
0
    // Sentinel = 'actor'
608
0
    (msg__)->WriteSentinel(875202478);
609
0
    WriteIPDLParam(msg__, this, principal);
610
0
    // Sentinel = 'principal'
611
0
    (msg__)->WriteSentinel(732240927);
612
0
    WriteIPDLParam(msg__, this, filter);
613
0
    // Sentinel = 'filter'
614
0
    (msg__)->WriteSentinel(2236769008);
615
0
616
0
617
0
618
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
619
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
620
0
    }
621
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PUDPSocketConstructor", OTHER);
622
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
623
0
        mozilla::ipc::LogicError("Transition error");
624
0
    }
625
0
626
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
627
0
    if ((!(sendok__))) {
628
0
        FatalError("constructor for actor failed");
629
0
        return nullptr;
630
0
    }
631
0
    return actor;
632
0
}
633
634
auto PNeckoChild::SendPDNSRequestConstructor(
635
        const nsCString& hostName,
636
        const OriginAttributes& originAttributes,
637
        const uint32_t& flags) -> PDNSRequestChild*
638
0
{
639
0
    return SendPDNSRequestConstructor(AllocPDNSRequestChild(hostName, originAttributes, flags), hostName, originAttributes, flags);
640
0
}
641
642
auto PNeckoChild::SendPDNSRequestConstructor(
643
        PDNSRequestChild* actor,
644
        const nsCString& hostName,
645
        const OriginAttributes& originAttributes,
646
        const uint32_t& flags) -> PDNSRequestChild*
647
0
{
648
0
    if ((!(actor))) {
649
0
        NS_WARNING("Error constructing actor PDNSRequestChild");
650
0
        return nullptr;
651
0
    }
652
0
    (actor)->SetManagerAndRegister(this);
653
0
    (mManagedPDNSRequestChild).PutEntry(actor);
654
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
655
0
656
0
    IPC::Message* msg__ = PNecko::Msg_PDNSRequestConstructor(Id());
657
0
658
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
659
0
    WriteIPDLParam(msg__, this, actor);
660
0
    // Sentinel = 'actor'
661
0
    (msg__)->WriteSentinel(875202478);
662
0
    WriteIPDLParam(msg__, this, hostName);
663
0
    // Sentinel = 'hostName'
664
0
    (msg__)->WriteSentinel(1367899915);
665
0
    WriteIPDLParam(msg__, this, originAttributes);
666
0
    // Sentinel = 'originAttributes'
667
0
    (msg__)->WriteSentinel(2655275965);
668
0
    WriteIPDLParam(msg__, this, flags);
669
0
    // Sentinel = 'flags'
670
0
    (msg__)->WriteSentinel(2550519284);
671
0
672
0
673
0
674
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
675
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
676
0
    }
677
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PDNSRequestConstructor", OTHER);
678
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
679
0
        mozilla::ipc::LogicError("Transition error");
680
0
    }
681
0
682
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
683
0
    if ((!(sendok__))) {
684
0
        FatalError("constructor for actor failed");
685
0
        return nullptr;
686
0
    }
687
0
    return actor;
688
0
}
689
690
auto PNeckoChild::SendPWebSocketEventListenerConstructor(const uint64_t& aInnerWindowID) -> PWebSocketEventListenerChild*
691
0
{
692
0
    return SendPWebSocketEventListenerConstructor(AllocPWebSocketEventListenerChild(aInnerWindowID), aInnerWindowID);
693
0
}
694
695
auto PNeckoChild::SendPWebSocketEventListenerConstructor(
696
        PWebSocketEventListenerChild* actor,
697
        const uint64_t& aInnerWindowID) -> PWebSocketEventListenerChild*
698
0
{
699
0
    if ((!(actor))) {
700
0
        NS_WARNING("Error constructing actor PWebSocketEventListenerChild");
701
0
        return nullptr;
702
0
    }
703
0
    (actor)->SetManagerAndRegister(this);
704
0
    (mManagedPWebSocketEventListenerChild).PutEntry(actor);
705
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
706
0
707
0
    IPC::Message* msg__ = PNecko::Msg_PWebSocketEventListenerConstructor(Id());
708
0
709
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
710
0
    WriteIPDLParam(msg__, this, actor);
711
0
    // Sentinel = 'actor'
712
0
    (msg__)->WriteSentinel(875202478);
713
0
    WriteIPDLParam(msg__, this, aInnerWindowID);
714
0
    // Sentinel = 'aInnerWindowID'
715
0
    (msg__)->WriteSentinel(3059251422);
716
0
717
0
718
0
719
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
720
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
721
0
    }
722
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PWebSocketEventListenerConstructor", OTHER);
723
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
724
0
        mozilla::ipc::LogicError("Transition error");
725
0
    }
726
0
727
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
728
0
    if ((!(sendok__))) {
729
0
        FatalError("constructor for actor failed");
730
0
        return nullptr;
731
0
    }
732
0
    return actor;
733
0
}
734
735
auto PNeckoChild::SendPredPredict(
736
        const OptionalURIParams& targetURI,
737
        const OptionalURIParams& sourceURI,
738
        const uint32_t& reason,
739
        const OriginAttributes& originAttributes,
740
        const bool& hasVerifier) -> bool
741
0
{
742
0
    IPC::Message* msg__ = PNecko::Msg_PredPredict(Id());
743
0
744
0
    WriteIPDLParam(msg__, this, targetURI);
745
0
    // Sentinel = 'targetURI'
746
0
    (msg__)->WriteSentinel(1361914354);
747
0
    WriteIPDLParam(msg__, this, sourceURI);
748
0
    // Sentinel = 'sourceURI'
749
0
    (msg__)->WriteSentinel(3017222278);
750
0
    WriteIPDLParam(msg__, this, reason);
751
0
    // Sentinel = 'reason'
752
0
    (msg__)->WriteSentinel(4151390930);
753
0
    WriteIPDLParam(msg__, this, originAttributes);
754
0
    // Sentinel = 'originAttributes'
755
0
    (msg__)->WriteSentinel(2655275965);
756
0
    WriteIPDLParam(msg__, this, hasVerifier);
757
0
    // Sentinel = 'hasVerifier'
758
0
    (msg__)->WriteSentinel(1905198201);
759
0
760
0
761
0
762
0
763
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
764
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
765
0
    }
766
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PredPredict", OTHER);
767
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
768
0
        mozilla::ipc::LogicError("Transition error");
769
0
    }
770
0
771
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
772
0
    return sendok__;
773
0
}
774
775
auto PNeckoChild::SendPredLearn(
776
        const URIParams& targetURI,
777
        const OptionalURIParams& sourceURI,
778
        const uint32_t& reason,
779
        const OriginAttributes& originAttributes) -> bool
780
0
{
781
0
    IPC::Message* msg__ = PNecko::Msg_PredLearn(Id());
782
0
783
0
    WriteIPDLParam(msg__, this, targetURI);
784
0
    // Sentinel = 'targetURI'
785
0
    (msg__)->WriteSentinel(1361914354);
786
0
    WriteIPDLParam(msg__, this, sourceURI);
787
0
    // Sentinel = 'sourceURI'
788
0
    (msg__)->WriteSentinel(3017222278);
789
0
    WriteIPDLParam(msg__, this, reason);
790
0
    // Sentinel = 'reason'
791
0
    (msg__)->WriteSentinel(4151390930);
792
0
    WriteIPDLParam(msg__, this, originAttributes);
793
0
    // Sentinel = 'originAttributes'
794
0
    (msg__)->WriteSentinel(2655275965);
795
0
796
0
797
0
798
0
799
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
800
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
801
0
    }
802
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PredLearn", OTHER);
803
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
804
0
        mozilla::ipc::LogicError("Transition error");
805
0
    }
806
0
807
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
808
0
    return sendok__;
809
0
}
810
811
auto PNeckoChild::SendPredReset() -> bool
812
0
{
813
0
    IPC::Message* msg__ = PNecko::Msg_PredReset(Id());
814
0
815
0
816
0
817
0
818
0
819
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
820
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
821
0
    }
822
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PredReset", OTHER);
823
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
824
0
        mozilla::ipc::LogicError("Transition error");
825
0
    }
826
0
827
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
828
0
    return sendok__;
829
0
}
830
831
auto PNeckoChild::SendSpeculativeConnect(
832
        const URIParams& uri,
833
        const Principal& principal,
834
        const bool& anonymous) -> bool
835
0
{
836
0
    IPC::Message* msg__ = PNecko::Msg_SpeculativeConnect(Id());
837
0
838
0
    WriteIPDLParam(msg__, this, uri);
839
0
    // Sentinel = 'uri'
840
0
    (msg__)->WriteSentinel(1453210605);
841
0
    WriteIPDLParam(msg__, this, principal);
842
0
    // Sentinel = 'principal'
843
0
    (msg__)->WriteSentinel(732240927);
844
0
    WriteIPDLParam(msg__, this, anonymous);
845
0
    // Sentinel = 'anonymous'
846
0
    (msg__)->WriteSentinel(479504470);
847
0
848
0
849
0
850
0
851
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
852
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
853
0
    }
854
0
    AUTO_PROFILER_LABEL("PNecko::Msg_SpeculativeConnect", OTHER);
855
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
856
0
        mozilla::ipc::LogicError("Transition error");
857
0
    }
858
0
859
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
860
0
    return sendok__;
861
0
}
862
863
auto PNeckoChild::SendHTMLDNSPrefetch(
864
        const nsString& hostname,
865
        const bool& isHttps,
866
        const OriginAttributes& originAttributes,
867
        const uint16_t& flags) -> bool
868
0
{
869
0
    IPC::Message* msg__ = PNecko::Msg_HTMLDNSPrefetch(Id());
870
0
871
0
    WriteIPDLParam(msg__, this, hostname);
872
0
    // Sentinel = 'hostname'
873
0
    (msg__)->WriteSentinel(4013034923);
874
0
    WriteIPDLParam(msg__, this, isHttps);
875
0
    // Sentinel = 'isHttps'
876
0
    (msg__)->WriteSentinel(2454022204);
877
0
    WriteIPDLParam(msg__, this, originAttributes);
878
0
    // Sentinel = 'originAttributes'
879
0
    (msg__)->WriteSentinel(2655275965);
880
0
    WriteIPDLParam(msg__, this, flags);
881
0
    // Sentinel = 'flags'
882
0
    (msg__)->WriteSentinel(2550519284);
883
0
884
0
885
0
886
0
887
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
888
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
889
0
    }
890
0
    AUTO_PROFILER_LABEL("PNecko::Msg_HTMLDNSPrefetch", OTHER);
891
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
892
0
        mozilla::ipc::LogicError("Transition error");
893
0
    }
894
0
895
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
896
0
    return sendok__;
897
0
}
898
899
auto PNeckoChild::SendCancelHTMLDNSPrefetch(
900
        const nsString& hostname,
901
        const bool& isHttps,
902
        const OriginAttributes& originAttributes,
903
        const uint16_t& flags,
904
        const nsresult& reason) -> bool
905
0
{
906
0
    IPC::Message* msg__ = PNecko::Msg_CancelHTMLDNSPrefetch(Id());
907
0
908
0
    WriteIPDLParam(msg__, this, hostname);
909
0
    // Sentinel = 'hostname'
910
0
    (msg__)->WriteSentinel(4013034923);
911
0
    WriteIPDLParam(msg__, this, isHttps);
912
0
    // Sentinel = 'isHttps'
913
0
    (msg__)->WriteSentinel(2454022204);
914
0
    WriteIPDLParam(msg__, this, originAttributes);
915
0
    // Sentinel = 'originAttributes'
916
0
    (msg__)->WriteSentinel(2655275965);
917
0
    WriteIPDLParam(msg__, this, flags);
918
0
    // Sentinel = 'flags'
919
0
    (msg__)->WriteSentinel(2550519284);
920
0
    WriteIPDLParam(msg__, this, reason);
921
0
    // Sentinel = 'reason'
922
0
    (msg__)->WriteSentinel(4151390930);
923
0
924
0
925
0
926
0
927
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
928
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
929
0
    }
930
0
    AUTO_PROFILER_LABEL("PNecko::Msg_CancelHTMLDNSPrefetch", OTHER);
931
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
932
0
        mozilla::ipc::LogicError("Transition error");
933
0
    }
934
0
935
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
936
0
    return sendok__;
937
0
}
938
939
auto PNeckoChild::SendPDataChannelConstructor(const uint32_t& channelId) -> PDataChannelChild*
940
0
{
941
0
    return SendPDataChannelConstructor(AllocPDataChannelChild(channelId), channelId);
942
0
}
943
944
auto PNeckoChild::SendPDataChannelConstructor(
945
        PDataChannelChild* actor,
946
        const uint32_t& channelId) -> PDataChannelChild*
947
0
{
948
0
    if ((!(actor))) {
949
0
        NS_WARNING("Error constructing actor PDataChannelChild");
950
0
        return nullptr;
951
0
    }
952
0
    (actor)->SetManagerAndRegister(this);
953
0
    (mManagedPDataChannelChild).PutEntry(actor);
954
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
955
0
956
0
    IPC::Message* msg__ = PNecko::Msg_PDataChannelConstructor(Id());
957
0
958
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
959
0
    WriteIPDLParam(msg__, this, actor);
960
0
    // Sentinel = 'actor'
961
0
    (msg__)->WriteSentinel(875202478);
962
0
    WriteIPDLParam(msg__, this, channelId);
963
0
    // Sentinel = 'channelId'
964
0
    (msg__)->WriteSentinel(6854027);
965
0
966
0
967
0
968
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
969
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
970
0
    }
971
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PDataChannelConstructor", OTHER);
972
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
973
0
        mozilla::ipc::LogicError("Transition error");
974
0
    }
975
0
976
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
977
0
    if ((!(sendok__))) {
978
0
        FatalError("constructor for actor failed");
979
0
        return nullptr;
980
0
    }
981
0
    return actor;
982
0
}
983
984
auto PNeckoChild::SendPSimpleChannelConstructor(const uint32_t& channelId) -> PSimpleChannelChild*
985
0
{
986
0
    return SendPSimpleChannelConstructor(AllocPSimpleChannelChild(channelId), channelId);
987
0
}
988
989
auto PNeckoChild::SendPSimpleChannelConstructor(
990
        PSimpleChannelChild* actor,
991
        const uint32_t& channelId) -> PSimpleChannelChild*
992
0
{
993
0
    if ((!(actor))) {
994
0
        NS_WARNING("Error constructing actor PSimpleChannelChild");
995
0
        return nullptr;
996
0
    }
997
0
    (actor)->SetManagerAndRegister(this);
998
0
    (mManagedPSimpleChannelChild).PutEntry(actor);
999
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
1000
0
1001
0
    IPC::Message* msg__ = PNecko::Msg_PSimpleChannelConstructor(Id());
1002
0
1003
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
1004
0
    WriteIPDLParam(msg__, this, actor);
1005
0
    // Sentinel = 'actor'
1006
0
    (msg__)->WriteSentinel(875202478);
1007
0
    WriteIPDLParam(msg__, this, channelId);
1008
0
    // Sentinel = 'channelId'
1009
0
    (msg__)->WriteSentinel(6854027);
1010
0
1011
0
1012
0
1013
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1014
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
1015
0
    }
1016
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PSimpleChannelConstructor", OTHER);
1017
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
1018
0
        mozilla::ipc::LogicError("Transition error");
1019
0
    }
1020
0
1021
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
1022
0
    if ((!(sendok__))) {
1023
0
        FatalError("constructor for actor failed");
1024
0
        return nullptr;
1025
0
    }
1026
0
    return actor;
1027
0
}
1028
1029
auto PNeckoChild::SendPFileChannelConstructor(const uint32_t& channelId) -> PFileChannelChild*
1030
0
{
1031
0
    return SendPFileChannelConstructor(AllocPFileChannelChild(channelId), channelId);
1032
0
}
1033
1034
auto PNeckoChild::SendPFileChannelConstructor(
1035
        PFileChannelChild* actor,
1036
        const uint32_t& channelId) -> PFileChannelChild*
1037
0
{
1038
0
    if ((!(actor))) {
1039
0
        NS_WARNING("Error constructing actor PFileChannelChild");
1040
0
        return nullptr;
1041
0
    }
1042
0
    (actor)->SetManagerAndRegister(this);
1043
0
    (mManagedPFileChannelChild).PutEntry(actor);
1044
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
1045
0
1046
0
    IPC::Message* msg__ = PNecko::Msg_PFileChannelConstructor(Id());
1047
0
1048
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
1049
0
    WriteIPDLParam(msg__, this, actor);
1050
0
    // Sentinel = 'actor'
1051
0
    (msg__)->WriteSentinel(875202478);
1052
0
    WriteIPDLParam(msg__, this, channelId);
1053
0
    // Sentinel = 'channelId'
1054
0
    (msg__)->WriteSentinel(6854027);
1055
0
1056
0
1057
0
1058
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1059
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
1060
0
    }
1061
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PFileChannelConstructor", OTHER);
1062
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
1063
0
        mozilla::ipc::LogicError("Transition error");
1064
0
    }
1065
0
1066
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
1067
0
    if ((!(sendok__))) {
1068
0
        FatalError("constructor for actor failed");
1069
0
        return nullptr;
1070
0
    }
1071
0
    return actor;
1072
0
}
1073
1074
auto PNeckoChild::SendPChannelDiverterConstructor(const ChannelDiverterArgs& channel) -> PChannelDiverterChild*
1075
0
{
1076
0
    return SendPChannelDiverterConstructor(AllocPChannelDiverterChild(channel), channel);
1077
0
}
1078
1079
auto PNeckoChild::SendPChannelDiverterConstructor(
1080
        PChannelDiverterChild* actor,
1081
        const ChannelDiverterArgs& channel) -> PChannelDiverterChild*
1082
0
{
1083
0
    if ((!(actor))) {
1084
0
        NS_WARNING("Error constructing actor PChannelDiverterChild");
1085
0
        return nullptr;
1086
0
    }
1087
0
    (actor)->SetManagerAndRegister(this);
1088
0
    (mManagedPChannelDiverterChild).PutEntry(actor);
1089
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
1090
0
1091
0
    IPC::Message* msg__ = PNecko::Msg_PChannelDiverterConstructor(Id());
1092
0
1093
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
1094
0
    WriteIPDLParam(msg__, this, actor);
1095
0
    // Sentinel = 'actor'
1096
0
    (msg__)->WriteSentinel(875202478);
1097
0
    WriteIPDLParam(msg__, this, channel);
1098
0
    // Sentinel = 'channel'
1099
0
    (msg__)->WriteSentinel(452840382);
1100
0
1101
0
1102
0
1103
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1104
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
1105
0
    }
1106
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PChannelDiverterConstructor", OTHER);
1107
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
1108
0
        mozilla::ipc::LogicError("Transition error");
1109
0
    }
1110
0
1111
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
1112
0
    if ((!(sendok__))) {
1113
0
        FatalError("constructor for actor failed");
1114
0
        return nullptr;
1115
0
    }
1116
0
    return actor;
1117
0
}
1118
1119
auto PNeckoChild::SendOnAuthAvailable(
1120
        const uint64_t& callbackId,
1121
        const nsString& user,
1122
        const nsString& password,
1123
        const nsString& domain) -> bool
1124
0
{
1125
0
    IPC::Message* msg__ = PNecko::Msg_OnAuthAvailable(Id());
1126
0
1127
0
    WriteIPDLParam(msg__, this, callbackId);
1128
0
    // Sentinel = 'callbackId'
1129
0
    (msg__)->WriteSentinel(4163989448);
1130
0
    WriteIPDLParam(msg__, this, user);
1131
0
    // Sentinel = 'user'
1132
0
    (msg__)->WriteSentinel(479507925);
1133
0
    WriteIPDLParam(msg__, this, password);
1134
0
    // Sentinel = 'password'
1135
0
    (msg__)->WriteSentinel(2527534683);
1136
0
    WriteIPDLParam(msg__, this, domain);
1137
0
    // Sentinel = 'domain'
1138
0
    (msg__)->WriteSentinel(702229122);
1139
0
1140
0
1141
0
1142
0
1143
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1144
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
1145
0
    }
1146
0
    AUTO_PROFILER_LABEL("PNecko::Msg_OnAuthAvailable", OTHER);
1147
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
1148
0
        mozilla::ipc::LogicError("Transition error");
1149
0
    }
1150
0
1151
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
1152
0
    return sendok__;
1153
0
}
1154
1155
auto PNeckoChild::SendOnAuthCancelled(
1156
        const uint64_t& callbackId,
1157
        const bool& userCancel) -> bool
1158
0
{
1159
0
    IPC::Message* msg__ = PNecko::Msg_OnAuthCancelled(Id());
1160
0
1161
0
    WriteIPDLParam(msg__, this, callbackId);
1162
0
    // Sentinel = 'callbackId'
1163
0
    (msg__)->WriteSentinel(4163989448);
1164
0
    WriteIPDLParam(msg__, this, userCancel);
1165
0
    // Sentinel = 'userCancel'
1166
0
    (msg__)->WriteSentinel(2063943853);
1167
0
1168
0
1169
0
1170
0
1171
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1172
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
1173
0
    }
1174
0
    AUTO_PROFILER_LABEL("PNecko::Msg_OnAuthCancelled", OTHER);
1175
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
1176
0
        mozilla::ipc::LogicError("Transition error");
1177
0
    }
1178
0
1179
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
1180
0
    return sendok__;
1181
0
}
1182
1183
auto PNeckoChild::SendRequestContextLoadBegin(const uint64_t& rcid) -> bool
1184
0
{
1185
0
    IPC::Message* msg__ = PNecko::Msg_RequestContextLoadBegin(Id());
1186
0
1187
0
    WriteIPDLParam(msg__, this, rcid);
1188
0
    // Sentinel = 'rcid'
1189
0
    (msg__)->WriteSentinel(3280983874);
1190
0
1191
0
1192
0
1193
0
1194
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1195
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
1196
0
    }
1197
0
    AUTO_PROFILER_LABEL("PNecko::Msg_RequestContextLoadBegin", OTHER);
1198
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
1199
0
        mozilla::ipc::LogicError("Transition error");
1200
0
    }
1201
0
1202
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
1203
0
    return sendok__;
1204
0
}
1205
1206
auto PNeckoChild::SendRequestContextAfterDOMContentLoaded(const uint64_t& rcid) -> bool
1207
0
{
1208
0
    IPC::Message* msg__ = PNecko::Msg_RequestContextAfterDOMContentLoaded(Id());
1209
0
1210
0
    WriteIPDLParam(msg__, this, rcid);
1211
0
    // Sentinel = 'rcid'
1212
0
    (msg__)->WriteSentinel(3280983874);
1213
0
1214
0
1215
0
1216
0
1217
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1218
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
1219
0
    }
1220
0
    AUTO_PROFILER_LABEL("PNecko::Msg_RequestContextAfterDOMContentLoaded", OTHER);
1221
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
1222
0
        mozilla::ipc::LogicError("Transition error");
1223
0
    }
1224
0
1225
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
1226
0
    return sendok__;
1227
0
}
1228
1229
auto PNeckoChild::SendRemoveRequestContext(const uint64_t& rcid) -> bool
1230
0
{
1231
0
    IPC::Message* msg__ = PNecko::Msg_RemoveRequestContext(Id());
1232
0
1233
0
    WriteIPDLParam(msg__, this, rcid);
1234
0
    // Sentinel = 'rcid'
1235
0
    (msg__)->WriteSentinel(3280983874);
1236
0
1237
0
1238
0
1239
0
1240
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1241
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
1242
0
    }
1243
0
    AUTO_PROFILER_LABEL("PNecko::Msg_RemoveRequestContext", OTHER);
1244
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
1245
0
        mozilla::ipc::LogicError("Transition error");
1246
0
    }
1247
0
1248
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
1249
0
    return sendok__;
1250
0
}
1251
1252
auto PNeckoChild::SendPAltDataOutputStreamConstructor(
1253
        const nsCString& type,
1254
        const int64_t& predictedSize,
1255
        PHttpChannelChild* channel) -> PAltDataOutputStreamChild*
1256
0
{
1257
0
    return SendPAltDataOutputStreamConstructor(AllocPAltDataOutputStreamChild(type, predictedSize, channel), type, predictedSize, channel);
1258
0
}
1259
1260
auto PNeckoChild::SendPAltDataOutputStreamConstructor(
1261
        PAltDataOutputStreamChild* actor,
1262
        const nsCString& type,
1263
        const int64_t& predictedSize,
1264
        PHttpChannelChild* channel) -> PAltDataOutputStreamChild*
1265
0
{
1266
0
    if ((!(actor))) {
1267
0
        NS_WARNING("Error constructing actor PAltDataOutputStreamChild");
1268
0
        return nullptr;
1269
0
    }
1270
0
    (actor)->SetManagerAndRegister(this);
1271
0
    (mManagedPAltDataOutputStreamChild).PutEntry(actor);
1272
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
1273
0
1274
0
    IPC::Message* msg__ = PNecko::Msg_PAltDataOutputStreamConstructor(Id());
1275
0
1276
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
1277
0
    WriteIPDLParam(msg__, this, actor);
1278
0
    // Sentinel = 'actor'
1279
0
    (msg__)->WriteSentinel(875202478);
1280
0
    WriteIPDLParam(msg__, this, type);
1281
0
    // Sentinel = 'type'
1282
0
    (msg__)->WriteSentinel(2982068540);
1283
0
    WriteIPDLParam(msg__, this, predictedSize);
1284
0
    // Sentinel = 'predictedSize'
1285
0
    (msg__)->WriteSentinel(1432646818);
1286
0
    MOZ_RELEASE_ASSERT(channel, "NULL actor value passed to non-nullable param");
1287
0
    WriteIPDLParam(msg__, this, channel);
1288
0
    // Sentinel = 'channel'
1289
0
    (msg__)->WriteSentinel(452840382);
1290
0
1291
0
1292
0
1293
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1294
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
1295
0
    }
1296
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PAltDataOutputStreamConstructor", OTHER);
1297
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
1298
0
        mozilla::ipc::LogicError("Transition error");
1299
0
    }
1300
0
1301
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
1302
0
    if ((!(sendok__))) {
1303
0
        FatalError("constructor for actor failed");
1304
0
        return nullptr;
1305
0
    }
1306
0
    return actor;
1307
0
}
1308
1309
auto PNeckoChild::SendPStunAddrsRequestConstructor() -> PStunAddrsRequestChild*
1310
0
{
1311
0
    return SendPStunAddrsRequestConstructor(AllocPStunAddrsRequestChild());
1312
0
}
1313
1314
auto PNeckoChild::SendPStunAddrsRequestConstructor(PStunAddrsRequestChild* actor) -> PStunAddrsRequestChild*
1315
0
{
1316
0
    if ((!(actor))) {
1317
0
        NS_WARNING("Error constructing actor PStunAddrsRequestChild");
1318
0
        return nullptr;
1319
0
    }
1320
0
    (actor)->SetManagerAndRegister(this);
1321
0
    (mManagedPStunAddrsRequestChild).PutEntry(actor);
1322
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
1323
0
1324
0
    IPC::Message* msg__ = PNecko::Msg_PStunAddrsRequestConstructor(Id());
1325
0
1326
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
1327
0
    WriteIPDLParam(msg__, this, actor);
1328
0
    // Sentinel = 'actor'
1329
0
    (msg__)->WriteSentinel(875202478);
1330
0
1331
0
1332
0
1333
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1334
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
1335
0
    }
1336
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PStunAddrsRequestConstructor", OTHER);
1337
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
1338
0
        mozilla::ipc::LogicError("Transition error");
1339
0
    }
1340
0
1341
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
1342
0
    if ((!(sendok__))) {
1343
0
        FatalError("constructor for actor failed");
1344
0
        return nullptr;
1345
0
    }
1346
0
    return actor;
1347
0
}
1348
1349
auto PNeckoChild::SendGetExtensionStream(
1350
        const URIParams& uri,
1351
        mozilla::ipc::ResolveCallback<RefPtr<nsIInputStream>>&& aResolve,
1352
        mozilla::ipc::RejectCallback&& aReject) -> void
1353
0
{
1354
0
    IPC::Message* msg__ = PNecko::Msg_GetExtensionStream(Id());
1355
0
1356
0
    WriteIPDLParam(msg__, this, uri);
1357
0
    // Sentinel = 'uri'
1358
0
    (msg__)->WriteSentinel(1453210605);
1359
0
1360
0
1361
0
1362
0
1363
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1364
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
1365
0
    }
1366
0
    AUTO_PROFILER_LABEL("PNecko::Msg_GetExtensionStream", OTHER);
1367
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
1368
0
        mozilla::ipc::LogicError("Transition error");
1369
0
    }
1370
0
1371
0
    (GetIPCChannel())->Send(msg__, this, std::move(aResolve), std::move(aReject));
1372
0
    return;
1373
0
}
1374
1375
auto PNeckoChild::SendGetExtensionStream(const URIParams& uri) -> RefPtr<GetExtensionStreamPromise>
1376
0
{
1377
0
1378
0
    RefPtr<MozPromise<RefPtr<nsIInputStream>, ResponseRejectReason, false>::Private> promise__ = new MozPromise<RefPtr<nsIInputStream>, ResponseRejectReason, false>::Private(__func__);
1379
0
1380
0
    SendGetExtensionStream(uri, [promise__](RefPtr<nsIInputStream>&& aValue) {
1381
0
        (promise__)->Resolve(std::move(aValue), __func__);
1382
0
    }, [promise__](ResponseRejectReason aReason) {
1383
0
        (promise__)->Reject(aReason, __func__);
1384
0
    });
1385
0
    return promise__;
1386
0
}
1387
1388
auto PNeckoChild::SendGetExtensionFD(
1389
        const URIParams& uri,
1390
        mozilla::ipc::ResolveCallback<FileDescriptor>&& aResolve,
1391
        mozilla::ipc::RejectCallback&& aReject) -> void
1392
0
{
1393
0
    IPC::Message* msg__ = PNecko::Msg_GetExtensionFD(Id());
1394
0
1395
0
    WriteIPDLParam(msg__, this, uri);
1396
0
    // Sentinel = 'uri'
1397
0
    (msg__)->WriteSentinel(1453210605);
1398
0
1399
0
1400
0
1401
0
1402
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1403
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
1404
0
    }
1405
0
    AUTO_PROFILER_LABEL("PNecko::Msg_GetExtensionFD", OTHER);
1406
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
1407
0
        mozilla::ipc::LogicError("Transition error");
1408
0
    }
1409
0
1410
0
    (GetIPCChannel())->Send(msg__, this, std::move(aResolve), std::move(aReject));
1411
0
    return;
1412
0
}
1413
1414
auto PNeckoChild::SendGetExtensionFD(const URIParams& uri) -> RefPtr<GetExtensionFDPromise>
1415
0
{
1416
0
1417
0
    RefPtr<MozPromise<FileDescriptor, ResponseRejectReason, false>::Private> promise__ = new MozPromise<FileDescriptor, ResponseRejectReason, false>::Private(__func__);
1418
0
1419
0
    SendGetExtensionFD(uri, [promise__](FileDescriptor&& aValue) {
1420
0
        (promise__)->Resolve(std::move(aValue), __func__);
1421
0
    }, [promise__](ResponseRejectReason aReason) {
1422
0
        (promise__)->Reject(aReason, __func__);
1423
0
    });
1424
0
    return promise__;
1425
0
}
1426
1427
auto PNeckoChild::SendPTCPSocketConstructor(
1428
        const nsString& host,
1429
        const uint16_t& port) -> PTCPSocketChild*
1430
0
{
1431
0
    return SendPTCPSocketConstructor(AllocPTCPSocketChild(host, port), host, port);
1432
0
}
1433
1434
auto PNeckoChild::SendPTCPSocketConstructor(
1435
        PTCPSocketChild* actor,
1436
        const nsString& host,
1437
        const uint16_t& port) -> PTCPSocketChild*
1438
0
{
1439
0
    if ((!(actor))) {
1440
0
        NS_WARNING("Error constructing actor PTCPSocketChild");
1441
0
        return nullptr;
1442
0
    }
1443
0
    (actor)->SetManagerAndRegister(this);
1444
0
    (mManagedPTCPSocketChild).PutEntry(actor);
1445
0
    (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
1446
0
1447
0
    IPC::Message* msg__ = PNecko::Msg_PTCPSocketConstructor(Id());
1448
0
1449
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
1450
0
    WriteIPDLParam(msg__, this, actor);
1451
0
    // Sentinel = 'actor'
1452
0
    (msg__)->WriteSentinel(875202478);
1453
0
    WriteIPDLParam(msg__, this, host);
1454
0
    // Sentinel = 'host'
1455
0
    (msg__)->WriteSentinel(4070301394);
1456
0
    WriteIPDLParam(msg__, this, port);
1457
0
    // Sentinel = 'port'
1458
0
    (msg__)->WriteSentinel(3633211549);
1459
0
1460
0
1461
0
1462
0
    if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1463
0
        mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
1464
0
    }
1465
0
    AUTO_PROFILER_LABEL("PNecko::Msg_PTCPSocketConstructor", OTHER);
1466
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
1467
0
        mozilla::ipc::LogicError("Transition error");
1468
0
    }
1469
0
1470
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
1471
0
    if ((!(sendok__))) {
1472
0
        FatalError("constructor for actor failed");
1473
0
        return nullptr;
1474
0
    }
1475
0
    return actor;
1476
0
}
1477
1478
auto PNeckoChild::RemoveManagee(
1479
        int32_t aProtocolId,
1480
        IProtocol* aListener) -> void
1481
0
{
1482
0
    switch (aProtocolId) {
1483
0
    case PHttpChannelMsgStart:
1484
0
        {
1485
0
            PHttpChannelChild* actor = static_cast<PHttpChannelChild*>(aListener);
1486
0
            auto& container = mManagedPHttpChannelChild;
1487
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1488
0
1489
0
            (container).RemoveEntry(actor);
1490
0
            DeallocPHttpChannelChild(actor);
1491
0
            return;
1492
0
        }
1493
0
    case PCookieServiceMsgStart:
1494
0
        {
1495
0
            PCookieServiceChild* actor = static_cast<PCookieServiceChild*>(aListener);
1496
0
            auto& container = mManagedPCookieServiceChild;
1497
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1498
0
1499
0
            (container).RemoveEntry(actor);
1500
0
            DeallocPCookieServiceChild(actor);
1501
0
            return;
1502
0
        }
1503
0
    case PWyciwygChannelMsgStart:
1504
0
        {
1505
0
            PWyciwygChannelChild* actor = static_cast<PWyciwygChannelChild*>(aListener);
1506
0
            auto& container = mManagedPWyciwygChannelChild;
1507
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1508
0
1509
0
            (container).RemoveEntry(actor);
1510
0
            DeallocPWyciwygChannelChild(actor);
1511
0
            return;
1512
0
        }
1513
0
    case PFTPChannelMsgStart:
1514
0
        {
1515
0
            PFTPChannelChild* actor = static_cast<PFTPChannelChild*>(aListener);
1516
0
            auto& container = mManagedPFTPChannelChild;
1517
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1518
0
1519
0
            (container).RemoveEntry(actor);
1520
0
            DeallocPFTPChannelChild(actor);
1521
0
            return;
1522
0
        }
1523
0
    case PWebSocketMsgStart:
1524
0
        {
1525
0
            PWebSocketChild* actor = static_cast<PWebSocketChild*>(aListener);
1526
0
            auto& container = mManagedPWebSocketChild;
1527
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1528
0
1529
0
            (container).RemoveEntry(actor);
1530
0
            DeallocPWebSocketChild(actor);
1531
0
            return;
1532
0
        }
1533
0
    case PWebSocketEventListenerMsgStart:
1534
0
        {
1535
0
            PWebSocketEventListenerChild* actor = static_cast<PWebSocketEventListenerChild*>(aListener);
1536
0
            auto& container = mManagedPWebSocketEventListenerChild;
1537
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1538
0
1539
0
            (container).RemoveEntry(actor);
1540
0
            DeallocPWebSocketEventListenerChild(actor);
1541
0
            return;
1542
0
        }
1543
0
    case PTCPSocketMsgStart:
1544
0
        {
1545
0
            PTCPSocketChild* actor = static_cast<PTCPSocketChild*>(aListener);
1546
0
            auto& container = mManagedPTCPSocketChild;
1547
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1548
0
1549
0
            (container).RemoveEntry(actor);
1550
0
            DeallocPTCPSocketChild(actor);
1551
0
            return;
1552
0
        }
1553
0
    case PTCPServerSocketMsgStart:
1554
0
        {
1555
0
            PTCPServerSocketChild* actor = static_cast<PTCPServerSocketChild*>(aListener);
1556
0
            auto& container = mManagedPTCPServerSocketChild;
1557
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1558
0
1559
0
            (container).RemoveEntry(actor);
1560
0
            DeallocPTCPServerSocketChild(actor);
1561
0
            return;
1562
0
        }
1563
0
    case PUDPSocketMsgStart:
1564
0
        {
1565
0
            PUDPSocketChild* actor = static_cast<PUDPSocketChild*>(aListener);
1566
0
            auto& container = mManagedPUDPSocketChild;
1567
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1568
0
1569
0
            (container).RemoveEntry(actor);
1570
0
            DeallocPUDPSocketChild(actor);
1571
0
            return;
1572
0
        }
1573
0
    case PDNSRequestMsgStart:
1574
0
        {
1575
0
            PDNSRequestChild* actor = static_cast<PDNSRequestChild*>(aListener);
1576
0
            auto& container = mManagedPDNSRequestChild;
1577
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1578
0
1579
0
            (container).RemoveEntry(actor);
1580
0
            DeallocPDNSRequestChild(actor);
1581
0
            return;
1582
0
        }
1583
0
    case PDataChannelMsgStart:
1584
0
        {
1585
0
            PDataChannelChild* actor = static_cast<PDataChannelChild*>(aListener);
1586
0
            auto& container = mManagedPDataChannelChild;
1587
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1588
0
1589
0
            (container).RemoveEntry(actor);
1590
0
            DeallocPDataChannelChild(actor);
1591
0
            return;
1592
0
        }
1593
0
    case PSimpleChannelMsgStart:
1594
0
        {
1595
0
            PSimpleChannelChild* actor = static_cast<PSimpleChannelChild*>(aListener);
1596
0
            auto& container = mManagedPSimpleChannelChild;
1597
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1598
0
1599
0
            (container).RemoveEntry(actor);
1600
0
            DeallocPSimpleChannelChild(actor);
1601
0
            return;
1602
0
        }
1603
0
    case PFileChannelMsgStart:
1604
0
        {
1605
0
            PFileChannelChild* actor = static_cast<PFileChannelChild*>(aListener);
1606
0
            auto& container = mManagedPFileChannelChild;
1607
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1608
0
1609
0
            (container).RemoveEntry(actor);
1610
0
            DeallocPFileChannelChild(actor);
1611
0
            return;
1612
0
        }
1613
0
    case PChannelDiverterMsgStart:
1614
0
        {
1615
0
            PChannelDiverterChild* actor = static_cast<PChannelDiverterChild*>(aListener);
1616
0
            auto& container = mManagedPChannelDiverterChild;
1617
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1618
0
1619
0
            (container).RemoveEntry(actor);
1620
0
            DeallocPChannelDiverterChild(actor);
1621
0
            return;
1622
0
        }
1623
0
    case PTransportProviderMsgStart:
1624
0
        {
1625
0
            PTransportProviderChild* actor = static_cast<PTransportProviderChild*>(aListener);
1626
0
            auto& container = mManagedPTransportProviderChild;
1627
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1628
0
1629
0
            (container).RemoveEntry(actor);
1630
0
            DeallocPTransportProviderChild(actor);
1631
0
            return;
1632
0
        }
1633
0
    case PAltDataOutputStreamMsgStart:
1634
0
        {
1635
0
            PAltDataOutputStreamChild* actor = static_cast<PAltDataOutputStreamChild*>(aListener);
1636
0
            auto& container = mManagedPAltDataOutputStreamChild;
1637
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1638
0
1639
0
            (container).RemoveEntry(actor);
1640
0
            DeallocPAltDataOutputStreamChild(actor);
1641
0
            return;
1642
0
        }
1643
0
    case PStunAddrsRequestMsgStart:
1644
0
        {
1645
0
            PStunAddrsRequestChild* actor = static_cast<PStunAddrsRequestChild*>(aListener);
1646
0
            auto& container = mManagedPStunAddrsRequestChild;
1647
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
1648
0
1649
0
            (container).RemoveEntry(actor);
1650
0
            DeallocPStunAddrsRequestChild(actor);
1651
0
            return;
1652
0
        }
1653
0
    default:
1654
0
        {
1655
0
            FatalError("unreached");
1656
0
            return;
1657
0
        }
1658
0
    }
1659
0
}
1660
1661
auto PNeckoChild::OnMessageReceived(const Message& msg__) -> PNeckoChild::Result
1662
0
{
1663
0
    switch ((msg__).type()) {
1664
0
    case PNecko::Reply___delete____ID:
1665
0
        {
1666
0
            return MsgProcessed;
1667
0
        }
1668
0
    case PNecko::Reply_PCookieServiceConstructor__ID:
1669
0
        {
1670
0
            return MsgProcessed;
1671
0
        }
1672
0
    case PNecko::Reply_PHttpChannelConstructor__ID:
1673
0
        {
1674
0
            return MsgProcessed;
1675
0
        }
1676
0
    case PNecko::Reply_PWyciwygChannelConstructor__ID:
1677
0
        {
1678
0
            return MsgProcessed;
1679
0
        }
1680
0
    case PNecko::Reply_PFTPChannelConstructor__ID:
1681
0
        {
1682
0
            return MsgProcessed;
1683
0
        }
1684
0
    case PNecko::Reply_PWebSocketConstructor__ID:
1685
0
        {
1686
0
            return MsgProcessed;
1687
0
        }
1688
0
    case PNecko::Reply_PTCPServerSocketConstructor__ID:
1689
0
        {
1690
0
            return MsgProcessed;
1691
0
        }
1692
0
    case PNecko::Reply_PUDPSocketConstructor__ID:
1693
0
        {
1694
0
            return MsgProcessed;
1695
0
        }
1696
0
    case PNecko::Reply_PDNSRequestConstructor__ID:
1697
0
        {
1698
0
            return MsgProcessed;
1699
0
        }
1700
0
    case PNecko::Reply_PWebSocketEventListenerConstructor__ID:
1701
0
        {
1702
0
            return MsgProcessed;
1703
0
        }
1704
0
    case PNecko::Reply_PDataChannelConstructor__ID:
1705
0
        {
1706
0
            return MsgProcessed;
1707
0
        }
1708
0
    case PNecko::Reply_PSimpleChannelConstructor__ID:
1709
0
        {
1710
0
            return MsgProcessed;
1711
0
        }
1712
0
    case PNecko::Reply_PFileChannelConstructor__ID:
1713
0
        {
1714
0
            return MsgProcessed;
1715
0
        }
1716
0
    case PNecko::Reply_PChannelDiverterConstructor__ID:
1717
0
        {
1718
0
            return MsgProcessed;
1719
0
        }
1720
0
    case PNecko::Reply_PAltDataOutputStreamConstructor__ID:
1721
0
        {
1722
0
            return MsgProcessed;
1723
0
        }
1724
0
    case PNecko::Reply_PStunAddrsRequestConstructor__ID:
1725
0
        {
1726
0
            return MsgProcessed;
1727
0
        }
1728
0
    case PNecko::Reply_GetExtensionStream__ID:
1729
0
        {
1730
0
            if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1731
0
                mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1732
0
            }
1733
0
            AUTO_PROFILER_LABEL("PNecko::Msg_GetExtensionStream", OTHER);
1734
0
1735
0
            PickleIterator iter__(msg__);
1736
0
            bool resolve__;
1737
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(resolve__)))))) {
1738
0
                FatalError("Error deserializing 'resolve__'");
1739
0
                return MsgValueError;
1740
0
            }
1741
0
            // Sentinel = 'resolve__'
1742
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3997392463)))) {
1743
0
                mozilla::ipc::SentinelReadError("Error deserializing 'resolve__'");
1744
0
                return MsgValueError;
1745
0
            }
1746
0
1747
0
            UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback = (GetIPCChannel())->PopCallback(msg__);
1748
0
            MessageChannel::CallbackHolder<RefPtr<nsIInputStream>>* callback = static_cast<MessageChannel::CallbackHolder<RefPtr<nsIInputStream>>*>((untypedCallback).get());
1749
0
            if ((!(callback))) {
1750
0
                FatalError("Error unknown callback");
1751
0
                return MsgProcessingError;
1752
0
            }
1753
0
            if (resolve__) {
1754
0
                RefPtr<nsIInputStream> stream;
1755
0
1756
0
                if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(stream)))))) {
1757
0
                    FatalError("Error deserializing 'RefPtr'");
1758
0
                    return MsgValueError;
1759
0
                }
1760
0
                // Sentinel = 'stream'
1761
0
                if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4152748422)))) {
1762
0
                    mozilla::ipc::SentinelReadError("Error deserializing 'RefPtr'");
1763
0
                    return MsgValueError;
1764
0
                }
1765
0
                (msg__).EndRead(iter__, (msg__).type());
1766
0
                (callback)->Resolve(std::move(stream));
1767
0
            }
1768
0
            else {
1769
0
                ResponseRejectReason reason__;
1770
0
                if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(reason__)))))) {
1771
0
                    FatalError("Error deserializing 'reason__'");
1772
0
                    return MsgValueError;
1773
0
                }
1774
0
                // Sentinel = 'reason__'
1775
0
                if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 913452670)))) {
1776
0
                    mozilla::ipc::SentinelReadError("Error deserializing 'reason__'");
1777
0
                    return MsgValueError;
1778
0
                }
1779
0
                (msg__).EndRead(iter__, (msg__).type());
1780
0
                (callback)->Reject(reason__);
1781
0
            }
1782
0
            return MsgProcessed;
1783
0
        }
1784
0
    case PNecko::Reply_GetExtensionFD__ID:
1785
0
        {
1786
0
            if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1787
0
                mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1788
0
            }
1789
0
            AUTO_PROFILER_LABEL("PNecko::Msg_GetExtensionFD", OTHER);
1790
0
1791
0
            PickleIterator iter__(msg__);
1792
0
            bool resolve__;
1793
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(resolve__)))))) {
1794
0
                FatalError("Error deserializing 'resolve__'");
1795
0
                return MsgValueError;
1796
0
            }
1797
0
            // Sentinel = 'resolve__'
1798
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3997392463)))) {
1799
0
                mozilla::ipc::SentinelReadError("Error deserializing 'resolve__'");
1800
0
                return MsgValueError;
1801
0
            }
1802
0
1803
0
            UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback = (GetIPCChannel())->PopCallback(msg__);
1804
0
            MessageChannel::CallbackHolder<FileDescriptor>* callback = static_cast<MessageChannel::CallbackHolder<FileDescriptor>*>((untypedCallback).get());
1805
0
            if ((!(callback))) {
1806
0
                FatalError("Error unknown callback");
1807
0
                return MsgProcessingError;
1808
0
            }
1809
0
            if (resolve__) {
1810
0
                FileDescriptor fd;
1811
0
1812
0
                if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(fd)))))) {
1813
0
                    FatalError("Error deserializing 'FileDescriptor'");
1814
0
                    return MsgValueError;
1815
0
                }
1816
0
                // Sentinel = 'fd'
1817
0
                if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 628535764)))) {
1818
0
                    mozilla::ipc::SentinelReadError("Error deserializing 'FileDescriptor'");
1819
0
                    return MsgValueError;
1820
0
                }
1821
0
                (msg__).EndRead(iter__, (msg__).type());
1822
0
                (callback)->Resolve(std::move(fd));
1823
0
            }
1824
0
            else {
1825
0
                ResponseRejectReason reason__;
1826
0
                if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(reason__)))))) {
1827
0
                    FatalError("Error deserializing 'reason__'");
1828
0
                    return MsgValueError;
1829
0
                }
1830
0
                // Sentinel = 'reason__'
1831
0
                if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 913452670)))) {
1832
0
                    mozilla::ipc::SentinelReadError("Error deserializing 'reason__'");
1833
0
                    return MsgValueError;
1834
0
                }
1835
0
                (msg__).EndRead(iter__, (msg__).type());
1836
0
                (callback)->Reject(reason__);
1837
0
            }
1838
0
            return MsgProcessed;
1839
0
        }
1840
0
    case PNecko::Msg_AsyncAuthPromptForNestedFrame__ID:
1841
0
        {
1842
0
            if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1843
0
                mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1844
0
            }
1845
0
            AUTO_PROFILER_LABEL("PNecko::Msg_AsyncAuthPromptForNestedFrame", OTHER);
1846
0
1847
0
            PickleIterator iter__(msg__);
1848
0
            TabId nestedFrameId;
1849
0
            nsCString uri;
1850
0
            nsString realm;
1851
0
            uint64_t callbackId;
1852
0
1853
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(nestedFrameId)))))) {
1854
0
                FatalError("Error deserializing 'TabId'");
1855
0
                return MsgValueError;
1856
0
            }
1857
0
            // Sentinel = 'nestedFrameId'
1858
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 168911970)))) {
1859
0
                mozilla::ipc::SentinelReadError("Error deserializing 'TabId'");
1860
0
                return MsgValueError;
1861
0
            }
1862
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(uri)))))) {
1863
0
                FatalError("Error deserializing 'nsCString'");
1864
0
                return MsgValueError;
1865
0
            }
1866
0
            // Sentinel = 'uri'
1867
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1453210605)))) {
1868
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
1869
0
                return MsgValueError;
1870
0
            }
1871
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(realm)))))) {
1872
0
                FatalError("Error deserializing 'nsString'");
1873
0
                return MsgValueError;
1874
0
            }
1875
0
            // Sentinel = 'realm'
1876
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1127162788)))) {
1877
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
1878
0
                return MsgValueError;
1879
0
            }
1880
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(callbackId)))))) {
1881
0
                FatalError("Error deserializing 'uint64_t'");
1882
0
                return MsgValueError;
1883
0
            }
1884
0
            // Sentinel = 'callbackId'
1885
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4163989448)))) {
1886
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
1887
0
                return MsgValueError;
1888
0
            }
1889
0
            (msg__).EndRead(iter__, (msg__).type());
1890
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1891
0
                FatalError("Transition error");
1892
0
                return MsgValueError;
1893
0
            }
1894
0
            if ((!(RecvAsyncAuthPromptForNestedFrame(nestedFrameId, uri, realm, callbackId)))) {
1895
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1896
0
                // Error handled in mozilla::ipc::IPCResult
1897
0
                return MsgProcessingError;
1898
0
            }
1899
0
1900
0
            return MsgProcessed;
1901
0
        }
1902
0
    case PNecko::Msg_PredOnPredictPrefetch__ID:
1903
0
        {
1904
0
            if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1905
0
                mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1906
0
            }
1907
0
            AUTO_PROFILER_LABEL("PNecko::Msg_PredOnPredictPrefetch", OTHER);
1908
0
1909
0
            PickleIterator iter__(msg__);
1910
0
            URIParams uri;
1911
0
            uint32_t httpStatus;
1912
0
1913
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(uri)))))) {
1914
0
                FatalError("Error deserializing 'URIParams'");
1915
0
                return MsgValueError;
1916
0
            }
1917
0
            // Sentinel = 'uri'
1918
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1453210605)))) {
1919
0
                mozilla::ipc::SentinelReadError("Error deserializing 'URIParams'");
1920
0
                return MsgValueError;
1921
0
            }
1922
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(httpStatus)))))) {
1923
0
                FatalError("Error deserializing 'uint32_t'");
1924
0
                return MsgValueError;
1925
0
            }
1926
0
            // Sentinel = 'httpStatus'
1927
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2648726124)))) {
1928
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
1929
0
                return MsgValueError;
1930
0
            }
1931
0
            (msg__).EndRead(iter__, (msg__).type());
1932
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1933
0
                FatalError("Transition error");
1934
0
                return MsgValueError;
1935
0
            }
1936
0
            if ((!(RecvPredOnPredictPrefetch(uri, httpStatus)))) {
1937
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1938
0
                // Error handled in mozilla::ipc::IPCResult
1939
0
                return MsgProcessingError;
1940
0
            }
1941
0
1942
0
            return MsgProcessed;
1943
0
        }
1944
0
    case PNecko::Msg_PredOnPredictPreconnect__ID:
1945
0
        {
1946
0
            if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1947
0
                mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1948
0
            }
1949
0
            AUTO_PROFILER_LABEL("PNecko::Msg_PredOnPredictPreconnect", OTHER);
1950
0
1951
0
            PickleIterator iter__(msg__);
1952
0
            URIParams uri;
1953
0
1954
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(uri)))))) {
1955
0
                FatalError("Error deserializing 'URIParams'");
1956
0
                return MsgValueError;
1957
0
            }
1958
0
            // Sentinel = 'uri'
1959
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1453210605)))) {
1960
0
                mozilla::ipc::SentinelReadError("Error deserializing 'URIParams'");
1961
0
                return MsgValueError;
1962
0
            }
1963
0
            (msg__).EndRead(iter__, (msg__).type());
1964
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1965
0
                FatalError("Transition error");
1966
0
                return MsgValueError;
1967
0
            }
1968
0
            if ((!(RecvPredOnPredictPreconnect(uri)))) {
1969
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1970
0
                // Error handled in mozilla::ipc::IPCResult
1971
0
                return MsgProcessingError;
1972
0
            }
1973
0
1974
0
            return MsgProcessed;
1975
0
        }
1976
0
    case PNecko::Msg_PredOnPredictDNS__ID:
1977
0
        {
1978
0
            if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
1979
0
                mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1980
0
            }
1981
0
            AUTO_PROFILER_LABEL("PNecko::Msg_PredOnPredictDNS", OTHER);
1982
0
1983
0
            PickleIterator iter__(msg__);
1984
0
            URIParams uri;
1985
0
1986
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(uri)))))) {
1987
0
                FatalError("Error deserializing 'URIParams'");
1988
0
                return MsgValueError;
1989
0
            }
1990
0
            // Sentinel = 'uri'
1991
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1453210605)))) {
1992
0
                mozilla::ipc::SentinelReadError("Error deserializing 'URIParams'");
1993
0
                return MsgValueError;
1994
0
            }
1995
0
            (msg__).EndRead(iter__, (msg__).type());
1996
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1997
0
                FatalError("Transition error");
1998
0
                return MsgValueError;
1999
0
            }
2000
0
            if ((!(RecvPredOnPredictDNS(uri)))) {
2001
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
2002
0
                // Error handled in mozilla::ipc::IPCResult
2003
0
                return MsgProcessingError;
2004
0
            }
2005
0
2006
0
            return MsgProcessed;
2007
0
        }
2008
0
    case PNecko::Msg_SpeculativeConnectRequest__ID:
2009
0
        {
2010
0
            if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
2011
0
                mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
2012
0
            }
2013
0
            AUTO_PROFILER_LABEL("PNecko::Msg_SpeculativeConnectRequest", OTHER);
2014
0
2015
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
2016
0
                FatalError("Transition error");
2017
0
                return MsgValueError;
2018
0
            }
2019
0
            if ((!(RecvSpeculativeConnectRequest()))) {
2020
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
2021
0
                // Error handled in mozilla::ipc::IPCResult
2022
0
                return MsgProcessingError;
2023
0
            }
2024
0
2025
0
            return MsgProcessed;
2026
0
        }
2027
0
    case PNecko::Msg_NetworkChangeNotification__ID:
2028
0
        {
2029
0
            if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
2030
0
                mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
2031
0
            }
2032
0
            AUTO_PROFILER_LABEL("PNecko::Msg_NetworkChangeNotification", OTHER);
2033
0
2034
0
            PickleIterator iter__(msg__);
2035
0
            nsCString type;
2036
0
2037
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(type)))))) {
2038
0
                FatalError("Error deserializing 'nsCString'");
2039
0
                return MsgValueError;
2040
0
            }
2041
0
            // Sentinel = 'type'
2042
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2982068540)))) {
2043
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
2044
0
                return MsgValueError;
2045
0
            }
2046
0
            (msg__).EndRead(iter__, (msg__).type());
2047
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
2048
0
                FatalError("Transition error");
2049
0
                return MsgValueError;
2050
0
            }
2051
0
            if ((!(RecvNetworkChangeNotification(type)))) {
2052
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
2053
0
                // Error handled in mozilla::ipc::IPCResult
2054
0
                return MsgProcessingError;
2055
0
            }
2056
0
2057
0
            return MsgProcessed;
2058
0
        }
2059
0
    case PNecko::Msg_PTransportProviderConstructor__ID:
2060
0
        {
2061
0
            if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
2062
0
                mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
2063
0
            }
2064
0
            AUTO_PROFILER_LABEL("PNecko::Msg_PTransportProviderConstructor", OTHER);
2065
0
2066
0
            PickleIterator iter__(msg__);
2067
0
            ActorHandle handle__;
2068
0
            PTransportProviderChild* actor;
2069
0
2070
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) {
2071
0
                FatalError("Error deserializing 'ActorHandle'");
2072
0
                return MsgValueError;
2073
0
            }
2074
0
            // Sentinel = 'actor'
2075
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
2076
0
                mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'");
2077
0
                return MsgValueError;
2078
0
            }
2079
0
            (msg__).EndRead(iter__, (msg__).type());
2080
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
2081
0
                FatalError("Transition error");
2082
0
                return MsgValueError;
2083
0
            }
2084
0
            actor = AllocPTransportProviderChild();
2085
0
            if ((!(actor))) {
2086
0
                NS_WARNING("Error constructing actor PTransportProviderChild");
2087
0
                return MsgValueError;
2088
0
            }
2089
0
            (actor)->SetManagerAndRegister(this, (handle__).mId);
2090
0
            (mManagedPTransportProviderChild).PutEntry(actor);
2091
0
            (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
2092
0
2093
0
            if ((!(RecvPTransportProviderConstructor(actor)))) {
2094
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
2095
0
                // Error handled in mozilla::ipc::IPCResult
2096
0
                return MsgProcessingError;
2097
0
            }
2098
0
2099
0
            return MsgProcessed;
2100
0
        }
2101
0
    case PNecko::Msg_CrossProcessRedirect__ID:
2102
0
        {
2103
0
            if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
2104
0
                mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
2105
0
            }
2106
0
            AUTO_PROFILER_LABEL("PNecko::Msg_CrossProcessRedirect", OTHER);
2107
0
2108
0
            PickleIterator iter__(msg__);
2109
0
            uint32_t aRegistrarId;
2110
0
            RefPtr<nsIURI> aURI;
2111
0
            uint32_t aNewLoadFlags;
2112
0
            OptionalLoadInfoArgs aLoadInfo;
2113
0
            uint64_t aChannelId;
2114
0
            RefPtr<nsIURI> aOriginalURI;
2115
0
            uint64_t aIdentifier;
2116
0
2117
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aRegistrarId)))))) {
2118
0
                FatalError("Error deserializing 'uint32_t'");
2119
0
                return MsgValueError;
2120
0
            }
2121
0
            // Sentinel = 'aRegistrarId'
2122
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 147707153)))) {
2123
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
2124
0
                return MsgValueError;
2125
0
            }
2126
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aURI)))))) {
2127
0
                FatalError("Error deserializing 'RefPtr'");
2128
0
                return MsgValueError;
2129
0
            }
2130
0
            // Sentinel = 'aURI'
2131
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2075506333)))) {
2132
0
                mozilla::ipc::SentinelReadError("Error deserializing 'RefPtr'");
2133
0
                return MsgValueError;
2134
0
            }
2135
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aNewLoadFlags)))))) {
2136
0
                FatalError("Error deserializing 'uint32_t'");
2137
0
                return MsgValueError;
2138
0
            }
2139
0
            // Sentinel = 'aNewLoadFlags'
2140
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2417012963)))) {
2141
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
2142
0
                return MsgValueError;
2143
0
            }
2144
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aLoadInfo)))))) {
2145
0
                FatalError("Error deserializing 'OptionalLoadInfoArgs'");
2146
0
                return MsgValueError;
2147
0
            }
2148
0
            // Sentinel = 'aLoadInfo'
2149
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2922022260)))) {
2150
0
                mozilla::ipc::SentinelReadError("Error deserializing 'OptionalLoadInfoArgs'");
2151
0
                return MsgValueError;
2152
0
            }
2153
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aChannelId)))))) {
2154
0
                FatalError("Error deserializing 'uint64_t'");
2155
0
                return MsgValueError;
2156
0
            }
2157
0
            // Sentinel = 'aChannelId'
2158
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3807997239)))) {
2159
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
2160
0
                return MsgValueError;
2161
0
            }
2162
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aOriginalURI)))))) {
2163
0
                FatalError("Error deserializing 'RefPtr'");
2164
0
                return MsgValueError;
2165
0
            }
2166
0
            // Sentinel = 'aOriginalURI'
2167
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 680917642)))) {
2168
0
                mozilla::ipc::SentinelReadError("Error deserializing 'RefPtr'");
2169
0
                return MsgValueError;
2170
0
            }
2171
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aIdentifier)))))) {
2172
0
                FatalError("Error deserializing 'uint64_t'");
2173
0
                return MsgValueError;
2174
0
            }
2175
0
            // Sentinel = 'aIdentifier'
2176
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3975378435)))) {
2177
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
2178
0
                return MsgValueError;
2179
0
            }
2180
0
            (msg__).EndRead(iter__, (msg__).type());
2181
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
2182
0
                FatalError("Transition error");
2183
0
                return MsgValueError;
2184
0
            }
2185
0
            if ((!(RecvCrossProcessRedirect(aRegistrarId, aURI, aNewLoadFlags, aLoadInfo, aChannelId, aOriginalURI, aIdentifier)))) {
2186
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
2187
0
                // Error handled in mozilla::ipc::IPCResult
2188
0
                return MsgProcessingError;
2189
0
            }
2190
0
2191
0
            return MsgProcessed;
2192
0
        }
2193
0
    case PNecko::Reply_PTCPSocketConstructor__ID:
2194
0
        {
2195
0
            return MsgProcessed;
2196
0
        }
2197
0
    case PNecko::Msg_PTCPSocketConstructor__ID:
2198
0
        {
2199
0
            if (mozilla::ipc::LoggingEnabledFor("PNeckoChild")) {
2200
0
                mozilla::ipc::LogMessageForProtocol("PNeckoChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
2201
0
            }
2202
0
            AUTO_PROFILER_LABEL("PNecko::Msg_PTCPSocketConstructor", OTHER);
2203
0
2204
0
            PickleIterator iter__(msg__);
2205
0
            ActorHandle handle__;
2206
0
            PTCPSocketChild* actor;
2207
0
            nsString host;
2208
0
            uint16_t port;
2209
0
2210
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) {
2211
0
                FatalError("Error deserializing 'ActorHandle'");
2212
0
                return MsgValueError;
2213
0
            }
2214
0
            // Sentinel = 'actor'
2215
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
2216
0
                mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'");
2217
0
                return MsgValueError;
2218
0
            }
2219
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(host)))))) {
2220
0
                FatalError("Error deserializing 'nsString'");
2221
0
                return MsgValueError;
2222
0
            }
2223
0
            // Sentinel = 'host'
2224
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4070301394)))) {
2225
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
2226
0
                return MsgValueError;
2227
0
            }
2228
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(port)))))) {
2229
0
                FatalError("Error deserializing 'uint16_t'");
2230
0
                return MsgValueError;
2231
0
            }
2232
0
            // Sentinel = 'port'
2233
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3633211549)))) {
2234
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint16_t'");
2235
0
                return MsgValueError;
2236
0
            }
2237
0
            (msg__).EndRead(iter__, (msg__).type());
2238
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
2239
0
                FatalError("Transition error");
2240
0
                return MsgValueError;
2241
0
            }
2242
0
            actor = AllocPTCPSocketChild(host, port);
2243
0
            if ((!(actor))) {
2244
0
                NS_WARNING("Error constructing actor PTCPSocketChild");
2245
0
                return MsgValueError;
2246
0
            }
2247
0
            (actor)->SetManagerAndRegister(this, (handle__).mId);
2248
0
            (mManagedPTCPSocketChild).PutEntry(actor);
2249
0
            (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
2250
0
2251
0
            if ((!(RecvPTCPSocketConstructor(actor, host, port)))) {
2252
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
2253
0
                // Error handled in mozilla::ipc::IPCResult
2254
0
                return MsgProcessingError;
2255
0
            }
2256
0
2257
0
            return MsgProcessed;
2258
0
        }
2259
0
    default:
2260
0
        {
2261
0
            return MsgNotKnown;
2262
0
        }
2263
0
    }
2264
0
}
2265
2266
auto PNeckoChild::OnMessageReceived(
2267
        const Message& msg__,
2268
        Message*& reply__) -> PNeckoChild::Result
2269
0
{
2270
0
    return MsgNotKnown;
2271
0
}
2272
2273
auto PNeckoChild::OnCallReceived(
2274
        const Message& msg__,
2275
        Message*& reply__) -> PNeckoChild::Result
2276
0
{
2277
0
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
2278
0
    return MsgNotKnown;
2279
0
}
2280
2281
auto PNeckoChild::GetProtocolTypeId() -> int32_t
2282
0
{
2283
0
    return PNeckoMsgStart;
2284
0
}
2285
2286
auto PNeckoChild::DestroySubtree(ActorDestroyReason why) -> void
2287
0
{
2288
0
    // Unregister from our manager.
2289
0
    Unregister(Id());
2290
0
2291
0
    ActorDestroyReason subtreewhy = (((why) == (Deletion)) || ((why) == (FailedConstructor)) ? AncestorDeletion : why);
2292
0
2293
0
    {
2294
0
        // Recursively shutting down PHttpChannel kids
2295
0
        nsTArray<PHttpChannelChild*> kids;
2296
0
        // Accumulate kids into a stable structure to iterate over
2297
0
        ManagedPHttpChannelChild(kids);
2298
0
        for (auto& kid : kids) {
2299
0
            // Guarding against a child removing a sibling from the list during the iteration.
2300
0
            if ((mManagedPHttpChannelChild).Contains(kid)) {
2301
0
                (kid)->DestroySubtree(subtreewhy);
2302
0
            }
2303
0
        }
2304
0
    }
2305
0
    {
2306
0
        // Recursively shutting down PCookieService kids
2307
0
        nsTArray<PCookieServiceChild*> kids;
2308
0
        // Accumulate kids into a stable structure to iterate over
2309
0
        ManagedPCookieServiceChild(kids);
2310
0
        for (auto& kid : kids) {
2311
0
            // Guarding against a child removing a sibling from the list during the iteration.
2312
0
            if ((mManagedPCookieServiceChild).Contains(kid)) {
2313
0
                (kid)->DestroySubtree(subtreewhy);
2314
0
            }
2315
0
        }
2316
0
    }
2317
0
    {
2318
0
        // Recursively shutting down PWyciwygChannel kids
2319
0
        nsTArray<PWyciwygChannelChild*> kids;
2320
0
        // Accumulate kids into a stable structure to iterate over
2321
0
        ManagedPWyciwygChannelChild(kids);
2322
0
        for (auto& kid : kids) {
2323
0
            // Guarding against a child removing a sibling from the list during the iteration.
2324
0
            if ((mManagedPWyciwygChannelChild).Contains(kid)) {
2325
0
                (kid)->DestroySubtree(subtreewhy);
2326
0
            }
2327
0
        }
2328
0
    }
2329
0
    {
2330
0
        // Recursively shutting down PFTPChannel kids
2331
0
        nsTArray<PFTPChannelChild*> kids;
2332
0
        // Accumulate kids into a stable structure to iterate over
2333
0
        ManagedPFTPChannelChild(kids);
2334
0
        for (auto& kid : kids) {
2335
0
            // Guarding against a child removing a sibling from the list during the iteration.
2336
0
            if ((mManagedPFTPChannelChild).Contains(kid)) {
2337
0
                (kid)->DestroySubtree(subtreewhy);
2338
0
            }
2339
0
        }
2340
0
    }
2341
0
    {
2342
0
        // Recursively shutting down PWebSocket kids
2343
0
        nsTArray<PWebSocketChild*> kids;
2344
0
        // Accumulate kids into a stable structure to iterate over
2345
0
        ManagedPWebSocketChild(kids);
2346
0
        for (auto& kid : kids) {
2347
0
            // Guarding against a child removing a sibling from the list during the iteration.
2348
0
            if ((mManagedPWebSocketChild).Contains(kid)) {
2349
0
                (kid)->DestroySubtree(subtreewhy);
2350
0
            }
2351
0
        }
2352
0
    }
2353
0
    {
2354
0
        // Recursively shutting down PWebSocketEventListener kids
2355
0
        nsTArray<PWebSocketEventListenerChild*> kids;
2356
0
        // Accumulate kids into a stable structure to iterate over
2357
0
        ManagedPWebSocketEventListenerChild(kids);
2358
0
        for (auto& kid : kids) {
2359
0
            // Guarding against a child removing a sibling from the list during the iteration.
2360
0
            if ((mManagedPWebSocketEventListenerChild).Contains(kid)) {
2361
0
                (kid)->DestroySubtree(subtreewhy);
2362
0
            }
2363
0
        }
2364
0
    }
2365
0
    {
2366
0
        // Recursively shutting down PTCPSocket kids
2367
0
        nsTArray<PTCPSocketChild*> kids;
2368
0
        // Accumulate kids into a stable structure to iterate over
2369
0
        ManagedPTCPSocketChild(kids);
2370
0
        for (auto& kid : kids) {
2371
0
            // Guarding against a child removing a sibling from the list during the iteration.
2372
0
            if ((mManagedPTCPSocketChild).Contains(kid)) {
2373
0
                (kid)->DestroySubtree(subtreewhy);
2374
0
            }
2375
0
        }
2376
0
    }
2377
0
    {
2378
0
        // Recursively shutting down PTCPServerSocket kids
2379
0
        nsTArray<PTCPServerSocketChild*> kids;
2380
0
        // Accumulate kids into a stable structure to iterate over
2381
0
        ManagedPTCPServerSocketChild(kids);
2382
0
        for (auto& kid : kids) {
2383
0
            // Guarding against a child removing a sibling from the list during the iteration.
2384
0
            if ((mManagedPTCPServerSocketChild).Contains(kid)) {
2385
0
                (kid)->DestroySubtree(subtreewhy);
2386
0
            }
2387
0
        }
2388
0
    }
2389
0
    {
2390
0
        // Recursively shutting down PUDPSocket kids
2391
0
        nsTArray<PUDPSocketChild*> kids;
2392
0
        // Accumulate kids into a stable structure to iterate over
2393
0
        ManagedPUDPSocketChild(kids);
2394
0
        for (auto& kid : kids) {
2395
0
            // Guarding against a child removing a sibling from the list during the iteration.
2396
0
            if ((mManagedPUDPSocketChild).Contains(kid)) {
2397
0
                (kid)->DestroySubtree(subtreewhy);
2398
0
            }
2399
0
        }
2400
0
    }
2401
0
    {
2402
0
        // Recursively shutting down PDNSRequest kids
2403
0
        nsTArray<PDNSRequestChild*> kids;
2404
0
        // Accumulate kids into a stable structure to iterate over
2405
0
        ManagedPDNSRequestChild(kids);
2406
0
        for (auto& kid : kids) {
2407
0
            // Guarding against a child removing a sibling from the list during the iteration.
2408
0
            if ((mManagedPDNSRequestChild).Contains(kid)) {
2409
0
                (kid)->DestroySubtree(subtreewhy);
2410
0
            }
2411
0
        }
2412
0
    }
2413
0
    {
2414
0
        // Recursively shutting down PDataChannel kids
2415
0
        nsTArray<PDataChannelChild*> kids;
2416
0
        // Accumulate kids into a stable structure to iterate over
2417
0
        ManagedPDataChannelChild(kids);
2418
0
        for (auto& kid : kids) {
2419
0
            // Guarding against a child removing a sibling from the list during the iteration.
2420
0
            if ((mManagedPDataChannelChild).Contains(kid)) {
2421
0
                (kid)->DestroySubtree(subtreewhy);
2422
0
            }
2423
0
        }
2424
0
    }
2425
0
    {
2426
0
        // Recursively shutting down PSimpleChannel kids
2427
0
        nsTArray<PSimpleChannelChild*> kids;
2428
0
        // Accumulate kids into a stable structure to iterate over
2429
0
        ManagedPSimpleChannelChild(kids);
2430
0
        for (auto& kid : kids) {
2431
0
            // Guarding against a child removing a sibling from the list during the iteration.
2432
0
            if ((mManagedPSimpleChannelChild).Contains(kid)) {
2433
0
                (kid)->DestroySubtree(subtreewhy);
2434
0
            }
2435
0
        }
2436
0
    }
2437
0
    {
2438
0
        // Recursively shutting down PFileChannel kids
2439
0
        nsTArray<PFileChannelChild*> kids;
2440
0
        // Accumulate kids into a stable structure to iterate over
2441
0
        ManagedPFileChannelChild(kids);
2442
0
        for (auto& kid : kids) {
2443
0
            // Guarding against a child removing a sibling from the list during the iteration.
2444
0
            if ((mManagedPFileChannelChild).Contains(kid)) {
2445
0
                (kid)->DestroySubtree(subtreewhy);
2446
0
            }
2447
0
        }
2448
0
    }
2449
0
    {
2450
0
        // Recursively shutting down PChannelDiverter kids
2451
0
        nsTArray<PChannelDiverterChild*> kids;
2452
0
        // Accumulate kids into a stable structure to iterate over
2453
0
        ManagedPChannelDiverterChild(kids);
2454
0
        for (auto& kid : kids) {
2455
0
            // Guarding against a child removing a sibling from the list during the iteration.
2456
0
            if ((mManagedPChannelDiverterChild).Contains(kid)) {
2457
0
                (kid)->DestroySubtree(subtreewhy);
2458
0
            }
2459
0
        }
2460
0
    }
2461
0
    {
2462
0
        // Recursively shutting down PTransportProvider kids
2463
0
        nsTArray<PTransportProviderChild*> kids;
2464
0
        // Accumulate kids into a stable structure to iterate over
2465
0
        ManagedPTransportProviderChild(kids);
2466
0
        for (auto& kid : kids) {
2467
0
            // Guarding against a child removing a sibling from the list during the iteration.
2468
0
            if ((mManagedPTransportProviderChild).Contains(kid)) {
2469
0
                (kid)->DestroySubtree(subtreewhy);
2470
0
            }
2471
0
        }
2472
0
    }
2473
0
    {
2474
0
        // Recursively shutting down PAltDataOutputStream kids
2475
0
        nsTArray<PAltDataOutputStreamChild*> kids;
2476
0
        // Accumulate kids into a stable structure to iterate over
2477
0
        ManagedPAltDataOutputStreamChild(kids);
2478
0
        for (auto& kid : kids) {
2479
0
            // Guarding against a child removing a sibling from the list during the iteration.
2480
0
            if ((mManagedPAltDataOutputStreamChild).Contains(kid)) {
2481
0
                (kid)->DestroySubtree(subtreewhy);
2482
0
            }
2483
0
        }
2484
0
    }
2485
0
    {
2486
0
        // Recursively shutting down PStunAddrsRequest kids
2487
0
        nsTArray<PStunAddrsRequestChild*> kids;
2488
0
        // Accumulate kids into a stable structure to iterate over
2489
0
        ManagedPStunAddrsRequestChild(kids);
2490
0
        for (auto& kid : kids) {
2491
0
            // Guarding against a child removing a sibling from the list during the iteration.
2492
0
            if ((mManagedPStunAddrsRequestChild).Contains(kid)) {
2493
0
                (kid)->DestroySubtree(subtreewhy);
2494
0
            }
2495
0
        }
2496
0
    }
2497
0
2498
0
    // Reject owning pending responses.
2499
0
    (GetIPCChannel())->RejectPendingResponsesForActor(this);
2500
0
2501
0
    // Finally, destroy "us".
2502
0
    ActorDestroy(why);
2503
0
}
2504
2505
auto PNeckoChild::DeallocSubtree() -> void
2506
0
{
2507
0
    {
2508
0
        // Recursively deleting PHttpChannel kids
2509
0
        for (auto iter = (mManagedPHttpChannelChild).Iter(); (!((iter).Done())); (iter).Next()) {
2510
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2511
0
        }
2512
0
2513
0
        for (auto iter = (mManagedPHttpChannelChild).Iter(); (!((iter).Done())); (iter).Next()) {
2514
0
            DeallocPHttpChannelChild(((iter).Get())->GetKey());
2515
0
        }
2516
0
        (mManagedPHttpChannelChild).Clear();
2517
0
    }
2518
0
    {
2519
0
        // Recursively deleting PCookieService kids
2520
0
        for (auto iter = (mManagedPCookieServiceChild).Iter(); (!((iter).Done())); (iter).Next()) {
2521
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2522
0
        }
2523
0
2524
0
        for (auto iter = (mManagedPCookieServiceChild).Iter(); (!((iter).Done())); (iter).Next()) {
2525
0
            DeallocPCookieServiceChild(((iter).Get())->GetKey());
2526
0
        }
2527
0
        (mManagedPCookieServiceChild).Clear();
2528
0
    }
2529
0
    {
2530
0
        // Recursively deleting PWyciwygChannel kids
2531
0
        for (auto iter = (mManagedPWyciwygChannelChild).Iter(); (!((iter).Done())); (iter).Next()) {
2532
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2533
0
        }
2534
0
2535
0
        for (auto iter = (mManagedPWyciwygChannelChild).Iter(); (!((iter).Done())); (iter).Next()) {
2536
0
            DeallocPWyciwygChannelChild(((iter).Get())->GetKey());
2537
0
        }
2538
0
        (mManagedPWyciwygChannelChild).Clear();
2539
0
    }
2540
0
    {
2541
0
        // Recursively deleting PFTPChannel kids
2542
0
        for (auto iter = (mManagedPFTPChannelChild).Iter(); (!((iter).Done())); (iter).Next()) {
2543
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2544
0
        }
2545
0
2546
0
        for (auto iter = (mManagedPFTPChannelChild).Iter(); (!((iter).Done())); (iter).Next()) {
2547
0
            DeallocPFTPChannelChild(((iter).Get())->GetKey());
2548
0
        }
2549
0
        (mManagedPFTPChannelChild).Clear();
2550
0
    }
2551
0
    {
2552
0
        // Recursively deleting PWebSocket kids
2553
0
        for (auto iter = (mManagedPWebSocketChild).Iter(); (!((iter).Done())); (iter).Next()) {
2554
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2555
0
        }
2556
0
2557
0
        for (auto iter = (mManagedPWebSocketChild).Iter(); (!((iter).Done())); (iter).Next()) {
2558
0
            DeallocPWebSocketChild(((iter).Get())->GetKey());
2559
0
        }
2560
0
        (mManagedPWebSocketChild).Clear();
2561
0
    }
2562
0
    {
2563
0
        // Recursively deleting PWebSocketEventListener kids
2564
0
        for (auto iter = (mManagedPWebSocketEventListenerChild).Iter(); (!((iter).Done())); (iter).Next()) {
2565
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2566
0
        }
2567
0
2568
0
        for (auto iter = (mManagedPWebSocketEventListenerChild).Iter(); (!((iter).Done())); (iter).Next()) {
2569
0
            DeallocPWebSocketEventListenerChild(((iter).Get())->GetKey());
2570
0
        }
2571
0
        (mManagedPWebSocketEventListenerChild).Clear();
2572
0
    }
2573
0
    {
2574
0
        // Recursively deleting PTCPSocket kids
2575
0
        for (auto iter = (mManagedPTCPSocketChild).Iter(); (!((iter).Done())); (iter).Next()) {
2576
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2577
0
        }
2578
0
2579
0
        for (auto iter = (mManagedPTCPSocketChild).Iter(); (!((iter).Done())); (iter).Next()) {
2580
0
            DeallocPTCPSocketChild(((iter).Get())->GetKey());
2581
0
        }
2582
0
        (mManagedPTCPSocketChild).Clear();
2583
0
    }
2584
0
    {
2585
0
        // Recursively deleting PTCPServerSocket kids
2586
0
        for (auto iter = (mManagedPTCPServerSocketChild).Iter(); (!((iter).Done())); (iter).Next()) {
2587
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2588
0
        }
2589
0
2590
0
        for (auto iter = (mManagedPTCPServerSocketChild).Iter(); (!((iter).Done())); (iter).Next()) {
2591
0
            DeallocPTCPServerSocketChild(((iter).Get())->GetKey());
2592
0
        }
2593
0
        (mManagedPTCPServerSocketChild).Clear();
2594
0
    }
2595
0
    {
2596
0
        // Recursively deleting PUDPSocket kids
2597
0
        for (auto iter = (mManagedPUDPSocketChild).Iter(); (!((iter).Done())); (iter).Next()) {
2598
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2599
0
        }
2600
0
2601
0
        for (auto iter = (mManagedPUDPSocketChild).Iter(); (!((iter).Done())); (iter).Next()) {
2602
0
            DeallocPUDPSocketChild(((iter).Get())->GetKey());
2603
0
        }
2604
0
        (mManagedPUDPSocketChild).Clear();
2605
0
    }
2606
0
    {
2607
0
        // Recursively deleting PDNSRequest kids
2608
0
        for (auto iter = (mManagedPDNSRequestChild).Iter(); (!((iter).Done())); (iter).Next()) {
2609
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2610
0
        }
2611
0
2612
0
        for (auto iter = (mManagedPDNSRequestChild).Iter(); (!((iter).Done())); (iter).Next()) {
2613
0
            DeallocPDNSRequestChild(((iter).Get())->GetKey());
2614
0
        }
2615
0
        (mManagedPDNSRequestChild).Clear();
2616
0
    }
2617
0
    {
2618
0
        // Recursively deleting PDataChannel kids
2619
0
        for (auto iter = (mManagedPDataChannelChild).Iter(); (!((iter).Done())); (iter).Next()) {
2620
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2621
0
        }
2622
0
2623
0
        for (auto iter = (mManagedPDataChannelChild).Iter(); (!((iter).Done())); (iter).Next()) {
2624
0
            DeallocPDataChannelChild(((iter).Get())->GetKey());
2625
0
        }
2626
0
        (mManagedPDataChannelChild).Clear();
2627
0
    }
2628
0
    {
2629
0
        // Recursively deleting PSimpleChannel kids
2630
0
        for (auto iter = (mManagedPSimpleChannelChild).Iter(); (!((iter).Done())); (iter).Next()) {
2631
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2632
0
        }
2633
0
2634
0
        for (auto iter = (mManagedPSimpleChannelChild).Iter(); (!((iter).Done())); (iter).Next()) {
2635
0
            DeallocPSimpleChannelChild(((iter).Get())->GetKey());
2636
0
        }
2637
0
        (mManagedPSimpleChannelChild).Clear();
2638
0
    }
2639
0
    {
2640
0
        // Recursively deleting PFileChannel kids
2641
0
        for (auto iter = (mManagedPFileChannelChild).Iter(); (!((iter).Done())); (iter).Next()) {
2642
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2643
0
        }
2644
0
2645
0
        for (auto iter = (mManagedPFileChannelChild).Iter(); (!((iter).Done())); (iter).Next()) {
2646
0
            DeallocPFileChannelChild(((iter).Get())->GetKey());
2647
0
        }
2648
0
        (mManagedPFileChannelChild).Clear();
2649
0
    }
2650
0
    {
2651
0
        // Recursively deleting PChannelDiverter kids
2652
0
        for (auto iter = (mManagedPChannelDiverterChild).Iter(); (!((iter).Done())); (iter).Next()) {
2653
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2654
0
        }
2655
0
2656
0
        for (auto iter = (mManagedPChannelDiverterChild).Iter(); (!((iter).Done())); (iter).Next()) {
2657
0
            DeallocPChannelDiverterChild(((iter).Get())->GetKey());
2658
0
        }
2659
0
        (mManagedPChannelDiverterChild).Clear();
2660
0
    }
2661
0
    {
2662
0
        // Recursively deleting PTransportProvider kids
2663
0
        for (auto iter = (mManagedPTransportProviderChild).Iter(); (!((iter).Done())); (iter).Next()) {
2664
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2665
0
        }
2666
0
2667
0
        for (auto iter = (mManagedPTransportProviderChild).Iter(); (!((iter).Done())); (iter).Next()) {
2668
0
            DeallocPTransportProviderChild(((iter).Get())->GetKey());
2669
0
        }
2670
0
        (mManagedPTransportProviderChild).Clear();
2671
0
    }
2672
0
    {
2673
0
        // Recursively deleting PAltDataOutputStream kids
2674
0
        for (auto iter = (mManagedPAltDataOutputStreamChild).Iter(); (!((iter).Done())); (iter).Next()) {
2675
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2676
0
        }
2677
0
2678
0
        for (auto iter = (mManagedPAltDataOutputStreamChild).Iter(); (!((iter).Done())); (iter).Next()) {
2679
0
            DeallocPAltDataOutputStreamChild(((iter).Get())->GetKey());
2680
0
        }
2681
0
        (mManagedPAltDataOutputStreamChild).Clear();
2682
0
    }
2683
0
    {
2684
0
        // Recursively deleting PStunAddrsRequest kids
2685
0
        for (auto iter = (mManagedPStunAddrsRequestChild).Iter(); (!((iter).Done())); (iter).Next()) {
2686
0
            (((iter).Get())->GetKey())->DeallocSubtree();
2687
0
        }
2688
0
2689
0
        for (auto iter = (mManagedPStunAddrsRequestChild).Iter(); (!((iter).Done())); (iter).Next()) {
2690
0
            DeallocPStunAddrsRequestChild(((iter).Get())->GetKey());
2691
0
        }
2692
0
        (mManagedPStunAddrsRequestChild).Clear();
2693
0
    }
2694
0
}
2695
2696
2697
2698
} // namespace net
2699
} // namespace mozilla
2700
namespace mozilla {
2701
namespace ipc {
2702
auto IPDLParamTraits<mozilla::net::PNeckoChild>::Write(
2703
        IPC::Message* aMsg,
2704
        mozilla::ipc::IProtocol* aActor,
2705
        const paramType& aVar) -> void
2706
0
{
2707
0
    int32_t id;
2708
0
    if ((!(aVar))) {
2709
0
        id = 0;
2710
0
    }
2711
0
    else {
2712
0
        id = (aVar)->Id();
2713
0
        if ((1) == (id)) {
2714
0
            (aActor)->FatalError("actor has been |delete|d");
2715
0
        }
2716
0
    }
2717
0
    WriteIPDLParam(aMsg, aActor, id);
2718
0
}
2719
2720
auto IPDLParamTraits<mozilla::net::PNeckoChild>::Read(
2721
        const IPC::Message* aMsg,
2722
        PickleIterator* aIter,
2723
        mozilla::ipc::IProtocol* aActor,
2724
        paramType* aVar) -> bool
2725
0
{
2726
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PNecko", PNeckoMsgStart);
2727
0
    if ((actor).isNothing()) {
2728
0
        return false;
2729
0
    }
2730
0
2731
0
    (*(aVar)) = static_cast<mozilla::net::PNeckoChild*>((actor).value());
2732
0
    return true;
2733
0
}
2734
2735
} // namespace ipc
2736
} // namespace mozilla