Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PVRManagerParent.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/gfx/PVRManagerParent.h"
8
#include "gfxVR.h"
9
10
#include "mozilla/gfx/PVRLayerParent.h"
11
12
#include "nsIFile.h"
13
#include "GeckoProfiler.h"
14
15
namespace mozilla {
16
namespace gfx {
17
18
19
auto PVRManagerParent::RecvPVRLayerConstructor(
20
        PVRLayerParent* actor,
21
        const uint32_t& aDisplayID,
22
        const uint32_t& aGroup) -> mozilla::ipc::IPCResult
23
0
{
24
0
    return IPC_OK();
25
0
}
26
27
auto PVRManagerParent::ActorDestroy(ActorDestroyReason aWhy) -> void
28
0
{
29
0
}
30
31
auto PVRManagerParent::ProcessingError(
32
        Result aCode,
33
        const char* aReason) -> void
34
0
{
35
0
}
36
37
auto PVRManagerParent::ShouldContinueFromReplyTimeout() -> bool
38
0
{
39
0
    return true;
40
0
}
41
42
auto PVRManagerParent::EnteredCxxStack() -> void
43
0
{
44
0
}
45
46
auto PVRManagerParent::ExitedCxxStack() -> void
47
0
{
48
0
}
49
50
auto PVRManagerParent::EnteredCall() -> void
51
0
{
52
0
}
53
54
auto PVRManagerParent::ExitedCall() -> void
55
0
{
56
0
}
57
58
MOZ_IMPLICIT PVRManagerParent::PVRManagerParent() :
59
    mozilla::ipc::IToplevelProtocol("PVRManagerParent", PVRManagerMsgStart, mozilla::ipc::ParentSide),
60
    mLivenessState(mozilla::ipc::LivenessState::Start)
61
0
{
62
0
    MOZ_COUNT_CTOR(PVRManagerParent);
63
0
}
64
65
PVRManagerParent::~PVRManagerParent()
66
0
{
67
0
    MOZ_COUNT_DTOR(PVRManagerParent);
68
0
}
69
70
auto PVRManagerParent::ManagedPVRLayerParent(nsTArray<PVRLayerParent*>& aArr) const -> void
71
0
{
72
0
    (mManagedPVRLayerParent).ToArray(aArr);
73
0
}
74
75
auto PVRManagerParent::ManagedPVRLayerParent() const -> const ManagedContainer<PVRLayerParent>&
76
0
{
77
0
    return mManagedPVRLayerParent;
78
0
}
79
80
auto PVRManagerParent::SendUpdateDisplayInfo(const nsTArray<VRDisplayInfo>& aDisplayUpdates) -> bool
81
0
{
82
0
    IPC::Message* msg__ = PVRManager::Msg_UpdateDisplayInfo(MSG_ROUTING_CONTROL);
83
0
84
0
    WriteIPDLParam(msg__, this, aDisplayUpdates);
85
0
    // Sentinel = 'aDisplayUpdates'
86
0
    (msg__)->WriteSentinel(4278158622);
87
0
88
0
89
0
90
0
91
0
    if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
92
0
        mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
93
0
    }
94
0
    AUTO_PROFILER_LABEL("PVRManager::Msg_UpdateDisplayInfo", OTHER);
95
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
96
0
        mozilla::ipc::LogicError("Transition error");
97
0
    }
98
0
99
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
100
0
    return sendok__;
101
0
}
102
103
auto PVRManagerParent::SendDispatchSubmitFrameResult(
104
        const uint32_t& aDisplayID,
105
        const VRSubmitFrameResultInfo& aResult) -> bool
106
0
{
107
0
    IPC::Message* msg__ = PVRManager::Msg_DispatchSubmitFrameResult(MSG_ROUTING_CONTROL);
108
0
109
0
    WriteIPDLParam(msg__, this, aDisplayID);
110
0
    // Sentinel = 'aDisplayID'
111
0
    (msg__)->WriteSentinel(2139184880);
112
0
    WriteIPDLParam(msg__, this, aResult);
113
0
    // Sentinel = 'aResult'
114
0
    (msg__)->WriteSentinel(3888726089);
115
0
116
0
117
0
118
0
119
0
    if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
120
0
        mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
121
0
    }
122
0
    AUTO_PROFILER_LABEL("PVRManager::Msg_DispatchSubmitFrameResult", OTHER);
123
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
124
0
        mozilla::ipc::LogicError("Transition error");
125
0
    }
126
0
127
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
128
0
    return sendok__;
129
0
}
130
131
auto PVRManagerParent::SendGamepadUpdate(const GamepadChangeEvent& aGamepadEvent) -> bool
132
0
{
133
0
    IPC::Message* msg__ = PVRManager::Msg_GamepadUpdate(MSG_ROUTING_CONTROL);
134
0
135
0
    WriteIPDLParam(msg__, this, aGamepadEvent);
136
0
    // Sentinel = 'aGamepadEvent'
137
0
    (msg__)->WriteSentinel(1167032459);
138
0
139
0
140
0
141
0
142
0
    if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
143
0
        mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
144
0
    }
145
0
    AUTO_PROFILER_LABEL("PVRManager::Msg_GamepadUpdate", OTHER);
146
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
147
0
        mozilla::ipc::LogicError("Transition error");
148
0
    }
149
0
150
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
151
0
    return sendok__;
152
0
}
153
154
auto PVRManagerParent::SendReplyGamepadVibrateHaptic(const uint32_t& aPromiseID) -> bool
155
0
{
156
0
    IPC::Message* msg__ = PVRManager::Msg_ReplyGamepadVibrateHaptic(MSG_ROUTING_CONTROL);
157
0
158
0
    WriteIPDLParam(msg__, this, aPromiseID);
159
0
    // Sentinel = 'aPromiseID'
160
0
    (msg__)->WriteSentinel(1396174117);
161
0
162
0
163
0
164
0
165
0
    if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
166
0
        mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
167
0
    }
168
0
    AUTO_PROFILER_LABEL("PVRManager::Msg_ReplyGamepadVibrateHaptic", OTHER);
169
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
170
0
        mozilla::ipc::LogicError("Transition error");
171
0
    }
172
0
173
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
174
0
    return sendok__;
175
0
}
176
177
auto PVRManagerParent::SendReplyCreateVRServiceTestDisplay(
178
        const nsCString& aID,
179
        const uint32_t& aPromiseID,
180
        const uint32_t& aDeviceID) -> bool
181
0
{
182
0
    IPC::Message* msg__ = PVRManager::Msg_ReplyCreateVRServiceTestDisplay(MSG_ROUTING_CONTROL);
183
0
184
0
    WriteIPDLParam(msg__, this, aID);
185
0
    // Sentinel = 'aID'
186
0
    (msg__)->WriteSentinel(2735041849);
187
0
    WriteIPDLParam(msg__, this, aPromiseID);
188
0
    // Sentinel = 'aPromiseID'
189
0
    (msg__)->WriteSentinel(1396174117);
190
0
    WriteIPDLParam(msg__, this, aDeviceID);
191
0
    // Sentinel = 'aDeviceID'
192
0
    (msg__)->WriteSentinel(1963457757);
193
0
194
0
195
0
196
0
197
0
    if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
198
0
        mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
199
0
    }
200
0
    AUTO_PROFILER_LABEL("PVRManager::Msg_ReplyCreateVRServiceTestDisplay", OTHER);
201
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
202
0
        mozilla::ipc::LogicError("Transition error");
203
0
    }
204
0
205
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
206
0
    return sendok__;
207
0
}
208
209
auto PVRManagerParent::SendReplyCreateVRServiceTestController(
210
        const nsCString& aID,
211
        const uint32_t& aPromiseID,
212
        const uint32_t& aDeviceID) -> bool
213
0
{
214
0
    IPC::Message* msg__ = PVRManager::Msg_ReplyCreateVRServiceTestController(MSG_ROUTING_CONTROL);
215
0
216
0
    WriteIPDLParam(msg__, this, aID);
217
0
    // Sentinel = 'aID'
218
0
    (msg__)->WriteSentinel(2735041849);
219
0
    WriteIPDLParam(msg__, this, aPromiseID);
220
0
    // Sentinel = 'aPromiseID'
221
0
    (msg__)->WriteSentinel(1396174117);
222
0
    WriteIPDLParam(msg__, this, aDeviceID);
223
0
    // Sentinel = 'aDeviceID'
224
0
    (msg__)->WriteSentinel(1963457757);
225
0
226
0
227
0
228
0
229
0
    if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
230
0
        mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
231
0
    }
232
0
    AUTO_PROFILER_LABEL("PVRManager::Msg_ReplyCreateVRServiceTestController", 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 PVRManagerParent::RemoveManagee(
242
        int32_t aProtocolId,
243
        IProtocol* aListener) -> void
244
0
{
245
0
    switch (aProtocolId) {
246
0
    case PVRLayerMsgStart:
247
0
        {
248
0
            PVRLayerParent* actor = static_cast<PVRLayerParent*>(aListener);
249
0
            auto& container = mManagedPVRLayerParent;
250
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
251
0
252
0
            (container).RemoveEntry(actor);
253
0
            DeallocPVRLayerParent(actor);
254
0
            return;
255
0
        }
256
0
    default:
257
0
        {
258
0
            FatalError("unreached");
259
0
            return;
260
0
        }
261
0
    }
262
0
}
263
264
auto PVRManagerParent::OnMessageReceived(const Message& msg__) -> PVRManagerParent::Result
265
0
{
266
0
    int32_t route__ = (msg__).routing_id();
267
0
    if ((MSG_ROUTING_CONTROL) != (route__)) {
268
0
        IProtocol* routed__ = Lookup(route__);
269
0
        if ((!(routed__))) {
270
0
            return MsgRouteError;
271
0
        }
272
0
        return (routed__)->OnMessageReceived(msg__);
273
0
    }
274
0
275
0
    switch ((msg__).type()) {
276
0
    case PVRManager::Msg_PVRLayerConstructor__ID:
277
0
        {
278
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
279
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
280
0
            }
281
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_PVRLayerConstructor", OTHER);
282
0
283
0
            PickleIterator iter__(msg__);
284
0
            ActorHandle handle__;
285
0
            PVRLayerParent* actor;
286
0
            uint32_t aDisplayID;
287
0
            uint32_t aGroup;
288
0
289
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) {
290
0
                FatalError("Error deserializing 'ActorHandle'");
291
0
                return MsgValueError;
292
0
            }
293
0
            // Sentinel = 'actor'
294
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
295
0
                mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'");
296
0
                return MsgValueError;
297
0
            }
298
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDisplayID)))))) {
299
0
                FatalError("Error deserializing 'uint32_t'");
300
0
                return MsgValueError;
301
0
            }
302
0
            // Sentinel = 'aDisplayID'
303
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2139184880)))) {
304
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
305
0
                return MsgValueError;
306
0
            }
307
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aGroup)))))) {
308
0
                FatalError("Error deserializing 'uint32_t'");
309
0
                return MsgValueError;
310
0
            }
311
0
            // Sentinel = 'aGroup'
312
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1323513608)))) {
313
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
314
0
                return MsgValueError;
315
0
            }
316
0
            (msg__).EndRead(iter__, (msg__).type());
317
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
318
0
                FatalError("Transition error");
319
0
                return MsgValueError;
320
0
            }
321
0
            actor = AllocPVRLayerParent(aDisplayID, aGroup);
322
0
            if ((!(actor))) {
323
0
                NS_WARNING("Error constructing actor PVRLayerParent");
324
0
                return MsgValueError;
325
0
            }
326
0
            (actor)->SetManagerAndRegister(this, (handle__).mId);
327
0
            (mManagedPVRLayerParent).PutEntry(actor);
328
0
            (actor)->mLivenessState = mozilla::ipc::LivenessState::Start;
329
0
330
0
            if ((!(RecvPVRLayerConstructor(actor, aDisplayID, aGroup)))) {
331
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
332
0
                // Error handled in mozilla::ipc::IPCResult
333
0
                return MsgProcessingError;
334
0
            }
335
0
336
0
            return MsgProcessed;
337
0
        }
338
0
    case PVRManager::Msg_RefreshDisplays__ID:
339
0
        {
340
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
341
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
342
0
            }
343
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_RefreshDisplays", OTHER);
344
0
345
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
346
0
                FatalError("Transition error");
347
0
                return MsgValueError;
348
0
            }
349
0
            if ((!(RecvRefreshDisplays()))) {
350
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
351
0
                // Error handled in mozilla::ipc::IPCResult
352
0
                return MsgProcessingError;
353
0
            }
354
0
355
0
            return MsgProcessed;
356
0
        }
357
0
    case PVRManager::Msg_ResetSensor__ID:
358
0
        {
359
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
360
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
361
0
            }
362
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_ResetSensor", OTHER);
363
0
364
0
            PickleIterator iter__(msg__);
365
0
            uint32_t aDisplayID;
366
0
367
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDisplayID)))))) {
368
0
                FatalError("Error deserializing 'uint32_t'");
369
0
                return MsgValueError;
370
0
            }
371
0
            // Sentinel = 'aDisplayID'
372
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2139184880)))) {
373
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
374
0
                return MsgValueError;
375
0
            }
376
0
            (msg__).EndRead(iter__, (msg__).type());
377
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
378
0
                FatalError("Transition error");
379
0
                return MsgValueError;
380
0
            }
381
0
            if ((!(RecvResetSensor(aDisplayID)))) {
382
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
383
0
                // Error handled in mozilla::ipc::IPCResult
384
0
                return MsgProcessingError;
385
0
            }
386
0
387
0
            return MsgProcessed;
388
0
        }
389
0
    case PVRManager::Msg_SetGroupMask__ID:
390
0
        {
391
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
392
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
393
0
            }
394
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_SetGroupMask", OTHER);
395
0
396
0
            PickleIterator iter__(msg__);
397
0
            uint32_t aDisplayID;
398
0
            uint32_t aGroupMask;
399
0
400
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDisplayID)))))) {
401
0
                FatalError("Error deserializing 'uint32_t'");
402
0
                return MsgValueError;
403
0
            }
404
0
            // Sentinel = 'aDisplayID'
405
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2139184880)))) {
406
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
407
0
                return MsgValueError;
408
0
            }
409
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aGroupMask)))))) {
410
0
                FatalError("Error deserializing 'uint32_t'");
411
0
                return MsgValueError;
412
0
            }
413
0
            // Sentinel = 'aGroupMask'
414
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4157390796)))) {
415
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
416
0
                return MsgValueError;
417
0
            }
418
0
            (msg__).EndRead(iter__, (msg__).type());
419
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
420
0
                FatalError("Transition error");
421
0
                return MsgValueError;
422
0
            }
423
0
            if ((!(RecvSetGroupMask(aDisplayID, aGroupMask)))) {
424
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
425
0
                // Error handled in mozilla::ipc::IPCResult
426
0
                return MsgProcessingError;
427
0
            }
428
0
429
0
            return MsgProcessed;
430
0
        }
431
0
    case PVRManager::Msg_SetHaveEventListener__ID:
432
0
        {
433
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
434
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
435
0
            }
436
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_SetHaveEventListener", OTHER);
437
0
438
0
            PickleIterator iter__(msg__);
439
0
            bool aHaveEventListener;
440
0
441
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aHaveEventListener)))))) {
442
0
                FatalError("Error deserializing 'bool'");
443
0
                return MsgValueError;
444
0
            }
445
0
            // Sentinel = 'aHaveEventListener'
446
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3921043303)))) {
447
0
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
448
0
                return MsgValueError;
449
0
            }
450
0
            (msg__).EndRead(iter__, (msg__).type());
451
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
452
0
                FatalError("Transition error");
453
0
                return MsgValueError;
454
0
            }
455
0
            if ((!(RecvSetHaveEventListener(aHaveEventListener)))) {
456
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
457
0
                // Error handled in mozilla::ipc::IPCResult
458
0
                return MsgProcessingError;
459
0
            }
460
0
461
0
            return MsgProcessed;
462
0
        }
463
0
    case PVRManager::Msg_ControllerListenerAdded__ID:
464
0
        {
465
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
466
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
467
0
            }
468
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_ControllerListenerAdded", OTHER);
469
0
470
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
471
0
                FatalError("Transition error");
472
0
                return MsgValueError;
473
0
            }
474
0
            if ((!(RecvControllerListenerAdded()))) {
475
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
476
0
                // Error handled in mozilla::ipc::IPCResult
477
0
                return MsgProcessingError;
478
0
            }
479
0
480
0
            return MsgProcessed;
481
0
        }
482
0
    case PVRManager::Msg_ControllerListenerRemoved__ID:
483
0
        {
484
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
485
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
486
0
            }
487
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_ControllerListenerRemoved", OTHER);
488
0
489
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
490
0
                FatalError("Transition error");
491
0
                return MsgValueError;
492
0
            }
493
0
            if ((!(RecvControllerListenerRemoved()))) {
494
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
495
0
                // Error handled in mozilla::ipc::IPCResult
496
0
                return MsgProcessingError;
497
0
            }
498
0
499
0
            return MsgProcessed;
500
0
        }
501
0
    case PVRManager::Msg_VibrateHaptic__ID:
502
0
        {
503
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
504
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
505
0
            }
506
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_VibrateHaptic", OTHER);
507
0
508
0
            PickleIterator iter__(msg__);
509
0
            uint32_t aControllerIdx;
510
0
            uint32_t aHapticIndex;
511
0
            double aIntensity;
512
0
            double aDuration;
513
0
            uint32_t aPromiseID;
514
0
515
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aControllerIdx)))))) {
516
0
                FatalError("Error deserializing 'uint32_t'");
517
0
                return MsgValueError;
518
0
            }
519
0
            // Sentinel = 'aControllerIdx'
520
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1525026068)))) {
521
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
522
0
                return MsgValueError;
523
0
            }
524
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aHapticIndex)))))) {
525
0
                FatalError("Error deserializing 'uint32_t'");
526
0
                return MsgValueError;
527
0
            }
528
0
            // Sentinel = 'aHapticIndex'
529
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3997306204)))) {
530
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
531
0
                return MsgValueError;
532
0
            }
533
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aIntensity)))))) {
534
0
                FatalError("Error deserializing 'double'");
535
0
                return MsgValueError;
536
0
            }
537
0
            // Sentinel = 'aIntensity'
538
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 701797642)))) {
539
0
                mozilla::ipc::SentinelReadError("Error deserializing 'double'");
540
0
                return MsgValueError;
541
0
            }
542
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDuration)))))) {
543
0
                FatalError("Error deserializing 'double'");
544
0
                return MsgValueError;
545
0
            }
546
0
            // Sentinel = 'aDuration'
547
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3213285508)))) {
548
0
                mozilla::ipc::SentinelReadError("Error deserializing 'double'");
549
0
                return MsgValueError;
550
0
            }
551
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aPromiseID)))))) {
552
0
                FatalError("Error deserializing 'uint32_t'");
553
0
                return MsgValueError;
554
0
            }
555
0
            // Sentinel = 'aPromiseID'
556
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1396174117)))) {
557
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
558
0
                return MsgValueError;
559
0
            }
560
0
            (msg__).EndRead(iter__, (msg__).type());
561
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
562
0
                FatalError("Transition error");
563
0
                return MsgValueError;
564
0
            }
565
0
            if ((!(RecvVibrateHaptic(aControllerIdx, aHapticIndex, aIntensity, aDuration, aPromiseID)))) {
566
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
567
0
                // Error handled in mozilla::ipc::IPCResult
568
0
                return MsgProcessingError;
569
0
            }
570
0
571
0
            return MsgProcessed;
572
0
        }
573
0
    case PVRManager::Msg_StopVibrateHaptic__ID:
574
0
        {
575
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
576
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
577
0
            }
578
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_StopVibrateHaptic", OTHER);
579
0
580
0
            PickleIterator iter__(msg__);
581
0
            uint32_t aControllerIdx;
582
0
583
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aControllerIdx)))))) {
584
0
                FatalError("Error deserializing 'uint32_t'");
585
0
                return MsgValueError;
586
0
            }
587
0
            // Sentinel = 'aControllerIdx'
588
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1525026068)))) {
589
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
590
0
                return MsgValueError;
591
0
            }
592
0
            (msg__).EndRead(iter__, (msg__).type());
593
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
594
0
                FatalError("Transition error");
595
0
                return MsgValueError;
596
0
            }
597
0
            if ((!(RecvStopVibrateHaptic(aControllerIdx)))) {
598
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
599
0
                // Error handled in mozilla::ipc::IPCResult
600
0
                return MsgProcessingError;
601
0
            }
602
0
603
0
            return MsgProcessed;
604
0
        }
605
0
    case PVRManager::Msg_CreateVRTestSystem__ID:
606
0
        {
607
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
608
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
609
0
            }
610
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_CreateVRTestSystem", OTHER);
611
0
612
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
613
0
                FatalError("Transition error");
614
0
                return MsgValueError;
615
0
            }
616
0
            if ((!(RecvCreateVRTestSystem()))) {
617
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
618
0
                // Error handled in mozilla::ipc::IPCResult
619
0
                return MsgProcessingError;
620
0
            }
621
0
622
0
            return MsgProcessed;
623
0
        }
624
0
    case PVRManager::Msg_CreateVRServiceTestDisplay__ID:
625
0
        {
626
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
627
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
628
0
            }
629
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_CreateVRServiceTestDisplay", OTHER);
630
0
631
0
            PickleIterator iter__(msg__);
632
0
            nsCString aID;
633
0
            uint32_t aPromiseID;
634
0
635
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aID)))))) {
636
0
                FatalError("Error deserializing 'nsCString'");
637
0
                return MsgValueError;
638
0
            }
639
0
            // Sentinel = 'aID'
640
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2735041849)))) {
641
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
642
0
                return MsgValueError;
643
0
            }
644
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aPromiseID)))))) {
645
0
                FatalError("Error deserializing 'uint32_t'");
646
0
                return MsgValueError;
647
0
            }
648
0
            // Sentinel = 'aPromiseID'
649
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1396174117)))) {
650
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
651
0
                return MsgValueError;
652
0
            }
653
0
            (msg__).EndRead(iter__, (msg__).type());
654
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
655
0
                FatalError("Transition error");
656
0
                return MsgValueError;
657
0
            }
658
0
            if ((!(RecvCreateVRServiceTestDisplay(aID, aPromiseID)))) {
659
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
660
0
                // Error handled in mozilla::ipc::IPCResult
661
0
                return MsgProcessingError;
662
0
            }
663
0
664
0
            return MsgProcessed;
665
0
        }
666
0
    case PVRManager::Msg_CreateVRServiceTestController__ID:
667
0
        {
668
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
669
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
670
0
            }
671
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_CreateVRServiceTestController", OTHER);
672
0
673
0
            PickleIterator iter__(msg__);
674
0
            nsCString aID;
675
0
            uint32_t aPromiseID;
676
0
677
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aID)))))) {
678
0
                FatalError("Error deserializing 'nsCString'");
679
0
                return MsgValueError;
680
0
            }
681
0
            // Sentinel = 'aID'
682
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2735041849)))) {
683
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
684
0
                return MsgValueError;
685
0
            }
686
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aPromiseID)))))) {
687
0
                FatalError("Error deserializing 'uint32_t'");
688
0
                return MsgValueError;
689
0
            }
690
0
            // Sentinel = 'aPromiseID'
691
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1396174117)))) {
692
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
693
0
                return MsgValueError;
694
0
            }
695
0
            (msg__).EndRead(iter__, (msg__).type());
696
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
697
0
                FatalError("Transition error");
698
0
                return MsgValueError;
699
0
            }
700
0
            if ((!(RecvCreateVRServiceTestController(aID, aPromiseID)))) {
701
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
702
0
                // Error handled in mozilla::ipc::IPCResult
703
0
                return MsgProcessingError;
704
0
            }
705
0
706
0
            return MsgProcessed;
707
0
        }
708
0
    case PVRManager::Msg_SetDisplayInfoToMockDisplay__ID:
709
0
        {
710
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
711
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
712
0
            }
713
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_SetDisplayInfoToMockDisplay", OTHER);
714
0
715
0
            PickleIterator iter__(msg__);
716
0
            uint32_t aDeviceID;
717
0
            VRDisplayInfo aDisplayInfo;
718
0
719
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDeviceID)))))) {
720
0
                FatalError("Error deserializing 'uint32_t'");
721
0
                return MsgValueError;
722
0
            }
723
0
            // Sentinel = 'aDeviceID'
724
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1963457757)))) {
725
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
726
0
                return MsgValueError;
727
0
            }
728
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDisplayInfo)))))) {
729
0
                FatalError("Error deserializing 'VRDisplayInfo'");
730
0
                return MsgValueError;
731
0
            }
732
0
            // Sentinel = 'aDisplayInfo'
733
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2651062689)))) {
734
0
                mozilla::ipc::SentinelReadError("Error deserializing 'VRDisplayInfo'");
735
0
                return MsgValueError;
736
0
            }
737
0
            (msg__).EndRead(iter__, (msg__).type());
738
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
739
0
                FatalError("Transition error");
740
0
                return MsgValueError;
741
0
            }
742
0
            if ((!(RecvSetDisplayInfoToMockDisplay(aDeviceID, aDisplayInfo)))) {
743
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
744
0
                // Error handled in mozilla::ipc::IPCResult
745
0
                return MsgProcessingError;
746
0
            }
747
0
748
0
            return MsgProcessed;
749
0
        }
750
0
    case PVRManager::Msg_SetSensorStateToMockDisplay__ID:
751
0
        {
752
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
753
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
754
0
            }
755
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_SetSensorStateToMockDisplay", OTHER);
756
0
757
0
            PickleIterator iter__(msg__);
758
0
            uint32_t aDeviceID;
759
0
            VRHMDSensorState aSensorState;
760
0
761
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDeviceID)))))) {
762
0
                FatalError("Error deserializing 'uint32_t'");
763
0
                return MsgValueError;
764
0
            }
765
0
            // Sentinel = 'aDeviceID'
766
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1963457757)))) {
767
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
768
0
                return MsgValueError;
769
0
            }
770
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aSensorState)))))) {
771
0
                FatalError("Error deserializing 'VRHMDSensorState'");
772
0
                return MsgValueError;
773
0
            }
774
0
            // Sentinel = 'aSensorState'
775
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3074518118)))) {
776
0
                mozilla::ipc::SentinelReadError("Error deserializing 'VRHMDSensorState'");
777
0
                return MsgValueError;
778
0
            }
779
0
            (msg__).EndRead(iter__, (msg__).type());
780
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
781
0
                FatalError("Transition error");
782
0
                return MsgValueError;
783
0
            }
784
0
            if ((!(RecvSetSensorStateToMockDisplay(aDeviceID, aSensorState)))) {
785
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
786
0
                // Error handled in mozilla::ipc::IPCResult
787
0
                return MsgProcessingError;
788
0
            }
789
0
790
0
            return MsgProcessed;
791
0
        }
792
0
    case PVRManager::Msg_NewButtonEventToMockController__ID:
793
0
        {
794
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
795
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
796
0
            }
797
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_NewButtonEventToMockController", OTHER);
798
0
799
0
            PickleIterator iter__(msg__);
800
0
            uint32_t aDeviceID;
801
0
            long aButton;
802
0
            bool aPressed;
803
0
804
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDeviceID)))))) {
805
0
                FatalError("Error deserializing 'uint32_t'");
806
0
                return MsgValueError;
807
0
            }
808
0
            // Sentinel = 'aDeviceID'
809
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1963457757)))) {
810
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
811
0
                return MsgValueError;
812
0
            }
813
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aButton)))))) {
814
0
                FatalError("Error deserializing 'long'");
815
0
                return MsgValueError;
816
0
            }
817
0
            // Sentinel = 'aButton'
818
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1126532398)))) {
819
0
                mozilla::ipc::SentinelReadError("Error deserializing 'long'");
820
0
                return MsgValueError;
821
0
            }
822
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aPressed)))))) {
823
0
                FatalError("Error deserializing 'bool'");
824
0
                return MsgValueError;
825
0
            }
826
0
            // Sentinel = 'aPressed'
827
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 511193633)))) {
828
0
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
829
0
                return MsgValueError;
830
0
            }
831
0
            (msg__).EndRead(iter__, (msg__).type());
832
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
833
0
                FatalError("Transition error");
834
0
                return MsgValueError;
835
0
            }
836
0
            if ((!(RecvNewButtonEventToMockController(aDeviceID, aButton, aPressed)))) {
837
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
838
0
                // Error handled in mozilla::ipc::IPCResult
839
0
                return MsgProcessingError;
840
0
            }
841
0
842
0
            return MsgProcessed;
843
0
        }
844
0
    case PVRManager::Msg_NewAxisMoveEventToMockController__ID:
845
0
        {
846
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
847
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
848
0
            }
849
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_NewAxisMoveEventToMockController", OTHER);
850
0
851
0
            PickleIterator iter__(msg__);
852
0
            uint32_t aDeviceID;
853
0
            long aAxis;
854
0
            double aValue;
855
0
856
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDeviceID)))))) {
857
0
                FatalError("Error deserializing 'uint32_t'");
858
0
                return MsgValueError;
859
0
            }
860
0
            // Sentinel = 'aDeviceID'
861
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1963457757)))) {
862
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
863
0
                return MsgValueError;
864
0
            }
865
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aAxis)))))) {
866
0
                FatalError("Error deserializing 'long'");
867
0
                return MsgValueError;
868
0
            }
869
0
            // Sentinel = 'aAxis'
870
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1730285743)))) {
871
0
                mozilla::ipc::SentinelReadError("Error deserializing 'long'");
872
0
                return MsgValueError;
873
0
            }
874
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aValue)))))) {
875
0
                FatalError("Error deserializing 'double'");
876
0
                return MsgValueError;
877
0
            }
878
0
            // Sentinel = 'aValue'
879
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2522186438)))) {
880
0
                mozilla::ipc::SentinelReadError("Error deserializing 'double'");
881
0
                return MsgValueError;
882
0
            }
883
0
            (msg__).EndRead(iter__, (msg__).type());
884
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
885
0
                FatalError("Transition error");
886
0
                return MsgValueError;
887
0
            }
888
0
            if ((!(RecvNewAxisMoveEventToMockController(aDeviceID, aAxis, aValue)))) {
889
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
890
0
                // Error handled in mozilla::ipc::IPCResult
891
0
                return MsgProcessingError;
892
0
            }
893
0
894
0
            return MsgProcessed;
895
0
        }
896
0
    case PVRManager::Msg_NewPoseMoveToMockController__ID:
897
0
        {
898
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
899
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
900
0
            }
901
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_NewPoseMoveToMockController", OTHER);
902
0
903
0
            PickleIterator iter__(msg__);
904
0
            uint32_t aDeviceID;
905
0
            GamepadPoseState aPose;
906
0
907
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDeviceID)))))) {
908
0
                FatalError("Error deserializing 'uint32_t'");
909
0
                return MsgValueError;
910
0
            }
911
0
            // Sentinel = 'aDeviceID'
912
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1963457757)))) {
913
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
914
0
                return MsgValueError;
915
0
            }
916
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aPose)))))) {
917
0
                FatalError("Error deserializing 'GamepadPoseState'");
918
0
                return MsgValueError;
919
0
            }
920
0
            // Sentinel = 'aPose'
921
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2231333587)))) {
922
0
                mozilla::ipc::SentinelReadError("Error deserializing 'GamepadPoseState'");
923
0
                return MsgValueError;
924
0
            }
925
0
            (msg__).EndRead(iter__, (msg__).type());
926
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
927
0
                FatalError("Transition error");
928
0
                return MsgValueError;
929
0
            }
930
0
            if ((!(RecvNewPoseMoveToMockController(aDeviceID, aPose)))) {
931
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
932
0
                // Error handled in mozilla::ipc::IPCResult
933
0
                return MsgProcessingError;
934
0
            }
935
0
936
0
            return MsgProcessed;
937
0
        }
938
0
    case PVRManager::Msg_StartVRNavigation__ID:
939
0
        {
940
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
941
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
942
0
            }
943
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_StartVRNavigation", OTHER);
944
0
945
0
            PickleIterator iter__(msg__);
946
0
            uint32_t aDeviceID;
947
0
948
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDeviceID)))))) {
949
0
                FatalError("Error deserializing 'uint32_t'");
950
0
                return MsgValueError;
951
0
            }
952
0
            // Sentinel = 'aDeviceID'
953
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1963457757)))) {
954
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
955
0
                return MsgValueError;
956
0
            }
957
0
            (msg__).EndRead(iter__, (msg__).type());
958
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
959
0
                FatalError("Transition error");
960
0
                return MsgValueError;
961
0
            }
962
0
            if ((!(RecvStartVRNavigation(aDeviceID)))) {
963
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
964
0
                // Error handled in mozilla::ipc::IPCResult
965
0
                return MsgProcessingError;
966
0
            }
967
0
968
0
            return MsgProcessed;
969
0
        }
970
0
    case PVRManager::Msg_StopVRNavigation__ID:
971
0
        {
972
0
            if (mozilla::ipc::LoggingEnabledFor("PVRManagerParent")) {
973
0
                mozilla::ipc::LogMessageForProtocol("PVRManagerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
974
0
            }
975
0
            AUTO_PROFILER_LABEL("PVRManager::Msg_StopVRNavigation", OTHER);
976
0
977
0
            PickleIterator iter__(msg__);
978
0
            uint32_t aDeviceID;
979
0
            TimeDuration aDuration;
980
0
981
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDeviceID)))))) {
982
0
                FatalError("Error deserializing 'uint32_t'");
983
0
                return MsgValueError;
984
0
            }
985
0
            // Sentinel = 'aDeviceID'
986
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1963457757)))) {
987
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
988
0
                return MsgValueError;
989
0
            }
990
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDuration)))))) {
991
0
                FatalError("Error deserializing 'TimeDuration'");
992
0
                return MsgValueError;
993
0
            }
994
0
            // Sentinel = 'aDuration'
995
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3213285508)))) {
996
0
                mozilla::ipc::SentinelReadError("Error deserializing 'TimeDuration'");
997
0
                return MsgValueError;
998
0
            }
999
0
            (msg__).EndRead(iter__, (msg__).type());
1000
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1001
0
                FatalError("Transition error");
1002
0
                return MsgValueError;
1003
0
            }
1004
0
            if ((!(RecvStopVRNavigation(aDeviceID, aDuration)))) {
1005
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1006
0
                // Error handled in mozilla::ipc::IPCResult
1007
0
                return MsgProcessingError;
1008
0
            }
1009
0
1010
0
            return MsgProcessed;
1011
0
        }
1012
0
    case PVRManager::Reply___delete____ID:
1013
0
        {
1014
0
            return MsgProcessed;
1015
0
        }
1016
0
    default:
1017
0
        {
1018
0
            return MsgNotKnown;
1019
0
        }
1020
0
    case SHMEM_CREATED_MESSAGE_TYPE:
1021
0
        {
1022
0
            if ((!(ShmemCreated(msg__)))) {
1023
0
                return MsgPayloadError;
1024
0
            }
1025
0
            return MsgProcessed;
1026
0
        }
1027
0
    case SHMEM_DESTROYED_MESSAGE_TYPE:
1028
0
        {
1029
0
            if ((!(ShmemDestroyed(msg__)))) {
1030
0
                return MsgPayloadError;
1031
0
            }
1032
0
            return MsgProcessed;
1033
0
        }
1034
0
    }
1035
0
}
1036
1037
auto PVRManagerParent::OnMessageReceived(
1038
        const Message& msg__,
1039
        Message*& reply__) -> PVRManagerParent::Result
1040
0
{
1041
0
    int32_t route__ = (msg__).routing_id();
1042
0
    if ((MSG_ROUTING_CONTROL) != (route__)) {
1043
0
        IProtocol* routed__ = Lookup(route__);
1044
0
        if ((!(routed__))) {
1045
0
            return MsgRouteError;
1046
0
        }
1047
0
        return (routed__)->OnMessageReceived(msg__, reply__);
1048
0
    }
1049
0
1050
0
    return MsgNotKnown;
1051
0
}
1052
1053
auto PVRManagerParent::OnCallReceived(
1054
        const Message& msg__,
1055
        Message*& reply__) -> PVRManagerParent::Result
1056
0
{
1057
0
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
1058
0
    return MsgNotKnown;
1059
0
}
1060
1061
auto PVRManagerParent::GetProtocolTypeId() -> int32_t
1062
0
{
1063
0
    return PVRManagerMsgStart;
1064
0
}
1065
1066
auto PVRManagerParent::OnChannelClose() -> void
1067
0
{
1068
0
    DestroySubtree(NormalShutdown);
1069
0
    DeallocSubtree();
1070
0
    DeallocShmems();
1071
0
    DeallocPVRManagerParent();
1072
0
}
1073
1074
auto PVRManagerParent::OnChannelError() -> void
1075
0
{
1076
0
    DestroySubtree(AbnormalShutdown);
1077
0
    DeallocSubtree();
1078
0
    DeallocShmems();
1079
0
    DeallocPVRManagerParent();
1080
0
}
1081
1082
auto PVRManagerParent::DestroySubtree(ActorDestroyReason why) -> void
1083
0
{
1084
0
    ActorDestroyReason subtreewhy = (((why) == (Deletion)) || ((why) == (FailedConstructor)) ? AncestorDeletion : why);
1085
0
1086
0
    {
1087
0
        // Recursively shutting down PVRLayer kids
1088
0
        nsTArray<PVRLayerParent*> kids;
1089
0
        // Accumulate kids into a stable structure to iterate over
1090
0
        ManagedPVRLayerParent(kids);
1091
0
        for (auto& kid : kids) {
1092
0
            // Guarding against a child removing a sibling from the list during the iteration.
1093
0
            if ((mManagedPVRLayerParent).Contains(kid)) {
1094
0
                (kid)->DestroySubtree(subtreewhy);
1095
0
            }
1096
0
        }
1097
0
    }
1098
0
1099
0
    // Reject owning pending responses.
1100
0
    (GetIPCChannel())->RejectPendingResponsesForActor(this);
1101
0
1102
0
    // Finally, destroy "us".
1103
0
    ActorDestroy(why);
1104
0
}
1105
1106
auto PVRManagerParent::DeallocSubtree() -> void
1107
0
{
1108
0
    {
1109
0
        // Recursively deleting PVRLayer kids
1110
0
        for (auto iter = (mManagedPVRLayerParent).Iter(); (!((iter).Done())); (iter).Next()) {
1111
0
            (((iter).Get())->GetKey())->DeallocSubtree();
1112
0
        }
1113
0
1114
0
        for (auto iter = (mManagedPVRLayerParent).Iter(); (!((iter).Done())); (iter).Next()) {
1115
0
            DeallocPVRLayerParent(((iter).Get())->GetKey());
1116
0
        }
1117
0
        (mManagedPVRLayerParent).Clear();
1118
0
    }
1119
0
}
1120
1121
auto PVRManagerParent::DeallocPVRManagerParent() -> void
1122
0
{
1123
0
}
1124
1125
1126
1127
} // namespace gfx
1128
} // namespace mozilla
1129
namespace mozilla {
1130
namespace ipc {
1131
auto IPDLParamTraits<mozilla::gfx::PVRManagerParent>::Write(
1132
        IPC::Message* aMsg,
1133
        mozilla::ipc::IProtocol* aActor,
1134
        const paramType& aVar) -> void
1135
0
{
1136
0
    int32_t id;
1137
0
    if ((!(aVar))) {
1138
0
        id = 0;
1139
0
    }
1140
0
    else {
1141
0
        id = (aVar)->Id();
1142
0
        if ((1) == (id)) {
1143
0
            (aActor)->FatalError("actor has been |delete|d");
1144
0
        }
1145
0
    }
1146
0
    WriteIPDLParam(aMsg, aActor, id);
1147
0
}
1148
1149
auto IPDLParamTraits<mozilla::gfx::PVRManagerParent>::Read(
1150
        const IPC::Message* aMsg,
1151
        PickleIterator* aIter,
1152
        mozilla::ipc::IProtocol* aActor,
1153
        paramType* aVar) -> bool
1154
0
{
1155
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PVRManager", PVRManagerMsgStart);
1156
0
    if ((actor).isNothing()) {
1157
0
        return false;
1158
0
    }
1159
0
1160
0
    (*(aVar)) = static_cast<mozilla::gfx::PVRManagerParent*>((actor).value());
1161
0
    return true;
1162
0
}
1163
1164
} // namespace ipc
1165
} // namespace mozilla