Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PUDPSocketParent.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/PUDPSocketParent.h"
8
#include "ipc/IPCMessageUtils.h"
9
10
#include "mozilla/net/PNeckoParent.h"
11
#include "mozilla/ipc/PBackgroundParent.h"
12
#include "mozilla/ipc/PFileDescriptorSetParent.h"
13
#include "mozilla/ipc/PChildToParentStreamParent.h"
14
#include "mozilla/ipc/PParentToChildStreamParent.h"
15
16
#include "nsIFile.h"
17
#include "GeckoProfiler.h"
18
19
namespace mozilla {
20
namespace net {
21
22
23
auto PUDPSocketParent::ActorDestroy(ActorDestroyReason aWhy) -> void
24
0
{
25
0
}
26
27
MOZ_IMPLICIT PUDPSocketParent::PUDPSocketParent() :
28
    mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
29
    mLivenessState(mozilla::ipc::LivenessState::Dead)
30
0
{
31
0
    MOZ_COUNT_CTOR(PUDPSocketParent);
32
0
}
33
34
PUDPSocketParent::~PUDPSocketParent()
35
0
{
36
0
    MOZ_COUNT_DTOR(PUDPSocketParent);
37
0
}
38
39
auto PUDPSocketParent::SendCallbackOpened(const UDPAddressInfo& addressInfo) -> bool
40
0
{
41
0
    IPC::Message* msg__ = PUDPSocket::Msg_CallbackOpened(Id());
42
0
43
0
    WriteIPDLParam(msg__, this, addressInfo);
44
0
    // Sentinel = 'addressInfo'
45
0
    (msg__)->WriteSentinel(120478815);
46
0
47
0
48
0
49
0
50
0
    if (mozilla::ipc::LoggingEnabledFor("PUDPSocketParent")) {
51
0
        mozilla::ipc::LogMessageForProtocol("PUDPSocketParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
52
0
    }
53
0
    AUTO_PROFILER_LABEL("PUDPSocket::Msg_CallbackOpened", OTHER);
54
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
55
0
        mozilla::ipc::LogicError("Transition error");
56
0
    }
57
0
58
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
59
0
    return sendok__;
60
0
}
61
62
auto PUDPSocketParent::SendCallbackConnected(const UDPAddressInfo& addressInfo) -> bool
63
0
{
64
0
    IPC::Message* msg__ = PUDPSocket::Msg_CallbackConnected(Id());
65
0
66
0
    WriteIPDLParam(msg__, this, addressInfo);
67
0
    // Sentinel = 'addressInfo'
68
0
    (msg__)->WriteSentinel(120478815);
69
0
70
0
71
0
72
0
73
0
    if (mozilla::ipc::LoggingEnabledFor("PUDPSocketParent")) {
74
0
        mozilla::ipc::LogMessageForProtocol("PUDPSocketParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
75
0
    }
76
0
    AUTO_PROFILER_LABEL("PUDPSocket::Msg_CallbackConnected", OTHER);
77
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
78
0
        mozilla::ipc::LogicError("Transition error");
79
0
    }
80
0
81
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
82
0
    return sendok__;
83
0
}
84
85
auto PUDPSocketParent::SendCallbackClosed() -> bool
86
0
{
87
0
    IPC::Message* msg__ = PUDPSocket::Msg_CallbackClosed(Id());
88
0
89
0
90
0
91
0
92
0
93
0
    if (mozilla::ipc::LoggingEnabledFor("PUDPSocketParent")) {
94
0
        mozilla::ipc::LogMessageForProtocol("PUDPSocketParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
95
0
    }
96
0
    AUTO_PROFILER_LABEL("PUDPSocket::Msg_CallbackClosed", OTHER);
97
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
98
0
        mozilla::ipc::LogicError("Transition error");
99
0
    }
100
0
101
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
102
0
    return sendok__;
103
0
}
104
105
auto PUDPSocketParent::SendCallbackReceivedData(
106
        const UDPAddressInfo& addressInfo,
107
        const nsTArray<uint8_t>& data) -> bool
108
0
{
109
0
    IPC::Message* msg__ = PUDPSocket::Msg_CallbackReceivedData(Id());
110
0
111
0
    WriteIPDLParam(msg__, this, addressInfo);
112
0
    // Sentinel = 'addressInfo'
113
0
    (msg__)->WriteSentinel(120478815);
114
0
    WriteIPDLParam(msg__, this, data);
115
0
    // Sentinel = 'data'
116
0
    (msg__)->WriteSentinel(843352540);
117
0
118
0
119
0
120
0
121
0
    if (mozilla::ipc::LoggingEnabledFor("PUDPSocketParent")) {
122
0
        mozilla::ipc::LogMessageForProtocol("PUDPSocketParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
123
0
    }
124
0
    AUTO_PROFILER_LABEL("PUDPSocket::Msg_CallbackReceivedData", OTHER);
125
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
126
0
        mozilla::ipc::LogicError("Transition error");
127
0
    }
128
0
129
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
130
0
    return sendok__;
131
0
}
132
133
auto PUDPSocketParent::SendCallbackError(
134
        const nsCString& message,
135
        const nsCString& filename,
136
        const uint32_t& lineNumber) -> bool
137
0
{
138
0
    IPC::Message* msg__ = PUDPSocket::Msg_CallbackError(Id());
139
0
140
0
    WriteIPDLParam(msg__, this, message);
141
0
    // Sentinel = 'message'
142
0
    (msg__)->WriteSentinel(1366108954);
143
0
    WriteIPDLParam(msg__, this, filename);
144
0
    // Sentinel = 'filename'
145
0
    (msg__)->WriteSentinel(1198638255);
146
0
    WriteIPDLParam(msg__, this, lineNumber);
147
0
    // Sentinel = 'lineNumber'
148
0
    (msg__)->WriteSentinel(1005376855);
149
0
150
0
151
0
152
0
153
0
    if (mozilla::ipc::LoggingEnabledFor("PUDPSocketParent")) {
154
0
        mozilla::ipc::LogMessageForProtocol("PUDPSocketParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
155
0
    }
156
0
    AUTO_PROFILER_LABEL("PUDPSocket::Msg_CallbackError", OTHER);
157
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
158
0
        mozilla::ipc::LogicError("Transition error");
159
0
    }
160
0
161
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
162
0
    return sendok__;
163
0
}
164
165
auto PUDPSocketParent::Send__delete__(PUDPSocketParent* actor) -> bool
166
0
{
167
0
    if ((!(actor))) {
168
0
        return false;
169
0
    }
170
0
171
0
    IPC::Message* msg__ = PUDPSocket::Msg___delete__((actor)->Id());
172
0
173
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
174
0
    WriteIPDLParam(msg__, actor, actor);
175
0
    // Sentinel = 'actor'
176
0
    (msg__)->WriteSentinel(875202478);
177
0
178
0
179
0
180
0
    if (mozilla::ipc::LoggingEnabledFor("PUDPSocketParent")) {
181
0
        mozilla::ipc::LogMessageForProtocol("PUDPSocketParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
182
0
    }
183
0
    AUTO_PROFILER_LABEL("PUDPSocket::Msg___delete__", OTHER);
184
0
    if ((!(StateTransition(true, (&((actor)->mLivenessState)))))) {
185
0
        mozilla::ipc::LogicError("Transition error");
186
0
    }
187
0
188
0
    bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
189
0
190
0
    IProtocol* mgr = (actor)->Manager();
191
0
    (actor)->DestroySubtree(Deletion);
192
0
    (actor)->DeallocSubtree();
193
0
    (mgr)->RemoveManagee(PUDPSocketMsgStart, actor);
194
0
    return sendok__;
195
0
}
196
197
auto PUDPSocketParent::RemoveManagee(
198
        int32_t aProtocolId,
199
        IProtocol* aListener) -> void
200
0
{
201
0
    FatalError("unreached");
202
0
    return;
203
0
}
204
205
auto PUDPSocketParent::OnMessageReceived(const Message& msg__) -> PUDPSocketParent::Result
206
0
{
207
0
    switch ((msg__).type()) {
208
0
    case PUDPSocket::Msg_Bind__ID:
209
0
        {
210
0
            if (mozilla::ipc::LoggingEnabledFor("PUDPSocketParent")) {
211
0
                mozilla::ipc::LogMessageForProtocol("PUDPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
212
0
            }
213
0
            AUTO_PROFILER_LABEL("PUDPSocket::Msg_Bind", OTHER);
214
0
215
0
            PickleIterator iter__(msg__);
216
0
            UDPAddressInfo addressInfo;
217
0
            bool addressReuse;
218
0
            bool loopback;
219
0
            uint32_t recvBufferSize;
220
0
            uint32_t sendBufferSize;
221
0
222
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(addressInfo)))))) {
223
0
                FatalError("Error deserializing 'UDPAddressInfo'");
224
0
                return MsgValueError;
225
0
            }
226
0
            // Sentinel = 'addressInfo'
227
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 120478815)))) {
228
0
                mozilla::ipc::SentinelReadError("Error deserializing 'UDPAddressInfo'");
229
0
                return MsgValueError;
230
0
            }
231
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(addressReuse)))))) {
232
0
                FatalError("Error deserializing 'bool'");
233
0
                return MsgValueError;
234
0
            }
235
0
            // Sentinel = 'addressReuse'
236
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1196020092)))) {
237
0
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
238
0
                return MsgValueError;
239
0
            }
240
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(loopback)))))) {
241
0
                FatalError("Error deserializing 'bool'");
242
0
                return MsgValueError;
243
0
            }
244
0
            // Sentinel = 'loopback'
245
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3759795879)))) {
246
0
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
247
0
                return MsgValueError;
248
0
            }
249
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(recvBufferSize)))))) {
250
0
                FatalError("Error deserializing 'uint32_t'");
251
0
                return MsgValueError;
252
0
            }
253
0
            // Sentinel = 'recvBufferSize'
254
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1394780231)))) {
255
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
256
0
                return MsgValueError;
257
0
            }
258
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(sendBufferSize)))))) {
259
0
                FatalError("Error deserializing 'uint32_t'");
260
0
                return MsgValueError;
261
0
            }
262
0
            // Sentinel = 'sendBufferSize'
263
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1728596941)))) {
264
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
265
0
                return MsgValueError;
266
0
            }
267
0
            (msg__).EndRead(iter__, (msg__).type());
268
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
269
0
                FatalError("Transition error");
270
0
                return MsgValueError;
271
0
            }
272
0
            if ((!(RecvBind(addressInfo, addressReuse, loopback, recvBufferSize, sendBufferSize)))) {
273
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
274
0
                // Error handled in mozilla::ipc::IPCResult
275
0
                return MsgProcessingError;
276
0
            }
277
0
278
0
            return MsgProcessed;
279
0
        }
280
0
    case PUDPSocket::Msg_Connect__ID:
281
0
        {
282
0
            if (mozilla::ipc::LoggingEnabledFor("PUDPSocketParent")) {
283
0
                mozilla::ipc::LogMessageForProtocol("PUDPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
284
0
            }
285
0
            AUTO_PROFILER_LABEL("PUDPSocket::Msg_Connect", OTHER);
286
0
287
0
            PickleIterator iter__(msg__);
288
0
            UDPAddressInfo addressInfo;
289
0
290
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(addressInfo)))))) {
291
0
                FatalError("Error deserializing 'UDPAddressInfo'");
292
0
                return MsgValueError;
293
0
            }
294
0
            // Sentinel = 'addressInfo'
295
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 120478815)))) {
296
0
                mozilla::ipc::SentinelReadError("Error deserializing 'UDPAddressInfo'");
297
0
                return MsgValueError;
298
0
            }
299
0
            (msg__).EndRead(iter__, (msg__).type());
300
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
301
0
                FatalError("Transition error");
302
0
                return MsgValueError;
303
0
            }
304
0
            if ((!(RecvConnect(addressInfo)))) {
305
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
306
0
                // Error handled in mozilla::ipc::IPCResult
307
0
                return MsgProcessingError;
308
0
            }
309
0
310
0
            return MsgProcessed;
311
0
        }
312
0
    case PUDPSocket::Msg_OutgoingData__ID:
313
0
        {
314
0
            if (mozilla::ipc::LoggingEnabledFor("PUDPSocketParent")) {
315
0
                mozilla::ipc::LogMessageForProtocol("PUDPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
316
0
            }
317
0
            AUTO_PROFILER_LABEL("PUDPSocket::Msg_OutgoingData", OTHER);
318
0
319
0
            PickleIterator iter__(msg__);
320
0
            UDPData data;
321
0
            UDPSocketAddr addr;
322
0
323
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(data)))))) {
324
0
                FatalError("Error deserializing 'UDPData'");
325
0
                return MsgValueError;
326
0
            }
327
0
            // Sentinel = 'data'
328
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 843352540)))) {
329
0
                mozilla::ipc::SentinelReadError("Error deserializing 'UDPData'");
330
0
                return MsgValueError;
331
0
            }
332
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(addr)))))) {
333
0
                FatalError("Error deserializing 'UDPSocketAddr'");
334
0
                return MsgValueError;
335
0
            }
336
0
            // Sentinel = 'addr'
337
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1506625701)))) {
338
0
                mozilla::ipc::SentinelReadError("Error deserializing 'UDPSocketAddr'");
339
0
                return MsgValueError;
340
0
            }
341
0
            (msg__).EndRead(iter__, (msg__).type());
342
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
343
0
                FatalError("Transition error");
344
0
                return MsgValueError;
345
0
            }
346
0
            if ((!(RecvOutgoingData(data, addr)))) {
347
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
348
0
                // Error handled in mozilla::ipc::IPCResult
349
0
                return MsgProcessingError;
350
0
            }
351
0
352
0
            return MsgProcessed;
353
0
        }
354
0
    case PUDPSocket::Msg_JoinMulticast__ID:
355
0
        {
356
0
            if (mozilla::ipc::LoggingEnabledFor("PUDPSocketParent")) {
357
0
                mozilla::ipc::LogMessageForProtocol("PUDPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
358
0
            }
359
0
            AUTO_PROFILER_LABEL("PUDPSocket::Msg_JoinMulticast", OTHER);
360
0
361
0
            PickleIterator iter__(msg__);
362
0
            nsCString multicastAddress;
363
0
            nsCString iface;
364
0
365
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(multicastAddress)))))) {
366
0
                FatalError("Error deserializing 'nsCString'");
367
0
                return MsgValueError;
368
0
            }
369
0
            // Sentinel = 'multicastAddress'
370
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1375995778)))) {
371
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
372
0
                return MsgValueError;
373
0
            }
374
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(iface)))))) {
375
0
                FatalError("Error deserializing 'nsCString'");
376
0
                return MsgValueError;
377
0
            }
378
0
            // Sentinel = 'iface'
379
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3356902307)))) {
380
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
381
0
                return MsgValueError;
382
0
            }
383
0
            (msg__).EndRead(iter__, (msg__).type());
384
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
385
0
                FatalError("Transition error");
386
0
                return MsgValueError;
387
0
            }
388
0
            if ((!(RecvJoinMulticast(multicastAddress, iface)))) {
389
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
390
0
                // Error handled in mozilla::ipc::IPCResult
391
0
                return MsgProcessingError;
392
0
            }
393
0
394
0
            return MsgProcessed;
395
0
        }
396
0
    case PUDPSocket::Msg_LeaveMulticast__ID:
397
0
        {
398
0
            if (mozilla::ipc::LoggingEnabledFor("PUDPSocketParent")) {
399
0
                mozilla::ipc::LogMessageForProtocol("PUDPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
400
0
            }
401
0
            AUTO_PROFILER_LABEL("PUDPSocket::Msg_LeaveMulticast", OTHER);
402
0
403
0
            PickleIterator iter__(msg__);
404
0
            nsCString multicastAddress;
405
0
            nsCString iface;
406
0
407
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(multicastAddress)))))) {
408
0
                FatalError("Error deserializing 'nsCString'");
409
0
                return MsgValueError;
410
0
            }
411
0
            // Sentinel = 'multicastAddress'
412
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1375995778)))) {
413
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
414
0
                return MsgValueError;
415
0
            }
416
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(iface)))))) {
417
0
                FatalError("Error deserializing 'nsCString'");
418
0
                return MsgValueError;
419
0
            }
420
0
            // Sentinel = 'iface'
421
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3356902307)))) {
422
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
423
0
                return MsgValueError;
424
0
            }
425
0
            (msg__).EndRead(iter__, (msg__).type());
426
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
427
0
                FatalError("Transition error");
428
0
                return MsgValueError;
429
0
            }
430
0
            if ((!(RecvLeaveMulticast(multicastAddress, iface)))) {
431
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
432
0
                // Error handled in mozilla::ipc::IPCResult
433
0
                return MsgProcessingError;
434
0
            }
435
0
436
0
            return MsgProcessed;
437
0
        }
438
0
    case PUDPSocket::Msg_Close__ID:
439
0
        {
440
0
            if (mozilla::ipc::LoggingEnabledFor("PUDPSocketParent")) {
441
0
                mozilla::ipc::LogMessageForProtocol("PUDPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
442
0
            }
443
0
            AUTO_PROFILER_LABEL("PUDPSocket::Msg_Close", OTHER);
444
0
445
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
446
0
                FatalError("Transition error");
447
0
                return MsgValueError;
448
0
            }
449
0
            if ((!(RecvClose()))) {
450
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
451
0
                // Error handled in mozilla::ipc::IPCResult
452
0
                return MsgProcessingError;
453
0
            }
454
0
455
0
            return MsgProcessed;
456
0
        }
457
0
    case PUDPSocket::Msg_RequestDelete__ID:
458
0
        {
459
0
            if (mozilla::ipc::LoggingEnabledFor("PUDPSocketParent")) {
460
0
                mozilla::ipc::LogMessageForProtocol("PUDPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
461
0
            }
462
0
            AUTO_PROFILER_LABEL("PUDPSocket::Msg_RequestDelete", OTHER);
463
0
464
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
465
0
                FatalError("Transition error");
466
0
                return MsgValueError;
467
0
            }
468
0
            if ((!(RecvRequestDelete()))) {
469
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
470
0
                // Error handled in mozilla::ipc::IPCResult
471
0
                return MsgProcessingError;
472
0
            }
473
0
474
0
            return MsgProcessed;
475
0
        }
476
0
    case PUDPSocket::Reply___delete____ID:
477
0
        {
478
0
            return MsgProcessed;
479
0
        }
480
0
    default:
481
0
        {
482
0
            return MsgNotKnown;
483
0
        }
484
0
    }
485
0
}
486
487
auto PUDPSocketParent::OnMessageReceived(
488
        const Message& msg__,
489
        Message*& reply__) -> PUDPSocketParent::Result
490
0
{
491
0
    return MsgNotKnown;
492
0
}
493
494
auto PUDPSocketParent::OnCallReceived(
495
        const Message& msg__,
496
        Message*& reply__) -> PUDPSocketParent::Result
497
0
{
498
0
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
499
0
    return MsgNotKnown;
500
0
}
501
502
auto PUDPSocketParent::GetProtocolTypeId() -> int32_t
503
0
{
504
0
    return PUDPSocketMsgStart;
505
0
}
506
507
auto PUDPSocketParent::DestroySubtree(ActorDestroyReason why) -> void
508
0
{
509
0
    // Unregister from our manager.
510
0
    Unregister(Id());
511
0
512
0
    // Reject owning pending responses.
513
0
    (GetIPCChannel())->RejectPendingResponsesForActor(this);
514
0
515
0
    // Finally, destroy "us".
516
0
    ActorDestroy(why);
517
0
}
518
519
auto PUDPSocketParent::DeallocSubtree() -> void
520
0
{
521
0
}
522
523
524
525
} // namespace net
526
} // namespace mozilla
527
namespace mozilla {
528
namespace ipc {
529
auto IPDLParamTraits<mozilla::net::PUDPSocketParent>::Write(
530
        IPC::Message* aMsg,
531
        mozilla::ipc::IProtocol* aActor,
532
        const paramType& aVar) -> void
533
0
{
534
0
    int32_t id;
535
0
    if ((!(aVar))) {
536
0
        id = 0;
537
0
    }
538
0
    else {
539
0
        id = (aVar)->Id();
540
0
        if ((1) == (id)) {
541
0
            (aActor)->FatalError("actor has been |delete|d");
542
0
        }
543
0
    }
544
0
    WriteIPDLParam(aMsg, aActor, id);
545
0
}
546
547
auto IPDLParamTraits<mozilla::net::PUDPSocketParent>::Read(
548
        const IPC::Message* aMsg,
549
        PickleIterator* aIter,
550
        mozilla::ipc::IProtocol* aActor,
551
        paramType* aVar) -> bool
552
0
{
553
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PUDPSocket", PUDPSocketMsgStart);
554
0
    if ((actor).isNothing()) {
555
0
        return false;
556
0
    }
557
0
558
0
    (*(aVar)) = static_cast<mozilla::net::PUDPSocketParent*>((actor).value());
559
0
    return true;
560
0
}
561
562
} // namespace ipc
563
} // namespace mozilla