Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PGMPVideoDecoderChild.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/gmp/PGMPVideoDecoderChild.h"
8
9
#include "mozilla/gmp/PGMPContentChild.h"
10
11
#include "nsIFile.h"
12
#include "GeckoProfiler.h"
13
14
namespace mozilla {
15
namespace gmp {
16
17
18
auto PGMPVideoDecoderChild::ActorDestroy(ActorDestroyReason aWhy) -> void
19
0
{
20
0
}
21
22
MOZ_IMPLICIT PGMPVideoDecoderChild::PGMPVideoDecoderChild() :
23
    mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
24
    mLivenessState(mozilla::ipc::LivenessState::Dead)
25
0
{
26
0
    MOZ_COUNT_CTOR(PGMPVideoDecoderChild);
27
0
}
28
29
PGMPVideoDecoderChild::~PGMPVideoDecoderChild()
30
0
{
31
0
    MOZ_COUNT_DTOR(PGMPVideoDecoderChild);
32
0
}
33
34
auto PGMPVideoDecoderChild::Manager() const -> PGMPContentChild*
35
0
{
36
0
    return static_cast<PGMPContentChild*>(IProtocol::Manager());
37
0
}
38
39
auto PGMPVideoDecoderChild::Send__delete__(PGMPVideoDecoderChild* actor) -> bool
40
0
{
41
0
    if ((!(actor))) {
42
0
        return false;
43
0
    }
44
0
45
0
    IPC::Message* msg__ = PGMPVideoDecoder::Msg___delete__((actor)->Id());
46
0
47
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
48
0
    WriteIPDLParam(msg__, actor, actor);
49
0
    // Sentinel = 'actor'
50
0
    (msg__)->WriteSentinel(875202478);
51
0
52
0
53
0
54
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
55
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
56
0
    }
57
0
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg___delete__", OTHER);
58
0
    if ((!(StateTransition(true, (&((actor)->mLivenessState)))))) {
59
0
        mozilla::ipc::LogicError("Transition error");
60
0
    }
61
0
62
0
    bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
63
0
64
0
    IProtocol* mgr = (actor)->Manager();
65
0
    (actor)->DestroySubtree(Deletion);
66
0
    (actor)->DeallocSubtree();
67
0
    (mgr)->RemoveManagee(PGMPVideoDecoderMsgStart, actor);
68
0
    return sendok__;
69
0
}
70
71
auto PGMPVideoDecoderChild::SendDecoded(const GMPVideoi420FrameData& aDecodedFrame) -> bool
72
0
{
73
0
    IPC::Message* msg__ = PGMPVideoDecoder::Msg_Decoded(Id());
74
0
75
0
    WriteIPDLParam(msg__, this, aDecodedFrame);
76
0
    // Sentinel = 'aDecodedFrame'
77
0
    (msg__)->WriteSentinel(1155687621);
78
0
79
0
80
0
81
0
82
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
83
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
84
0
    }
85
0
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Decoded", OTHER);
86
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
87
0
        mozilla::ipc::LogicError("Transition error");
88
0
    }
89
0
90
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
91
0
    return sendok__;
92
0
}
93
94
auto PGMPVideoDecoderChild::SendReceivedDecodedReferenceFrame(const uint64_t& aPictureId) -> bool
95
0
{
96
0
    IPC::Message* msg__ = PGMPVideoDecoder::Msg_ReceivedDecodedReferenceFrame(Id());
97
0
98
0
    WriteIPDLParam(msg__, this, aPictureId);
99
0
    // Sentinel = 'aPictureId'
100
0
    (msg__)->WriteSentinel(288389592);
101
0
102
0
103
0
104
0
105
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
106
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
107
0
    }
108
0
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_ReceivedDecodedReferenceFrame", OTHER);
109
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
110
0
        mozilla::ipc::LogicError("Transition error");
111
0
    }
112
0
113
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
114
0
    return sendok__;
115
0
}
116
117
auto PGMPVideoDecoderChild::SendReceivedDecodedFrame(const uint64_t& aPictureId) -> bool
118
0
{
119
0
    IPC::Message* msg__ = PGMPVideoDecoder::Msg_ReceivedDecodedFrame(Id());
120
0
121
0
    WriteIPDLParam(msg__, this, aPictureId);
122
0
    // Sentinel = 'aPictureId'
123
0
    (msg__)->WriteSentinel(288389592);
124
0
125
0
126
0
127
0
128
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
129
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
130
0
    }
131
0
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_ReceivedDecodedFrame", OTHER);
132
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
133
0
        mozilla::ipc::LogicError("Transition error");
134
0
    }
135
0
136
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
137
0
    return sendok__;
138
0
}
139
140
auto PGMPVideoDecoderChild::SendInputDataExhausted() -> bool
141
0
{
142
0
    IPC::Message* msg__ = PGMPVideoDecoder::Msg_InputDataExhausted(Id());
143
0
144
0
145
0
146
0
147
0
148
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
149
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
150
0
    }
151
0
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_InputDataExhausted", OTHER);
152
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
153
0
        mozilla::ipc::LogicError("Transition error");
154
0
    }
155
0
156
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
157
0
    return sendok__;
158
0
}
159
160
auto PGMPVideoDecoderChild::SendDrainComplete() -> bool
161
0
{
162
0
    IPC::Message* msg__ = PGMPVideoDecoder::Msg_DrainComplete(Id());
163
0
164
0
165
0
166
0
167
0
168
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
169
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
170
0
    }
171
0
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_DrainComplete", OTHER);
172
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
173
0
        mozilla::ipc::LogicError("Transition error");
174
0
    }
175
0
176
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
177
0
    return sendok__;
178
0
}
179
180
auto PGMPVideoDecoderChild::SendResetComplete() -> bool
181
0
{
182
0
    IPC::Message* msg__ = PGMPVideoDecoder::Msg_ResetComplete(Id());
183
0
184
0
185
0
186
0
187
0
188
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
189
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
190
0
    }
191
0
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_ResetComplete", OTHER);
192
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
193
0
        mozilla::ipc::LogicError("Transition error");
194
0
    }
195
0
196
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
197
0
    return sendok__;
198
0
}
199
200
auto PGMPVideoDecoderChild::SendError(const GMPErr& aErr) -> bool
201
0
{
202
0
    IPC::Message* msg__ = PGMPVideoDecoder::Msg_Error(Id());
203
0
204
0
    WriteIPDLParam(msg__, this, aErr);
205
0
    // Sentinel = 'aErr'
206
0
    (msg__)->WriteSentinel(540683382);
207
0
208
0
209
0
210
0
211
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
212
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
213
0
    }
214
0
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Error", OTHER);
215
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
216
0
        mozilla::ipc::LogicError("Transition error");
217
0
    }
218
0
219
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
220
0
    return sendok__;
221
0
}
222
223
auto PGMPVideoDecoderChild::SendShutdown() -> bool
224
0
{
225
0
    IPC::Message* msg__ = PGMPVideoDecoder::Msg_Shutdown(Id());
226
0
227
0
228
0
229
0
230
0
231
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
232
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
233
0
    }
234
0
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Shutdown", OTHER);
235
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
236
0
        mozilla::ipc::LogicError("Transition error");
237
0
    }
238
0
239
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
240
0
    return sendok__;
241
0
}
242
243
auto PGMPVideoDecoderChild::SendParentShmemForPool(Shmem& aEncodedBuffer) -> bool
244
0
{
245
0
    IPC::Message* msg__ = PGMPVideoDecoder::Msg_ParentShmemForPool(Id());
246
0
247
0
    WriteIPDLParam(msg__, this, aEncodedBuffer);
248
0
    // Sentinel = 'aEncodedBuffer'
249
0
    (msg__)->WriteSentinel(3335299401);
250
0
251
0
252
0
253
0
254
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
255
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
256
0
    }
257
0
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_ParentShmemForPool", OTHER);
258
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
259
0
        mozilla::ipc::LogicError("Transition error");
260
0
    }
261
0
262
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
263
0
    return sendok__;
264
0
}
265
266
auto PGMPVideoDecoderChild::CallNeedShmem(
267
        const uint32_t& aFrameBufferSize,
268
        Shmem* aMem) -> bool
269
0
{
270
0
    IPC::Message* msg__ = PGMPVideoDecoder::Msg_NeedShmem(Id());
271
0
272
0
    WriteIPDLParam(msg__, this, aFrameBufferSize);
273
0
    // Sentinel = 'aFrameBufferSize'
274
0
    (msg__)->WriteSentinel(182265385);
275
0
276
0
277
0
278
0
    Message reply__;
279
0
280
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
281
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
282
0
    }
283
0
    AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_NeedShmem", OTHER);
284
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
285
0
        mozilla::ipc::LogicError("Transition error");
286
0
    }
287
0
288
0
    bool sendok__;
289
0
    {
290
0
        AUTO_PROFILER_TRACING("IPC", "PGMPVideoDecoder::Msg_NeedShmem");
291
0
        sendok__ = (GetIPCChannel())->Call(msg__, (&(reply__)));
292
0
    }
293
0
    if ((!(sendok__))) {
294
0
        return false;
295
0
    }
296
0
297
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
298
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
299
0
    }
300
0
301
0
    PickleIterator iter__(reply__);
302
0
303
0
    if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, aMem)))) {
304
0
        FatalError("Error deserializing 'Shmem'");
305
0
        return false;
306
0
    }
307
0
    // Sentinel = 'aMem'
308
0
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3574578916)))) {
309
0
        mozilla::ipc::SentinelReadError("Error deserializing 'Shmem'");
310
0
        return false;
311
0
    }
312
0
    (reply__).EndRead(iter__, (reply__).type());
313
0
314
0
    return true;
315
0
}
316
317
auto PGMPVideoDecoderChild::RemoveManagee(
318
        int32_t aProtocolId,
319
        IProtocol* aListener) -> void
320
0
{
321
0
    FatalError("unreached");
322
0
    return;
323
0
}
324
325
auto PGMPVideoDecoderChild::OnMessageReceived(const Message& msg__) -> PGMPVideoDecoderChild::Result
326
0
{
327
0
    switch ((msg__).type()) {
328
0
    case PGMPVideoDecoder::Msg_InitDecode__ID:
329
0
        {
330
0
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
331
0
                mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
332
0
            }
333
0
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_InitDecode", OTHER);
334
0
335
0
            PickleIterator iter__(msg__);
336
0
            GMPVideoCodec aCodecSettings;
337
0
            nsTArray<uint8_t> aCodecSpecific;
338
0
            int32_t aCoreCount;
339
0
340
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aCodecSettings)))))) {
341
0
                FatalError("Error deserializing 'GMPVideoCodec'");
342
0
                return MsgValueError;
343
0
            }
344
0
            // Sentinel = 'aCodecSettings'
345
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 394896860)))) {
346
0
                mozilla::ipc::SentinelReadError("Error deserializing 'GMPVideoCodec'");
347
0
                return MsgValueError;
348
0
            }
349
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aCodecSpecific)))))) {
350
0
                FatalError("Error deserializing 'nsTArray'");
351
0
                return MsgValueError;
352
0
            }
353
0
            // Sentinel = 'aCodecSpecific'
354
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3773952059)))) {
355
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'");
356
0
                return MsgValueError;
357
0
            }
358
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aCoreCount)))))) {
359
0
                FatalError("Error deserializing 'int32_t'");
360
0
                return MsgValueError;
361
0
            }
362
0
            // Sentinel = 'aCoreCount'
363
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3418548679)))) {
364
0
                mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'");
365
0
                return MsgValueError;
366
0
            }
367
0
            (msg__).EndRead(iter__, (msg__).type());
368
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
369
0
                FatalError("Transition error");
370
0
                return MsgValueError;
371
0
            }
372
0
            if ((!(RecvInitDecode(aCodecSettings, std::move(aCodecSpecific), aCoreCount)))) {
373
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
374
0
                // Error handled in mozilla::ipc::IPCResult
375
0
                return MsgProcessingError;
376
0
            }
377
0
378
0
            return MsgProcessed;
379
0
        }
380
0
    case PGMPVideoDecoder::Msg_Decode__ID:
381
0
        {
382
0
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
383
0
                mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
384
0
            }
385
0
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Decode", OTHER);
386
0
387
0
            PickleIterator iter__(msg__);
388
0
            GMPVideoEncodedFrameData aInputFrame;
389
0
            bool aMissingFrames;
390
0
            nsTArray<uint8_t> aCodecSpecificInfo;
391
0
            int64_t aRenderTimeMs;
392
0
393
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aInputFrame)))))) {
394
0
                FatalError("Error deserializing 'GMPVideoEncodedFrameData'");
395
0
                return MsgValueError;
396
0
            }
397
0
            // Sentinel = 'aInputFrame'
398
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3664588317)))) {
399
0
                mozilla::ipc::SentinelReadError("Error deserializing 'GMPVideoEncodedFrameData'");
400
0
                return MsgValueError;
401
0
            }
402
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aMissingFrames)))))) {
403
0
                FatalError("Error deserializing 'bool'");
404
0
                return MsgValueError;
405
0
            }
406
0
            // Sentinel = 'aMissingFrames'
407
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2267431183)))) {
408
0
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
409
0
                return MsgValueError;
410
0
            }
411
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aCodecSpecificInfo)))))) {
412
0
                FatalError("Error deserializing 'nsTArray'");
413
0
                return MsgValueError;
414
0
            }
415
0
            // Sentinel = 'aCodecSpecificInfo'
416
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 742576219)))) {
417
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'");
418
0
                return MsgValueError;
419
0
            }
420
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aRenderTimeMs)))))) {
421
0
                FatalError("Error deserializing 'int64_t'");
422
0
                return MsgValueError;
423
0
            }
424
0
            // Sentinel = 'aRenderTimeMs'
425
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2368677663)))) {
426
0
                mozilla::ipc::SentinelReadError("Error deserializing 'int64_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 ((!(RecvDecode(aInputFrame, aMissingFrames, std::move(aCodecSpecificInfo), aRenderTimeMs)))) {
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 PGMPVideoDecoder::Msg_Reset__ID:
443
0
        {
444
0
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
445
0
                mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
446
0
            }
447
0
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Reset", OTHER);
448
0
449
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
450
0
                FatalError("Transition error");
451
0
                return MsgValueError;
452
0
            }
453
0
            if ((!(RecvReset()))) {
454
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
455
0
                // Error handled in mozilla::ipc::IPCResult
456
0
                return MsgProcessingError;
457
0
            }
458
0
459
0
            return MsgProcessed;
460
0
        }
461
0
    case PGMPVideoDecoder::Msg_Drain__ID:
462
0
        {
463
0
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
464
0
                mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
465
0
            }
466
0
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_Drain", OTHER);
467
0
468
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
469
0
                FatalError("Transition error");
470
0
                return MsgValueError;
471
0
            }
472
0
            if ((!(RecvDrain()))) {
473
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
474
0
                // Error handled in mozilla::ipc::IPCResult
475
0
                return MsgProcessingError;
476
0
            }
477
0
478
0
            return MsgProcessed;
479
0
        }
480
0
    case PGMPVideoDecoder::Msg_DecodingComplete__ID:
481
0
        {
482
0
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
483
0
                mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
484
0
            }
485
0
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_DecodingComplete", OTHER);
486
0
487
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
488
0
                FatalError("Transition error");
489
0
                return MsgValueError;
490
0
            }
491
0
            if ((!(RecvDecodingComplete()))) {
492
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
493
0
                // Error handled in mozilla::ipc::IPCResult
494
0
                return MsgProcessingError;
495
0
            }
496
0
497
0
            return MsgProcessed;
498
0
        }
499
0
    case PGMPVideoDecoder::Msg_ChildShmemForPool__ID:
500
0
        {
501
0
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoDecoderChild")) {
502
0
                mozilla::ipc::LogMessageForProtocol("PGMPVideoDecoderChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
503
0
            }
504
0
            AUTO_PROFILER_LABEL("PGMPVideoDecoder::Msg_ChildShmemForPool", OTHER);
505
0
506
0
            PickleIterator iter__(msg__);
507
0
            Shmem aFrameBuffer;
508
0
509
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aFrameBuffer)))))) {
510
0
                FatalError("Error deserializing 'Shmem'");
511
0
                return MsgValueError;
512
0
            }
513
0
            // Sentinel = 'aFrameBuffer'
514
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3888831322)))) {
515
0
                mozilla::ipc::SentinelReadError("Error deserializing 'Shmem'");
516
0
                return MsgValueError;
517
0
            }
518
0
            (msg__).EndRead(iter__, (msg__).type());
519
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
520
0
                FatalError("Transition error");
521
0
                return MsgValueError;
522
0
            }
523
0
            if ((!(RecvChildShmemForPool(std::move(aFrameBuffer))))) {
524
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
525
0
                // Error handled in mozilla::ipc::IPCResult
526
0
                return MsgProcessingError;
527
0
            }
528
0
529
0
            return MsgProcessed;
530
0
        }
531
0
    case PGMPVideoDecoder::Reply___delete____ID:
532
0
        {
533
0
            return MsgProcessed;
534
0
        }
535
0
    default:
536
0
        {
537
0
            return MsgNotKnown;
538
0
        }
539
0
    }
540
0
}
541
542
auto PGMPVideoDecoderChild::OnMessageReceived(
543
        const Message& msg__,
544
        Message*& reply__) -> PGMPVideoDecoderChild::Result
545
0
{
546
0
    return MsgNotKnown;
547
0
}
548
549
auto PGMPVideoDecoderChild::OnCallReceived(
550
        const Message& msg__,
551
        Message*& reply__) -> PGMPVideoDecoderChild::Result
552
0
{
553
0
    return MsgNotKnown;
554
0
}
555
556
auto PGMPVideoDecoderChild::GetProtocolTypeId() -> int32_t
557
0
{
558
0
    return PGMPVideoDecoderMsgStart;
559
0
}
560
561
auto PGMPVideoDecoderChild::DestroySubtree(ActorDestroyReason why) -> void
562
0
{
563
0
    // Unregister from our manager.
564
0
    Unregister(Id());
565
0
566
0
    // Reject owning pending responses.
567
0
    (GetIPCChannel())->RejectPendingResponsesForActor(this);
568
0
569
0
    // Finally, destroy "us".
570
0
    ActorDestroy(why);
571
0
}
572
573
auto PGMPVideoDecoderChild::DeallocSubtree() -> void
574
0
{
575
0
}
576
577
578
579
} // namespace gmp
580
} // namespace mozilla
581
namespace mozilla {
582
namespace ipc {
583
auto IPDLParamTraits<mozilla::gmp::PGMPVideoDecoderChild>::Write(
584
        IPC::Message* aMsg,
585
        mozilla::ipc::IProtocol* aActor,
586
        const paramType& aVar) -> void
587
0
{
588
0
    int32_t id;
589
0
    if ((!(aVar))) {
590
0
        id = 0;
591
0
    }
592
0
    else {
593
0
        id = (aVar)->Id();
594
0
        if ((1) == (id)) {
595
0
            (aActor)->FatalError("actor has been |delete|d");
596
0
        }
597
0
    }
598
0
    WriteIPDLParam(aMsg, aActor, id);
599
0
}
600
601
auto IPDLParamTraits<mozilla::gmp::PGMPVideoDecoderChild>::Read(
602
        const IPC::Message* aMsg,
603
        PickleIterator* aIter,
604
        mozilla::ipc::IProtocol* aActor,
605
        paramType* aVar) -> bool
606
0
{
607
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PGMPVideoDecoder", PGMPVideoDecoderMsgStart);
608
0
    if ((actor).isNothing()) {
609
0
        return false;
610
0
    }
611
0
612
0
    (*(aVar)) = static_cast<mozilla::gmp::PGMPVideoDecoderChild*>((actor).value());
613
0
    return true;
614
0
}
615
616
} // namespace ipc
617
} // namespace mozilla