Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PUiCompositorControllerParent.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/layers/PUiCompositorControllerParent.h"
8
9
10
#include "nsIFile.h"
11
#include "GeckoProfiler.h"
12
13
namespace mozilla {
14
namespace layers {
15
16
17
auto PUiCompositorControllerParent::ActorDestroy(ActorDestroyReason aWhy) -> void
18
0
{
19
0
}
20
21
auto PUiCompositorControllerParent::ProcessingError(
22
        Result aCode,
23
        const char* aReason) -> void
24
0
{
25
0
}
26
27
auto PUiCompositorControllerParent::ShouldContinueFromReplyTimeout() -> bool
28
0
{
29
0
    return true;
30
0
}
31
32
auto PUiCompositorControllerParent::EnteredCxxStack() -> void
33
0
{
34
0
}
35
36
auto PUiCompositorControllerParent::ExitedCxxStack() -> void
37
0
{
38
0
}
39
40
auto PUiCompositorControllerParent::EnteredCall() -> void
41
0
{
42
0
}
43
44
auto PUiCompositorControllerParent::ExitedCall() -> void
45
0
{
46
0
}
47
48
MOZ_IMPLICIT PUiCompositorControllerParent::PUiCompositorControllerParent() :
49
    mozilla::ipc::IToplevelProtocol("PUiCompositorControllerParent", PUiCompositorControllerMsgStart, mozilla::ipc::ParentSide),
50
    mLivenessState(mozilla::ipc::LivenessState::Start)
51
0
{
52
0
    MOZ_COUNT_CTOR(PUiCompositorControllerParent);
53
0
}
54
55
PUiCompositorControllerParent::~PUiCompositorControllerParent()
56
0
{
57
0
    MOZ_COUNT_DTOR(PUiCompositorControllerParent);
58
0
}
59
60
auto PUiCompositorControllerParent::SendToolbarAnimatorMessageFromCompositor(const int32_t& aMessage) -> bool
61
0
{
62
0
    IPC::Message* msg__ = PUiCompositorController::Msg_ToolbarAnimatorMessageFromCompositor(MSG_ROUTING_CONTROL);
63
0
64
0
    WriteIPDLParam(msg__, this, aMessage);
65
0
    // Sentinel = 'aMessage'
66
0
    (msg__)->WriteSentinel(3453110902);
67
0
68
0
69
0
70
0
71
0
    if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
72
0
        mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
73
0
    }
74
0
    AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ToolbarAnimatorMessageFromCompositor", OTHER);
75
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
76
0
        mozilla::ipc::LogicError("Transition error");
77
0
    }
78
0
79
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
80
0
    return sendok__;
81
0
}
82
83
auto PUiCompositorControllerParent::SendRootFrameMetrics(
84
        const ScreenPoint& aScrollOffset,
85
        const CSSToScreenScale& aZoom) -> bool
86
0
{
87
0
    IPC::Message* msg__ = PUiCompositorController::Msg_RootFrameMetrics(MSG_ROUTING_CONTROL);
88
0
89
0
    WriteIPDLParam(msg__, this, aScrollOffset);
90
0
    // Sentinel = 'aScrollOffset'
91
0
    (msg__)->WriteSentinel(380967954);
92
0
    WriteIPDLParam(msg__, this, aZoom);
93
0
    // Sentinel = 'aZoom'
94
0
    (msg__)->WriteSentinel(3288940929);
95
0
96
0
97
0
98
0
99
0
    if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
100
0
        mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
101
0
    }
102
0
    AUTO_PROFILER_LABEL("PUiCompositorController::Msg_RootFrameMetrics", OTHER);
103
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
104
0
        mozilla::ipc::LogicError("Transition error");
105
0
    }
106
0
107
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
108
0
    return sendok__;
109
0
}
110
111
auto PUiCompositorControllerParent::SendScreenPixels(
112
        Shmem& aMem,
113
        const ScreenIntSize& aSize) -> bool
114
0
{
115
0
    IPC::Message* msg__ = PUiCompositorController::Msg_ScreenPixels(MSG_ROUTING_CONTROL);
116
0
117
0
    WriteIPDLParam(msg__, this, aMem);
118
0
    // Sentinel = 'aMem'
119
0
    (msg__)->WriteSentinel(3574578916);
120
0
    WriteIPDLParam(msg__, this, aSize);
121
0
    // Sentinel = 'aSize'
122
0
    (msg__)->WriteSentinel(2556665555);
123
0
124
0
125
0
126
0
127
0
    if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
128
0
        mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
129
0
    }
130
0
    AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ScreenPixels", OTHER);
131
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
132
0
        mozilla::ipc::LogicError("Transition error");
133
0
    }
134
0
135
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
136
0
    return sendok__;
137
0
}
138
139
auto PUiCompositorControllerParent::RemoveManagee(
140
        int32_t aProtocolId,
141
        IProtocol* aListener) -> void
142
0
{
143
0
    FatalError("unreached");
144
0
    return;
145
0
}
146
147
auto PUiCompositorControllerParent::OnMessageReceived(const Message& msg__) -> PUiCompositorControllerParent::Result
148
0
{
149
0
    switch ((msg__).type()) {
150
0
    case PUiCompositorController::Msg_InvalidateAndRender__ID:
151
0
        {
152
0
            if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
153
0
                mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
154
0
            }
155
0
            AUTO_PROFILER_LABEL("PUiCompositorController::Msg_InvalidateAndRender", OTHER);
156
0
157
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
158
0
                FatalError("Transition error");
159
0
                return MsgValueError;
160
0
            }
161
0
            if ((!(RecvInvalidateAndRender()))) {
162
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
163
0
                // Error handled in mozilla::ipc::IPCResult
164
0
                return MsgProcessingError;
165
0
            }
166
0
167
0
            return MsgProcessed;
168
0
        }
169
0
    case PUiCompositorController::Msg_MaxToolbarHeight__ID:
170
0
        {
171
0
            if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
172
0
                mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
173
0
            }
174
0
            AUTO_PROFILER_LABEL("PUiCompositorController::Msg_MaxToolbarHeight", OTHER);
175
0
176
0
            PickleIterator iter__(msg__);
177
0
            int32_t aHeight;
178
0
179
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aHeight)))))) {
180
0
                FatalError("Error deserializing 'int32_t'");
181
0
                return MsgValueError;
182
0
            }
183
0
            // Sentinel = 'aHeight'
184
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3588433859)))) {
185
0
                mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'");
186
0
                return MsgValueError;
187
0
            }
188
0
            (msg__).EndRead(iter__, (msg__).type());
189
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
190
0
                FatalError("Transition error");
191
0
                return MsgValueError;
192
0
            }
193
0
            if ((!(RecvMaxToolbarHeight(aHeight)))) {
194
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
195
0
                // Error handled in mozilla::ipc::IPCResult
196
0
                return MsgProcessingError;
197
0
            }
198
0
199
0
            return MsgProcessed;
200
0
        }
201
0
    case PUiCompositorController::Msg_Pinned__ID:
202
0
        {
203
0
            if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
204
0
                mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
205
0
            }
206
0
            AUTO_PROFILER_LABEL("PUiCompositorController::Msg_Pinned", OTHER);
207
0
208
0
            PickleIterator iter__(msg__);
209
0
            bool aPinned;
210
0
            int32_t aReason;
211
0
212
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aPinned)))))) {
213
0
                FatalError("Error deserializing 'bool'");
214
0
                return MsgValueError;
215
0
            }
216
0
            // Sentinel = 'aPinned'
217
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1467325352)))) {
218
0
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
219
0
                return MsgValueError;
220
0
            }
221
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aReason)))))) {
222
0
                FatalError("Error deserializing 'int32_t'");
223
0
                return MsgValueError;
224
0
            }
225
0
            // Sentinel = 'aReason'
226
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 829905706)))) {
227
0
                mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'");
228
0
                return MsgValueError;
229
0
            }
230
0
            (msg__).EndRead(iter__, (msg__).type());
231
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
232
0
                FatalError("Transition error");
233
0
                return MsgValueError;
234
0
            }
235
0
            if ((!(RecvPinned(aPinned, aReason)))) {
236
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
237
0
                // Error handled in mozilla::ipc::IPCResult
238
0
                return MsgProcessingError;
239
0
            }
240
0
241
0
            return MsgProcessed;
242
0
        }
243
0
    case PUiCompositorController::Msg_ToolbarAnimatorMessageFromUI__ID:
244
0
        {
245
0
            if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
246
0
                mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
247
0
            }
248
0
            AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ToolbarAnimatorMessageFromUI", OTHER);
249
0
250
0
            PickleIterator iter__(msg__);
251
0
            int32_t aMessage;
252
0
253
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aMessage)))))) {
254
0
                FatalError("Error deserializing 'int32_t'");
255
0
                return MsgValueError;
256
0
            }
257
0
            // Sentinel = 'aMessage'
258
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3453110902)))) {
259
0
                mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'");
260
0
                return MsgValueError;
261
0
            }
262
0
            (msg__).EndRead(iter__, (msg__).type());
263
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
264
0
                FatalError("Transition error");
265
0
                return MsgValueError;
266
0
            }
267
0
            if ((!(RecvToolbarAnimatorMessageFromUI(aMessage)))) {
268
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
269
0
                // Error handled in mozilla::ipc::IPCResult
270
0
                return MsgProcessingError;
271
0
            }
272
0
273
0
            return MsgProcessed;
274
0
        }
275
0
    case PUiCompositorController::Msg_DefaultClearColor__ID:
276
0
        {
277
0
            if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
278
0
                mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
279
0
            }
280
0
            AUTO_PROFILER_LABEL("PUiCompositorController::Msg_DefaultClearColor", OTHER);
281
0
282
0
            PickleIterator iter__(msg__);
283
0
            uint32_t aColor;
284
0
285
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aColor)))))) {
286
0
                FatalError("Error deserializing 'uint32_t'");
287
0
                return MsgValueError;
288
0
            }
289
0
            // Sentinel = 'aColor'
290
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1767069424)))) {
291
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
292
0
                return MsgValueError;
293
0
            }
294
0
            (msg__).EndRead(iter__, (msg__).type());
295
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
296
0
                FatalError("Transition error");
297
0
                return MsgValueError;
298
0
            }
299
0
            if ((!(RecvDefaultClearColor(aColor)))) {
300
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
301
0
                // Error handled in mozilla::ipc::IPCResult
302
0
                return MsgProcessingError;
303
0
            }
304
0
305
0
            return MsgProcessed;
306
0
        }
307
0
    case PUiCompositorController::Msg_RequestScreenPixels__ID:
308
0
        {
309
0
            if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
310
0
                mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
311
0
            }
312
0
            AUTO_PROFILER_LABEL("PUiCompositorController::Msg_RequestScreenPixels", OTHER);
313
0
314
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
315
0
                FatalError("Transition error");
316
0
                return MsgValueError;
317
0
            }
318
0
            if ((!(RecvRequestScreenPixels()))) {
319
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
320
0
                // Error handled in mozilla::ipc::IPCResult
321
0
                return MsgProcessingError;
322
0
            }
323
0
324
0
            return MsgProcessed;
325
0
        }
326
0
    case PUiCompositorController::Msg_EnableLayerUpdateNotifications__ID:
327
0
        {
328
0
            if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
329
0
                mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
330
0
            }
331
0
            AUTO_PROFILER_LABEL("PUiCompositorController::Msg_EnableLayerUpdateNotifications", OTHER);
332
0
333
0
            PickleIterator iter__(msg__);
334
0
            bool aEnable;
335
0
336
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aEnable)))))) {
337
0
                FatalError("Error deserializing 'bool'");
338
0
                return MsgValueError;
339
0
            }
340
0
            // Sentinel = 'aEnable'
341
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 163837555)))) {
342
0
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
343
0
                return MsgValueError;
344
0
            }
345
0
            (msg__).EndRead(iter__, (msg__).type());
346
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
347
0
                FatalError("Transition error");
348
0
                return MsgValueError;
349
0
            }
350
0
            if ((!(RecvEnableLayerUpdateNotifications(aEnable)))) {
351
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
352
0
                // Error handled in mozilla::ipc::IPCResult
353
0
                return MsgProcessingError;
354
0
            }
355
0
356
0
            return MsgProcessed;
357
0
        }
358
0
    case PUiCompositorController::Msg_ToolbarPixelsToCompositor__ID:
359
0
        {
360
0
            if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
361
0
                mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
362
0
            }
363
0
            AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ToolbarPixelsToCompositor", OTHER);
364
0
365
0
            PickleIterator iter__(msg__);
366
0
            Shmem aMem;
367
0
            ScreenIntSize aSize;
368
0
369
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aMem)))))) {
370
0
                FatalError("Error deserializing 'Shmem'");
371
0
                return MsgValueError;
372
0
            }
373
0
            // Sentinel = 'aMem'
374
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3574578916)))) {
375
0
                mozilla::ipc::SentinelReadError("Error deserializing 'Shmem'");
376
0
                return MsgValueError;
377
0
            }
378
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aSize)))))) {
379
0
                FatalError("Error deserializing 'ScreenIntSize'");
380
0
                return MsgValueError;
381
0
            }
382
0
            // Sentinel = 'aSize'
383
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2556665555)))) {
384
0
                mozilla::ipc::SentinelReadError("Error deserializing 'ScreenIntSize'");
385
0
                return MsgValueError;
386
0
            }
387
0
            (msg__).EndRead(iter__, (msg__).type());
388
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
389
0
                FatalError("Transition error");
390
0
                return MsgValueError;
391
0
            }
392
0
            if ((!(RecvToolbarPixelsToCompositor(std::move(aMem), aSize)))) {
393
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
394
0
                // Error handled in mozilla::ipc::IPCResult
395
0
                return MsgProcessingError;
396
0
            }
397
0
398
0
            return MsgProcessed;
399
0
        }
400
0
    default:
401
0
        {
402
0
            return MsgNotKnown;
403
0
        }
404
0
    case SHMEM_CREATED_MESSAGE_TYPE:
405
0
        {
406
0
            if ((!(ShmemCreated(msg__)))) {
407
0
                return MsgPayloadError;
408
0
            }
409
0
            return MsgProcessed;
410
0
        }
411
0
    case SHMEM_DESTROYED_MESSAGE_TYPE:
412
0
        {
413
0
            if ((!(ShmemDestroyed(msg__)))) {
414
0
                return MsgPayloadError;
415
0
            }
416
0
            return MsgProcessed;
417
0
        }
418
0
    }
419
0
}
420
421
auto PUiCompositorControllerParent::OnMessageReceived(
422
        const Message& msg__,
423
        Message*& reply__) -> PUiCompositorControllerParent::Result
424
0
{
425
0
    switch ((msg__).type()) {
426
0
    case PUiCompositorController::Msg_Pause__ID:
427
0
        {
428
0
            if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
429
0
                mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
430
0
            }
431
0
            AUTO_PROFILER_LABEL("PUiCompositorController::Msg_Pause", OTHER);
432
0
433
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
434
0
                FatalError("Transition error");
435
0
                return MsgValueError;
436
0
            }
437
0
            int32_t id__ = MSG_ROUTING_CONTROL;
438
0
            if ((!(RecvPause()))) {
439
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
440
0
                // Error handled in mozilla::ipc::IPCResult
441
0
                return MsgProcessingError;
442
0
            }
443
0
444
0
            reply__ = PUiCompositorController::Reply_Pause(id__);
445
0
446
0
447
0
            if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
448
0
                mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
449
0
            }
450
0
            return MsgProcessed;
451
0
        }
452
0
    case PUiCompositorController::Msg_Resume__ID:
453
0
        {
454
0
            if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
455
0
                mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
456
0
            }
457
0
            AUTO_PROFILER_LABEL("PUiCompositorController::Msg_Resume", OTHER);
458
0
459
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
460
0
                FatalError("Transition error");
461
0
                return MsgValueError;
462
0
            }
463
0
            int32_t id__ = MSG_ROUTING_CONTROL;
464
0
            if ((!(RecvResume()))) {
465
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
466
0
                // Error handled in mozilla::ipc::IPCResult
467
0
                return MsgProcessingError;
468
0
            }
469
0
470
0
            reply__ = PUiCompositorController::Reply_Resume(id__);
471
0
472
0
473
0
            if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
474
0
                mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
475
0
            }
476
0
            return MsgProcessed;
477
0
        }
478
0
    case PUiCompositorController::Msg_ResumeAndResize__ID:
479
0
        {
480
0
            if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
481
0
                mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
482
0
            }
483
0
            AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ResumeAndResize", OTHER);
484
0
485
0
            PickleIterator iter__(msg__);
486
0
            int32_t aWidth;
487
0
            int32_t aHeight;
488
0
489
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aWidth)))))) {
490
0
                FatalError("Error deserializing 'int32_t'");
491
0
                return MsgValueError;
492
0
            }
493
0
            // Sentinel = 'aWidth'
494
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 196646625)))) {
495
0
                mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'");
496
0
                return MsgValueError;
497
0
            }
498
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aHeight)))))) {
499
0
                FatalError("Error deserializing 'int32_t'");
500
0
                return MsgValueError;
501
0
            }
502
0
            // Sentinel = 'aHeight'
503
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3588433859)))) {
504
0
                mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'");
505
0
                return MsgValueError;
506
0
            }
507
0
            (msg__).EndRead(iter__, (msg__).type());
508
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
509
0
                FatalError("Transition error");
510
0
                return MsgValueError;
511
0
            }
512
0
            int32_t id__ = MSG_ROUTING_CONTROL;
513
0
            if ((!(RecvResumeAndResize(aWidth, aHeight)))) {
514
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
515
0
                // Error handled in mozilla::ipc::IPCResult
516
0
                return MsgProcessingError;
517
0
            }
518
0
519
0
            reply__ = PUiCompositorController::Reply_ResumeAndResize(id__);
520
0
521
0
522
0
            if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerParent")) {
523
0
                mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
524
0
            }
525
0
            return MsgProcessed;
526
0
        }
527
0
    default:
528
0
        {
529
0
            return MsgNotKnown;
530
0
        }
531
0
    }
532
0
}
533
534
auto PUiCompositorControllerParent::OnCallReceived(
535
        const Message& msg__,
536
        Message*& reply__) -> PUiCompositorControllerParent::Result
537
0
{
538
0
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
539
0
    return MsgNotKnown;
540
0
}
541
542
auto PUiCompositorControllerParent::GetProtocolTypeId() -> int32_t
543
0
{
544
0
    return PUiCompositorControllerMsgStart;
545
0
}
546
547
auto PUiCompositorControllerParent::OnChannelClose() -> void
548
0
{
549
0
    DestroySubtree(NormalShutdown);
550
0
    DeallocSubtree();
551
0
    DeallocShmems();
552
0
    DeallocPUiCompositorControllerParent();
553
0
}
554
555
auto PUiCompositorControllerParent::OnChannelError() -> void
556
0
{
557
0
    DestroySubtree(AbnormalShutdown);
558
0
    DeallocSubtree();
559
0
    DeallocShmems();
560
0
    DeallocPUiCompositorControllerParent();
561
0
}
562
563
auto PUiCompositorControllerParent::DestroySubtree(ActorDestroyReason why) -> void
564
0
{
565
0
    // Reject owning pending responses.
566
0
    (GetIPCChannel())->RejectPendingResponsesForActor(this);
567
0
568
0
    // Finally, destroy "us".
569
0
    ActorDestroy(why);
570
0
}
571
572
auto PUiCompositorControllerParent::DeallocSubtree() -> void
573
0
{
574
0
}
575
576
auto PUiCompositorControllerParent::DeallocPUiCompositorControllerParent() -> void
577
0
{
578
0
}
579
580
581
582
} // namespace layers
583
} // namespace mozilla
584
namespace mozilla {
585
namespace ipc {
586
auto IPDLParamTraits<mozilla::layers::PUiCompositorControllerParent>::Write(
587
        IPC::Message* aMsg,
588
        mozilla::ipc::IProtocol* aActor,
589
        const paramType& aVar) -> void
590
0
{
591
0
    int32_t id;
592
0
    if ((!(aVar))) {
593
0
        id = 0;
594
0
    }
595
0
    else {
596
0
        id = (aVar)->Id();
597
0
        if ((1) == (id)) {
598
0
            (aActor)->FatalError("actor has been |delete|d");
599
0
        }
600
0
    }
601
0
    WriteIPDLParam(aMsg, aActor, id);
602
0
}
603
604
auto IPDLParamTraits<mozilla::layers::PUiCompositorControllerParent>::Read(
605
        const IPC::Message* aMsg,
606
        PickleIterator* aIter,
607
        mozilla::ipc::IProtocol* aActor,
608
        paramType* aVar) -> bool
609
0
{
610
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PUiCompositorController", PUiCompositorControllerMsgStart);
611
0
    if ((actor).isNothing()) {
612
0
        return false;
613
0
    }
614
0
615
0
    (*(aVar)) = static_cast<mozilla::layers::PUiCompositorControllerParent*>((actor).value());
616
0
    return true;
617
0
}
618
619
} // namespace ipc
620
} // namespace mozilla