Coverage Report

Created: 2018-09-25 14:53

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