Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PWebSocketChild.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/PWebSocketChild.h"
8
#include "SerializedLoadContext.h"
9
#include "ipc/IPCMessageUtils.h"
10
11
#include "mozilla/net/PNeckoChild.h"
12
#include "mozilla/dom/PBrowserChild.h"
13
#include "mozilla/net/PTransportProviderChild.h"
14
#include "mozilla/ipc/PFileDescriptorSetChild.h"
15
#include "mozilla/ipc/PChildToParentStreamChild.h"
16
#include "mozilla/ipc/PParentToChildStreamChild.h"
17
18
#include "nsIFile.h"
19
#include "GeckoProfiler.h"
20
21
namespace mozilla {
22
namespace net {
23
24
25
auto PWebSocketChild::Recv__delete__() -> mozilla::ipc::IPCResult
26
0
{
27
0
    return IPC_OK();
28
0
}
29
30
auto PWebSocketChild::ActorDestroy(ActorDestroyReason aWhy) -> void
31
0
{
32
0
}
33
34
MOZ_IMPLICIT PWebSocketChild::PWebSocketChild() :
35
    mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
36
    mLivenessState(mozilla::ipc::LivenessState::Dead)
37
0
{
38
0
    MOZ_COUNT_CTOR(PWebSocketChild);
39
0
}
40
41
PWebSocketChild::~PWebSocketChild()
42
0
{
43
0
    MOZ_COUNT_DTOR(PWebSocketChild);
44
0
}
45
46
auto PWebSocketChild::Manager() const -> PNeckoChild*
47
0
{
48
0
    return static_cast<PNeckoChild*>(IProtocol::Manager());
49
0
}
50
51
auto PWebSocketChild::SendAsyncOpen(
52
        const OptionalURIParams& aURI,
53
        const nsCString& aOrigin,
54
        const uint64_t& aInnerWindowID,
55
        const nsCString& aProtocol,
56
        const bool& aSecure,
57
        const uint32_t& aPingInterval,
58
        const bool& aClientSetPingInterval,
59
        const uint32_t& aPingTimeout,
60
        const bool& aClientSetPingTimeout,
61
        const OptionalLoadInfoArgs& aLoadInfoArgs,
62
        const OptionalTransportProvider& aProvider,
63
        const nsCString& aNegotiatedExtensions) -> bool
64
0
{
65
0
    IPC::Message* msg__ = PWebSocket::Msg_AsyncOpen(Id());
66
0
67
0
    WriteIPDLParam(msg__, this, aURI);
68
0
    // Sentinel = 'aURI'
69
0
    (msg__)->WriteSentinel(2075506333);
70
0
    WriteIPDLParam(msg__, this, aOrigin);
71
0
    // Sentinel = 'aOrigin'
72
0
    (msg__)->WriteSentinel(2118207704);
73
0
    WriteIPDLParam(msg__, this, aInnerWindowID);
74
0
    // Sentinel = 'aInnerWindowID'
75
0
    (msg__)->WriteSentinel(3059251422);
76
0
    WriteIPDLParam(msg__, this, aProtocol);
77
0
    // Sentinel = 'aProtocol'
78
0
    (msg__)->WriteSentinel(3505310484);
79
0
    WriteIPDLParam(msg__, this, aSecure);
80
0
    // Sentinel = 'aSecure'
81
0
    (msg__)->WriteSentinel(4071505201);
82
0
    WriteIPDLParam(msg__, this, aPingInterval);
83
0
    // Sentinel = 'aPingInterval'
84
0
    (msg__)->WriteSentinel(407028319);
85
0
    WriteIPDLParam(msg__, this, aClientSetPingInterval);
86
0
    // Sentinel = 'aClientSetPingInterval'
87
0
    (msg__)->WriteSentinel(3486439937);
88
0
    WriteIPDLParam(msg__, this, aPingTimeout);
89
0
    // Sentinel = 'aPingTimeout'
90
0
    (msg__)->WriteSentinel(1400185874);
91
0
    WriteIPDLParam(msg__, this, aClientSetPingTimeout);
92
0
    // Sentinel = 'aClientSetPingTimeout'
93
0
    (msg__)->WriteSentinel(2731101232);
94
0
    WriteIPDLParam(msg__, this, aLoadInfoArgs);
95
0
    // Sentinel = 'aLoadInfoArgs'
96
0
    (msg__)->WriteSentinel(3659468731);
97
0
    WriteIPDLParam(msg__, this, aProvider);
98
0
    // Sentinel = 'aProvider'
99
0
    (msg__)->WriteSentinel(4112742927);
100
0
    WriteIPDLParam(msg__, this, aNegotiatedExtensions);
101
0
    // Sentinel = 'aNegotiatedExtensions'
102
0
    (msg__)->WriteSentinel(2751189790);
103
0
104
0
105
0
106
0
107
0
    if (mozilla::ipc::LoggingEnabledFor("PWebSocketChild")) {
108
0
        mozilla::ipc::LogMessageForProtocol("PWebSocketChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
109
0
    }
110
0
    AUTO_PROFILER_LABEL("PWebSocket::Msg_AsyncOpen", OTHER);
111
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
112
0
        mozilla::ipc::LogicError("Transition error");
113
0
    }
114
0
115
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
116
0
    return sendok__;
117
0
}
118
119
auto PWebSocketChild::SendClose(
120
        const uint16_t& code,
121
        const nsCString& reason) -> bool
122
0
{
123
0
    IPC::Message* msg__ = PWebSocket::Msg_Close(Id());
124
0
125
0
    WriteIPDLParam(msg__, this, code);
126
0
    // Sentinel = 'code'
127
0
    (msg__)->WriteSentinel(3318913027);
128
0
    WriteIPDLParam(msg__, this, reason);
129
0
    // Sentinel = 'reason'
130
0
    (msg__)->WriteSentinel(4151390930);
131
0
132
0
133
0
134
0
135
0
    if (mozilla::ipc::LoggingEnabledFor("PWebSocketChild")) {
136
0
        mozilla::ipc::LogMessageForProtocol("PWebSocketChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
137
0
    }
138
0
    AUTO_PROFILER_LABEL("PWebSocket::Msg_Close", OTHER);
139
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
140
0
        mozilla::ipc::LogicError("Transition error");
141
0
    }
142
0
143
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
144
0
    return sendok__;
145
0
}
146
147
auto PWebSocketChild::SendSendMsg(const nsCString& aMsg) -> bool
148
0
{
149
0
    IPC::Message* msg__ = PWebSocket::Msg_SendMsg(Id());
150
0
151
0
    WriteIPDLParam(msg__, this, aMsg);
152
0
    // Sentinel = 'aMsg'
153
0
    (msg__)->WriteSentinel(3584578888);
154
0
155
0
156
0
157
0
158
0
    if (mozilla::ipc::LoggingEnabledFor("PWebSocketChild")) {
159
0
        mozilla::ipc::LogMessageForProtocol("PWebSocketChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
160
0
    }
161
0
    AUTO_PROFILER_LABEL("PWebSocket::Msg_SendMsg", OTHER);
162
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
163
0
        mozilla::ipc::LogicError("Transition error");
164
0
    }
165
0
166
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
167
0
    return sendok__;
168
0
}
169
170
auto PWebSocketChild::SendSendBinaryMsg(const nsCString& aMsg) -> bool
171
0
{
172
0
    IPC::Message* msg__ = PWebSocket::Msg_SendBinaryMsg(Id());
173
0
174
0
    WriteIPDLParam(msg__, this, aMsg);
175
0
    // Sentinel = 'aMsg'
176
0
    (msg__)->WriteSentinel(3584578888);
177
0
178
0
179
0
180
0
181
0
    if (mozilla::ipc::LoggingEnabledFor("PWebSocketChild")) {
182
0
        mozilla::ipc::LogMessageForProtocol("PWebSocketChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
183
0
    }
184
0
    AUTO_PROFILER_LABEL("PWebSocket::Msg_SendBinaryMsg", OTHER);
185
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
186
0
        mozilla::ipc::LogicError("Transition error");
187
0
    }
188
0
189
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
190
0
    return sendok__;
191
0
}
192
193
auto PWebSocketChild::SendSendBinaryStream(
194
        const IPCStream& aStream,
195
        const uint32_t& aLength) -> bool
196
0
{
197
0
    IPC::Message* msg__ = PWebSocket::Msg_SendBinaryStream(Id());
198
0
199
0
    WriteIPDLParam(msg__, this, aStream);
200
0
    // Sentinel = 'aStream'
201
0
    (msg__)->WriteSentinel(3415320318);
202
0
    WriteIPDLParam(msg__, this, aLength);
203
0
    // Sentinel = 'aLength'
204
0
    (msg__)->WriteSentinel(2696905790);
205
0
206
0
207
0
208
0
209
0
    if (mozilla::ipc::LoggingEnabledFor("PWebSocketChild")) {
210
0
        mozilla::ipc::LogMessageForProtocol("PWebSocketChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
211
0
    }
212
0
    AUTO_PROFILER_LABEL("PWebSocket::Msg_SendBinaryStream", OTHER);
213
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
214
0
        mozilla::ipc::LogicError("Transition error");
215
0
    }
216
0
217
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
218
0
    return sendok__;
219
0
}
220
221
auto PWebSocketChild::SendDeleteSelf() -> bool
222
0
{
223
0
    IPC::Message* msg__ = PWebSocket::Msg_DeleteSelf(Id());
224
0
225
0
226
0
227
0
228
0
229
0
    if (mozilla::ipc::LoggingEnabledFor("PWebSocketChild")) {
230
0
        mozilla::ipc::LogMessageForProtocol("PWebSocketChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
231
0
    }
232
0
    AUTO_PROFILER_LABEL("PWebSocket::Msg_DeleteSelf", OTHER);
233
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
234
0
        mozilla::ipc::LogicError("Transition error");
235
0
    }
236
0
237
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
238
0
    return sendok__;
239
0
}
240
241
auto PWebSocketChild::RemoveManagee(
242
        int32_t aProtocolId,
243
        IProtocol* aListener) -> void
244
0
{
245
0
    FatalError("unreached");
246
0
    return;
247
0
}
248
249
auto PWebSocketChild::OnMessageReceived(const Message& msg__) -> PWebSocketChild::Result
250
0
{
251
0
    switch ((msg__).type()) {
252
0
    case PWebSocket::Msg_OnStart__ID:
253
0
        {
254
0
            if (mozilla::ipc::LoggingEnabledFor("PWebSocketChild")) {
255
0
                mozilla::ipc::LogMessageForProtocol("PWebSocketChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
256
0
            }
257
0
            AUTO_PROFILER_LABEL("PWebSocket::Msg_OnStart", OTHER);
258
0
259
0
            PickleIterator iter__(msg__);
260
0
            nsCString aProtocol;
261
0
            nsCString aExtensions;
262
0
            nsString aEffectiveURL;
263
0
            bool aEncrypted;
264
0
265
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aProtocol)))))) {
266
0
                FatalError("Error deserializing 'nsCString'");
267
0
                return MsgValueError;
268
0
            }
269
0
            // Sentinel = 'aProtocol'
270
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3505310484)))) {
271
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
272
0
                return MsgValueError;
273
0
            }
274
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aExtensions)))))) {
275
0
                FatalError("Error deserializing 'nsCString'");
276
0
                return MsgValueError;
277
0
            }
278
0
            // Sentinel = 'aExtensions'
279
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 805668716)))) {
280
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
281
0
                return MsgValueError;
282
0
            }
283
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aEffectiveURL)))))) {
284
0
                FatalError("Error deserializing 'nsString'");
285
0
                return MsgValueError;
286
0
            }
287
0
            // Sentinel = 'aEffectiveURL'
288
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2123459946)))) {
289
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
290
0
                return MsgValueError;
291
0
            }
292
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aEncrypted)))))) {
293
0
                FatalError("Error deserializing 'bool'");
294
0
                return MsgValueError;
295
0
            }
296
0
            // Sentinel = 'aEncrypted'
297
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3962043913)))) {
298
0
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
299
0
                return MsgValueError;
300
0
            }
301
0
            (msg__).EndRead(iter__, (msg__).type());
302
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
303
0
                FatalError("Transition error");
304
0
                return MsgValueError;
305
0
            }
306
0
            if ((!(RecvOnStart(aProtocol, aExtensions, aEffectiveURL, aEncrypted)))) {
307
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
308
0
                // Error handled in mozilla::ipc::IPCResult
309
0
                return MsgProcessingError;
310
0
            }
311
0
312
0
            return MsgProcessed;
313
0
        }
314
0
    case PWebSocket::Msg_OnStop__ID:
315
0
        {
316
0
            if (mozilla::ipc::LoggingEnabledFor("PWebSocketChild")) {
317
0
                mozilla::ipc::LogMessageForProtocol("PWebSocketChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
318
0
            }
319
0
            AUTO_PROFILER_LABEL("PWebSocket::Msg_OnStop", OTHER);
320
0
321
0
            PickleIterator iter__(msg__);
322
0
            nsresult aStatusCode;
323
0
324
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aStatusCode)))))) {
325
0
                FatalError("Error deserializing 'nsresult'");
326
0
                return MsgValueError;
327
0
            }
328
0
            // Sentinel = 'aStatusCode'
329
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3484261911)))) {
330
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
331
0
                return MsgValueError;
332
0
            }
333
0
            (msg__).EndRead(iter__, (msg__).type());
334
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
335
0
                FatalError("Transition error");
336
0
                return MsgValueError;
337
0
            }
338
0
            if ((!(RecvOnStop(aStatusCode)))) {
339
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
340
0
                // Error handled in mozilla::ipc::IPCResult
341
0
                return MsgProcessingError;
342
0
            }
343
0
344
0
            return MsgProcessed;
345
0
        }
346
0
    case PWebSocket::Msg_OnMessageAvailable__ID:
347
0
        {
348
0
            if (mozilla::ipc::LoggingEnabledFor("PWebSocketChild")) {
349
0
                mozilla::ipc::LogMessageForProtocol("PWebSocketChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
350
0
            }
351
0
            AUTO_PROFILER_LABEL("PWebSocket::Msg_OnMessageAvailable", OTHER);
352
0
353
0
            PickleIterator iter__(msg__);
354
0
            nsCString aMsg;
355
0
356
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aMsg)))))) {
357
0
                FatalError("Error deserializing 'nsCString'");
358
0
                return MsgValueError;
359
0
            }
360
0
            // Sentinel = 'aMsg'
361
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3584578888)))) {
362
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
363
0
                return MsgValueError;
364
0
            }
365
0
            (msg__).EndRead(iter__, (msg__).type());
366
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
367
0
                FatalError("Transition error");
368
0
                return MsgValueError;
369
0
            }
370
0
            if ((!(RecvOnMessageAvailable(aMsg)))) {
371
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
372
0
                // Error handled in mozilla::ipc::IPCResult
373
0
                return MsgProcessingError;
374
0
            }
375
0
376
0
            return MsgProcessed;
377
0
        }
378
0
    case PWebSocket::Msg_OnBinaryMessageAvailable__ID:
379
0
        {
380
0
            if (mozilla::ipc::LoggingEnabledFor("PWebSocketChild")) {
381
0
                mozilla::ipc::LogMessageForProtocol("PWebSocketChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
382
0
            }
383
0
            AUTO_PROFILER_LABEL("PWebSocket::Msg_OnBinaryMessageAvailable", OTHER);
384
0
385
0
            PickleIterator iter__(msg__);
386
0
            nsCString aMsg;
387
0
388
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aMsg)))))) {
389
0
                FatalError("Error deserializing 'nsCString'");
390
0
                return MsgValueError;
391
0
            }
392
0
            // Sentinel = 'aMsg'
393
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3584578888)))) {
394
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
395
0
                return MsgValueError;
396
0
            }
397
0
            (msg__).EndRead(iter__, (msg__).type());
398
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
399
0
                FatalError("Transition error");
400
0
                return MsgValueError;
401
0
            }
402
0
            if ((!(RecvOnBinaryMessageAvailable(aMsg)))) {
403
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
404
0
                // Error handled in mozilla::ipc::IPCResult
405
0
                return MsgProcessingError;
406
0
            }
407
0
408
0
            return MsgProcessed;
409
0
        }
410
0
    case PWebSocket::Msg_OnAcknowledge__ID:
411
0
        {
412
0
            if (mozilla::ipc::LoggingEnabledFor("PWebSocketChild")) {
413
0
                mozilla::ipc::LogMessageForProtocol("PWebSocketChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
414
0
            }
415
0
            AUTO_PROFILER_LABEL("PWebSocket::Msg_OnAcknowledge", OTHER);
416
0
417
0
            PickleIterator iter__(msg__);
418
0
            uint32_t aSize;
419
0
420
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aSize)))))) {
421
0
                FatalError("Error deserializing 'uint32_t'");
422
0
                return MsgValueError;
423
0
            }
424
0
            // Sentinel = 'aSize'
425
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2556665555)))) {
426
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
427
0
                return MsgValueError;
428
0
            }
429
0
            (msg__).EndRead(iter__, (msg__).type());
430
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
431
0
                FatalError("Transition error");
432
0
                return MsgValueError;
433
0
            }
434
0
            if ((!(RecvOnAcknowledge(aSize)))) {
435
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
436
0
                // Error handled in mozilla::ipc::IPCResult
437
0
                return MsgProcessingError;
438
0
            }
439
0
440
0
            return MsgProcessed;
441
0
        }
442
0
    case PWebSocket::Msg_OnServerClose__ID:
443
0
        {
444
0
            if (mozilla::ipc::LoggingEnabledFor("PWebSocketChild")) {
445
0
                mozilla::ipc::LogMessageForProtocol("PWebSocketChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
446
0
            }
447
0
            AUTO_PROFILER_LABEL("PWebSocket::Msg_OnServerClose", OTHER);
448
0
449
0
            PickleIterator iter__(msg__);
450
0
            uint16_t code;
451
0
            nsCString aReason;
452
0
453
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(code)))))) {
454
0
                FatalError("Error deserializing 'uint16_t'");
455
0
                return MsgValueError;
456
0
            }
457
0
            // Sentinel = 'code'
458
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3318913027)))) {
459
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint16_t'");
460
0
                return MsgValueError;
461
0
            }
462
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aReason)))))) {
463
0
                FatalError("Error deserializing 'nsCString'");
464
0
                return MsgValueError;
465
0
            }
466
0
            // Sentinel = 'aReason'
467
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 829905706)))) {
468
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
469
0
                return MsgValueError;
470
0
            }
471
0
            (msg__).EndRead(iter__, (msg__).type());
472
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
473
0
                FatalError("Transition error");
474
0
                return MsgValueError;
475
0
            }
476
0
            if ((!(RecvOnServerClose(code, aReason)))) {
477
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
478
0
                // Error handled in mozilla::ipc::IPCResult
479
0
                return MsgProcessingError;
480
0
            }
481
0
482
0
            return MsgProcessed;
483
0
        }
484
0
    case PWebSocket::Msg___delete____ID:
485
0
        {
486
0
            if (mozilla::ipc::LoggingEnabledFor("PWebSocketChild")) {
487
0
                mozilla::ipc::LogMessageForProtocol("PWebSocketChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
488
0
            }
489
0
            AUTO_PROFILER_LABEL("PWebSocket::Msg___delete__", OTHER);
490
0
491
0
            PickleIterator iter__(msg__);
492
0
            PWebSocketChild* actor;
493
0
494
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) {
495
0
                FatalError("Error deserializing 'PWebSocketChild'");
496
0
                return MsgValueError;
497
0
            }
498
0
            if ((!((*((&(actor))))))) {
499
0
                FatalError("Error deserializing 'PWebSocketChild'");
500
0
                return MsgValueError;
501
0
            }
502
0
            // Sentinel = 'actor'
503
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
504
0
                mozilla::ipc::SentinelReadError("Error deserializing 'PWebSocketChild'");
505
0
                return MsgValueError;
506
0
            }
507
0
            (msg__).EndRead(iter__, (msg__).type());
508
0
            if ((!(StateTransition(true, (&(mLivenessState)))))) {
509
0
                FatalError("Transition error");
510
0
                return MsgValueError;
511
0
            }
512
0
            if ((!(Recv__delete__()))) {
513
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
514
0
                // Error handled in mozilla::ipc::IPCResult
515
0
                return MsgProcessingError;
516
0
            }
517
0
518
0
519
0
            IProtocol* mgr = (actor)->Manager();
520
0
            (actor)->DestroySubtree(Deletion);
521
0
            (actor)->DeallocSubtree();
522
0
            (mgr)->RemoveManagee(PWebSocketMsgStart, actor);
523
0
524
0
            return MsgProcessed;
525
0
        }
526
0
    default:
527
0
        {
528
0
            return MsgNotKnown;
529
0
        }
530
0
    }
531
0
}
532
533
auto PWebSocketChild::OnMessageReceived(
534
        const Message& msg__,
535
        Message*& reply__) -> PWebSocketChild::Result
536
0
{
537
0
    return MsgNotKnown;
538
0
}
539
540
auto PWebSocketChild::OnCallReceived(
541
        const Message& msg__,
542
        Message*& reply__) -> PWebSocketChild::Result
543
0
{
544
0
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
545
0
    return MsgNotKnown;
546
0
}
547
548
auto PWebSocketChild::GetProtocolTypeId() -> int32_t
549
0
{
550
0
    return PWebSocketMsgStart;
551
0
}
552
553
auto PWebSocketChild::DestroySubtree(ActorDestroyReason why) -> void
554
0
{
555
0
    // Unregister from our manager.
556
0
    Unregister(Id());
557
0
558
0
    // Reject owning pending responses.
559
0
    (GetIPCChannel())->RejectPendingResponsesForActor(this);
560
0
561
0
    // Finally, destroy "us".
562
0
    ActorDestroy(why);
563
0
}
564
565
auto PWebSocketChild::DeallocSubtree() -> void
566
0
{
567
0
}
568
569
570
571
} // namespace net
572
} // namespace mozilla
573
namespace mozilla {
574
namespace ipc {
575
auto IPDLParamTraits<mozilla::net::PWebSocketChild>::Write(
576
        IPC::Message* aMsg,
577
        mozilla::ipc::IProtocol* aActor,
578
        const paramType& aVar) -> void
579
0
{
580
0
    int32_t id;
581
0
    if ((!(aVar))) {
582
0
        id = 0;
583
0
    }
584
0
    else {
585
0
        id = (aVar)->Id();
586
0
        if ((1) == (id)) {
587
0
            (aActor)->FatalError("actor has been |delete|d");
588
0
        }
589
0
    }
590
0
    WriteIPDLParam(aMsg, aActor, id);
591
0
}
592
593
auto IPDLParamTraits<mozilla::net::PWebSocketChild>::Read(
594
        const IPC::Message* aMsg,
595
        PickleIterator* aIter,
596
        mozilla::ipc::IProtocol* aActor,
597
        paramType* aVar) -> bool
598
0
{
599
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PWebSocket", PWebSocketMsgStart);
600
0
    if ((actor).isNothing()) {
601
0
        return false;
602
0
    }
603
0
604
0
    (*(aVar)) = static_cast<mozilla::net::PWebSocketChild*>((actor).value());
605
0
    return true;
606
0
}
607
608
} // namespace ipc
609
} // namespace mozilla