Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PLayerTransactionChild.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/PLayerTransactionChild.h"
8
#include "FrameMetrics.h"
9
#include "ipc/IPCMessageUtils.h"
10
#include "mozilla/layers/APZTestData.h"
11
#include "mozilla/layers/CompositorTypes.h"
12
13
#include "mozilla/layers/PCompositorBridgeChild.h"
14
#include "mozilla/layout/PRenderFrameChild.h"
15
#include "mozilla/layers/PTextureChild.h"
16
17
#include "nsIFile.h"
18
#include "GeckoProfiler.h"
19
20
namespace mozilla {
21
namespace layers {
22
23
24
auto PLayerTransactionChild::Recv__delete__() -> mozilla::ipc::IPCResult
25
0
{
26
0
    return IPC_OK();
27
0
}
28
29
auto PLayerTransactionChild::ActorDestroy(ActorDestroyReason aWhy) -> void
30
0
{
31
0
}
32
33
MOZ_IMPLICIT PLayerTransactionChild::PLayerTransactionChild() :
34
    mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
35
    mLivenessState(mozilla::ipc::LivenessState::Dead)
36
0
{
37
0
    MOZ_COUNT_CTOR(PLayerTransactionChild);
38
0
}
39
40
PLayerTransactionChild::~PLayerTransactionChild()
41
0
{
42
0
    MOZ_COUNT_DTOR(PLayerTransactionChild);
43
0
}
44
45
auto PLayerTransactionChild::Manager() const -> PCompositorBridgeChild*
46
0
{
47
0
    return static_cast<PCompositorBridgeChild*>(IProtocol::Manager());
48
0
}
49
50
auto PLayerTransactionChild::SendUpdate(const TransactionInfo& txn) -> bool
51
0
{
52
0
    IPC::Message* msg__ = PLayerTransaction::Msg_Update(Id());
53
0
54
0
    WriteIPDLParam(msg__, this, txn);
55
0
    // Sentinel = 'txn'
56
0
    (msg__)->WriteSentinel(316309761);
57
0
58
0
59
0
60
0
61
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
62
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
63
0
    }
64
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_Update", OTHER);
65
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
66
0
        mozilla::ipc::LogicError("Transition error");
67
0
    }
68
0
69
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
70
0
    return sendok__;
71
0
}
72
73
auto PLayerTransactionChild::SendPaintTime(
74
        const TransactionId& id,
75
        const TimeDuration& paintTime) -> bool
76
0
{
77
0
    IPC::Message* msg__ = PLayerTransaction::Msg_PaintTime(Id());
78
0
79
0
    WriteIPDLParam(msg__, this, id);
80
0
    // Sentinel = 'id'
81
0
    (msg__)->WriteSentinel(2794505629);
82
0
    WriteIPDLParam(msg__, this, paintTime);
83
0
    // Sentinel = 'paintTime'
84
0
    (msg__)->WriteSentinel(2185917910);
85
0
86
0
87
0
88
0
89
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
90
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
91
0
    }
92
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_PaintTime", OTHER);
93
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
94
0
        mozilla::ipc::LogicError("Transition error");
95
0
    }
96
0
97
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
98
0
    return sendok__;
99
0
}
100
101
auto PLayerTransactionChild::SendSetLayersObserverEpoch(const LayersObserverEpoch& aChildEpoch) -> bool
102
0
{
103
0
    IPC::Message* msg__ = PLayerTransaction::Msg_SetLayersObserverEpoch(Id());
104
0
105
0
    WriteIPDLParam(msg__, this, aChildEpoch);
106
0
    // Sentinel = 'aChildEpoch'
107
0
    (msg__)->WriteSentinel(206106979);
108
0
109
0
110
0
111
0
112
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
113
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
114
0
    }
115
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_SetLayersObserverEpoch", OTHER);
116
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
117
0
        mozilla::ipc::LogicError("Transition error");
118
0
    }
119
0
120
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
121
0
    return sendok__;
122
0
}
123
124
auto PLayerTransactionChild::SendNewCompositable(
125
        const CompositableHandle& handle,
126
        const TextureInfo& info) -> bool
127
0
{
128
0
    IPC::Message* msg__ = PLayerTransaction::Msg_NewCompositable(Id());
129
0
130
0
    WriteIPDLParam(msg__, this, handle);
131
0
    // Sentinel = 'handle'
132
0
    (msg__)->WriteSentinel(453975108);
133
0
    WriteIPDLParam(msg__, this, info);
134
0
    // Sentinel = 'info'
135
0
    (msg__)->WriteSentinel(3750868832);
136
0
137
0
138
0
139
0
140
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
141
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
142
0
    }
143
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_NewCompositable", OTHER);
144
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
145
0
        mozilla::ipc::LogicError("Transition error");
146
0
    }
147
0
148
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
149
0
    return sendok__;
150
0
}
151
152
auto PLayerTransactionChild::SendReleaseLayer(const LayerHandle& layer) -> bool
153
0
{
154
0
    IPC::Message* msg__ = PLayerTransaction::Msg_ReleaseLayer(Id());
155
0
156
0
    WriteIPDLParam(msg__, this, layer);
157
0
    // Sentinel = 'layer'
158
0
    (msg__)->WriteSentinel(1899167106);
159
0
160
0
161
0
162
0
163
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
164
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
165
0
    }
166
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_ReleaseLayer", OTHER);
167
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
168
0
        mozilla::ipc::LogicError("Transition error");
169
0
    }
170
0
171
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
172
0
    return sendok__;
173
0
}
174
175
auto PLayerTransactionChild::SendReleaseCompositable(const CompositableHandle& compositable) -> bool
176
0
{
177
0
    IPC::Message* msg__ = PLayerTransaction::Msg_ReleaseCompositable(Id());
178
0
179
0
    WriteIPDLParam(msg__, this, compositable);
180
0
    // Sentinel = 'compositable'
181
0
    (msg__)->WriteSentinel(4031958248);
182
0
183
0
184
0
185
0
186
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
187
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
188
0
    }
189
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_ReleaseCompositable", OTHER);
190
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
191
0
        mozilla::ipc::LogicError("Transition error");
192
0
    }
193
0
194
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
195
0
    return sendok__;
196
0
}
197
198
auto PLayerTransactionChild::SendSetConfirmedTargetAPZC(
199
        const uint64_t& aInputBlockId,
200
        const nsTArray<ScrollableLayerGuid>& aTargets) -> bool
201
0
{
202
0
    IPC::Message* msg__ = PLayerTransaction::Msg_SetConfirmedTargetAPZC(Id());
203
0
204
0
    WriteIPDLParam(msg__, this, aInputBlockId);
205
0
    // Sentinel = 'aInputBlockId'
206
0
    (msg__)->WriteSentinel(3003300100);
207
0
    WriteIPDLParam(msg__, this, aTargets);
208
0
    // Sentinel = 'aTargets'
209
0
    (msg__)->WriteSentinel(1782943901);
210
0
211
0
212
0
213
0
214
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
215
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
216
0
    }
217
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_SetConfirmedTargetAPZC", OTHER);
218
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
219
0
        mozilla::ipc::LogicError("Transition error");
220
0
    }
221
0
222
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
223
0
    return sendok__;
224
0
}
225
226
auto PLayerTransactionChild::SendSetTestSampleTime(const TimeStamp& sampleTime) -> bool
227
0
{
228
0
    IPC::Message* msg__ = PLayerTransaction::Msg_SetTestSampleTime(Id());
229
0
230
0
    WriteIPDLParam(msg__, this, sampleTime);
231
0
    // Sentinel = 'sampleTime'
232
0
    (msg__)->WriteSentinel(2958171755);
233
0
234
0
235
0
236
0
    Message reply__;
237
0
238
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
239
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
240
0
    }
241
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_SetTestSampleTime", OTHER);
242
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
243
0
        mozilla::ipc::LogicError("Transition error");
244
0
    }
245
0
246
0
    bool sendok__;
247
0
    {
248
0
        AUTO_PROFILER_TRACING("IPC", "PLayerTransaction::Msg_SetTestSampleTime");
249
0
        sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
250
0
    }
251
0
    if ((!(sendok__))) {
252
0
        return false;
253
0
    }
254
0
255
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
256
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
257
0
    }
258
0
259
0
    return true;
260
0
}
261
262
auto PLayerTransactionChild::SendLeaveTestMode() -> bool
263
0
{
264
0
    IPC::Message* msg__ = PLayerTransaction::Msg_LeaveTestMode(Id());
265
0
266
0
267
0
268
0
269
0
    Message reply__;
270
0
271
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
272
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
273
0
    }
274
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_LeaveTestMode", OTHER);
275
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
276
0
        mozilla::ipc::LogicError("Transition error");
277
0
    }
278
0
279
0
    bool sendok__;
280
0
    {
281
0
        AUTO_PROFILER_TRACING("IPC", "PLayerTransaction::Msg_LeaveTestMode");
282
0
        sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
283
0
    }
284
0
    if ((!(sendok__))) {
285
0
        return false;
286
0
    }
287
0
288
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
289
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
290
0
    }
291
0
292
0
    return true;
293
0
}
294
295
auto PLayerTransactionChild::SendGetAnimationValue(
296
        const uint64_t& aCompositorAnimationId,
297
        OMTAValue* value) -> bool
298
0
{
299
0
    IPC::Message* msg__ = PLayerTransaction::Msg_GetAnimationValue(Id());
300
0
301
0
    WriteIPDLParam(msg__, this, aCompositorAnimationId);
302
0
    // Sentinel = 'aCompositorAnimationId'
303
0
    (msg__)->WriteSentinel(2017409677);
304
0
305
0
306
0
307
0
    Message reply__;
308
0
309
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
310
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
311
0
    }
312
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_GetAnimationValue", OTHER);
313
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
314
0
        mozilla::ipc::LogicError("Transition error");
315
0
    }
316
0
317
0
    bool sendok__;
318
0
    {
319
0
        AUTO_PROFILER_TRACING("IPC", "PLayerTransaction::Msg_GetAnimationValue");
320
0
        sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
321
0
    }
322
0
    if ((!(sendok__))) {
323
0
        return false;
324
0
    }
325
0
326
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
327
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
328
0
    }
329
0
330
0
    PickleIterator iter__(reply__);
331
0
332
0
    if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, value)))) {
333
0
        FatalError("Error deserializing 'OMTAValue'");
334
0
        return false;
335
0
    }
336
0
    // Sentinel = 'value'
337
0
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3456818542)))) {
338
0
        mozilla::ipc::SentinelReadError("Error deserializing 'OMTAValue'");
339
0
        return false;
340
0
    }
341
0
    (reply__).EndRead(iter__, (reply__).type());
342
0
343
0
    return true;
344
0
}
345
346
auto PLayerTransactionChild::SendGetTransform(
347
        const LayerHandle& layer,
348
        MaybeTransform* transform) -> bool
349
0
{
350
0
    IPC::Message* msg__ = PLayerTransaction::Msg_GetTransform(Id());
351
0
352
0
    WriteIPDLParam(msg__, this, layer);
353
0
    // Sentinel = 'layer'
354
0
    (msg__)->WriteSentinel(1899167106);
355
0
356
0
357
0
358
0
    Message reply__;
359
0
360
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
361
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
362
0
    }
363
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_GetTransform", OTHER);
364
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
365
0
        mozilla::ipc::LogicError("Transition error");
366
0
    }
367
0
368
0
    bool sendok__;
369
0
    {
370
0
        AUTO_PROFILER_TRACING("IPC", "PLayerTransaction::Msg_GetTransform");
371
0
        sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
372
0
    }
373
0
    if ((!(sendok__))) {
374
0
        return false;
375
0
    }
376
0
377
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
378
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
379
0
    }
380
0
381
0
    PickleIterator iter__(reply__);
382
0
383
0
    if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, transform)))) {
384
0
        FatalError("Error deserializing 'MaybeTransform'");
385
0
        return false;
386
0
    }
387
0
    // Sentinel = 'transform'
388
0
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 69691181)))) {
389
0
        mozilla::ipc::SentinelReadError("Error deserializing 'MaybeTransform'");
390
0
        return false;
391
0
    }
392
0
    (reply__).EndRead(iter__, (reply__).type());
393
0
394
0
    return true;
395
0
}
396
397
auto PLayerTransactionChild::SendSetAsyncScrollOffset(
398
        const ViewID& id,
399
        const float& x,
400
        const float& y) -> bool
401
0
{
402
0
    IPC::Message* msg__ = PLayerTransaction::Msg_SetAsyncScrollOffset(Id());
403
0
404
0
    WriteIPDLParam(msg__, this, id);
405
0
    // Sentinel = 'id'
406
0
    (msg__)->WriteSentinel(2794505629);
407
0
    WriteIPDLParam(msg__, this, x);
408
0
    // Sentinel = 'x'
409
0
    (msg__)->WriteSentinel(2475144313);
410
0
    WriteIPDLParam(msg__, this, y);
411
0
    // Sentinel = 'y'
412
0
    (msg__)->WriteSentinel(2603144696);
413
0
414
0
415
0
416
0
    Message reply__;
417
0
418
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
419
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
420
0
    }
421
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_SetAsyncScrollOffset", OTHER);
422
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
423
0
        mozilla::ipc::LogicError("Transition error");
424
0
    }
425
0
426
0
    bool sendok__;
427
0
    {
428
0
        AUTO_PROFILER_TRACING("IPC", "PLayerTransaction::Msg_SetAsyncScrollOffset");
429
0
        sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
430
0
    }
431
0
    if ((!(sendok__))) {
432
0
        return false;
433
0
    }
434
0
435
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
436
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
437
0
    }
438
0
439
0
    return true;
440
0
}
441
442
auto PLayerTransactionChild::SendSetAsyncZoom(
443
        const ViewID& id,
444
        const float& zoom) -> bool
445
0
{
446
0
    IPC::Message* msg__ = PLayerTransaction::Msg_SetAsyncZoom(Id());
447
0
448
0
    WriteIPDLParam(msg__, this, id);
449
0
    // Sentinel = 'id'
450
0
    (msg__)->WriteSentinel(2794505629);
451
0
    WriteIPDLParam(msg__, this, zoom);
452
0
    // Sentinel = 'zoom'
453
0
    (msg__)->WriteSentinel(1680696941);
454
0
455
0
456
0
457
0
    Message reply__;
458
0
459
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
460
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
461
0
    }
462
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_SetAsyncZoom", OTHER);
463
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
464
0
        mozilla::ipc::LogicError("Transition error");
465
0
    }
466
0
467
0
    bool sendok__;
468
0
    {
469
0
        AUTO_PROFILER_TRACING("IPC", "PLayerTransaction::Msg_SetAsyncZoom");
470
0
        sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
471
0
    }
472
0
    if ((!(sendok__))) {
473
0
        return false;
474
0
    }
475
0
476
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
477
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
478
0
    }
479
0
480
0
    return true;
481
0
}
482
483
auto PLayerTransactionChild::SendFlushApzRepaints() -> bool
484
0
{
485
0
    IPC::Message* msg__ = PLayerTransaction::Msg_FlushApzRepaints(Id());
486
0
487
0
488
0
489
0
490
0
491
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
492
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
493
0
    }
494
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_FlushApzRepaints", OTHER);
495
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
496
0
        mozilla::ipc::LogicError("Transition error");
497
0
    }
498
0
499
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
500
0
    return sendok__;
501
0
}
502
503
auto PLayerTransactionChild::SendClearCachedResources() -> bool
504
0
{
505
0
    IPC::Message* msg__ = PLayerTransaction::Msg_ClearCachedResources(Id());
506
0
507
0
508
0
509
0
510
0
511
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
512
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
513
0
    }
514
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_ClearCachedResources", OTHER);
515
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
516
0
        mozilla::ipc::LogicError("Transition error");
517
0
    }
518
0
519
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
520
0
    return sendok__;
521
0
}
522
523
auto PLayerTransactionChild::SendScheduleComposite() -> bool
524
0
{
525
0
    IPC::Message* msg__ = PLayerTransaction::Msg_ScheduleComposite(Id());
526
0
527
0
528
0
529
0
530
0
531
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
532
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
533
0
    }
534
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_ScheduleComposite", OTHER);
535
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
536
0
        mozilla::ipc::LogicError("Transition error");
537
0
    }
538
0
539
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
540
0
    return sendok__;
541
0
}
542
543
auto PLayerTransactionChild::SendGetAPZTestData(APZTestData* data) -> bool
544
0
{
545
0
    IPC::Message* msg__ = PLayerTransaction::Msg_GetAPZTestData(Id());
546
0
547
0
548
0
549
0
550
0
    Message reply__;
551
0
552
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
553
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
554
0
    }
555
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_GetAPZTestData", OTHER);
556
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
557
0
        mozilla::ipc::LogicError("Transition error");
558
0
    }
559
0
560
0
    bool sendok__;
561
0
    {
562
0
        AUTO_PROFILER_TRACING("IPC", "PLayerTransaction::Msg_GetAPZTestData");
563
0
        sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
564
0
    }
565
0
    if ((!(sendok__))) {
566
0
        return false;
567
0
    }
568
0
569
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
570
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
571
0
    }
572
0
573
0
    PickleIterator iter__(reply__);
574
0
575
0
    if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, data)))) {
576
0
        FatalError("Error deserializing 'APZTestData'");
577
0
        return false;
578
0
    }
579
0
    // Sentinel = 'data'
580
0
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 843352540)))) {
581
0
        mozilla::ipc::SentinelReadError("Error deserializing 'APZTestData'");
582
0
        return false;
583
0
    }
584
0
    (reply__).EndRead(iter__, (reply__).type());
585
0
586
0
    return true;
587
0
}
588
589
auto PLayerTransactionChild::SendRequestProperty(
590
        const nsString& property,
591
        float* value) -> bool
592
0
{
593
0
    IPC::Message* msg__ = PLayerTransaction::Msg_RequestProperty(Id());
594
0
595
0
    WriteIPDLParam(msg__, this, property);
596
0
    // Sentinel = 'property'
597
0
    (msg__)->WriteSentinel(1482237307);
598
0
599
0
600
0
601
0
    Message reply__;
602
0
603
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
604
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
605
0
    }
606
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_RequestProperty", OTHER);
607
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
608
0
        mozilla::ipc::LogicError("Transition error");
609
0
    }
610
0
611
0
    bool sendok__;
612
0
    {
613
0
        AUTO_PROFILER_TRACING("IPC", "PLayerTransaction::Msg_RequestProperty");
614
0
        sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
615
0
    }
616
0
    if ((!(sendok__))) {
617
0
        return false;
618
0
    }
619
0
620
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
621
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
622
0
    }
623
0
624
0
    PickleIterator iter__(reply__);
625
0
626
0
    if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, value)))) {
627
0
        FatalError("Error deserializing 'float'");
628
0
        return false;
629
0
    }
630
0
    // Sentinel = 'value'
631
0
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3456818542)))) {
632
0
        mozilla::ipc::SentinelReadError("Error deserializing 'float'");
633
0
        return false;
634
0
    }
635
0
    (reply__).EndRead(iter__, (reply__).type());
636
0
637
0
    return true;
638
0
}
639
640
auto PLayerTransactionChild::SendGetTextureFactoryIdentifier(TextureFactoryIdentifier* aIdentifier) -> bool
641
0
{
642
0
    IPC::Message* msg__ = PLayerTransaction::Msg_GetTextureFactoryIdentifier(Id());
643
0
644
0
645
0
646
0
647
0
    Message reply__;
648
0
649
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
650
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
651
0
    }
652
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_GetTextureFactoryIdentifier", OTHER);
653
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
654
0
        mozilla::ipc::LogicError("Transition error");
655
0
    }
656
0
657
0
    bool sendok__;
658
0
    {
659
0
        AUTO_PROFILER_TRACING("IPC", "PLayerTransaction::Msg_GetTextureFactoryIdentifier");
660
0
        sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
661
0
    }
662
0
    if ((!(sendok__))) {
663
0
        return false;
664
0
    }
665
0
666
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
667
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
668
0
    }
669
0
670
0
    PickleIterator iter__(reply__);
671
0
672
0
    if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, aIdentifier)))) {
673
0
        FatalError("Error deserializing 'TextureFactoryIdentifier'");
674
0
        return false;
675
0
    }
676
0
    // Sentinel = 'aIdentifier'
677
0
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3975378435)))) {
678
0
        mozilla::ipc::SentinelReadError("Error deserializing 'TextureFactoryIdentifier'");
679
0
        return false;
680
0
    }
681
0
    (reply__).EndRead(iter__, (reply__).type());
682
0
683
0
    return true;
684
0
}
685
686
auto PLayerTransactionChild::SendRecordPaintTimes(const PaintTiming& timing) -> bool
687
0
{
688
0
    IPC::Message* msg__ = PLayerTransaction::Msg_RecordPaintTimes(Id());
689
0
690
0
    WriteIPDLParam(msg__, this, timing);
691
0
    // Sentinel = 'timing'
692
0
    (msg__)->WriteSentinel(3852786776);
693
0
694
0
695
0
696
0
697
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
698
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
699
0
    }
700
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_RecordPaintTimes", OTHER);
701
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
702
0
        mozilla::ipc::LogicError("Transition error");
703
0
    }
704
0
705
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
706
0
    return sendok__;
707
0
}
708
709
auto PLayerTransactionChild::SendShutdown() -> bool
710
0
{
711
0
    IPC::Message* msg__ = PLayerTransaction::Msg_Shutdown(Id());
712
0
713
0
714
0
715
0
716
0
717
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
718
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
719
0
    }
720
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_Shutdown", OTHER);
721
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
722
0
        mozilla::ipc::LogicError("Transition error");
723
0
    }
724
0
725
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
726
0
    return sendok__;
727
0
}
728
729
auto PLayerTransactionChild::SendShutdownSync() -> bool
730
0
{
731
0
    IPC::Message* msg__ = PLayerTransaction::Msg_ShutdownSync(Id());
732
0
733
0
734
0
735
0
736
0
    Message reply__;
737
0
738
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
739
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
740
0
    }
741
0
    AUTO_PROFILER_LABEL("PLayerTransaction::Msg_ShutdownSync", OTHER);
742
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
743
0
        mozilla::ipc::LogicError("Transition error");
744
0
    }
745
0
746
0
    bool sendok__;
747
0
    {
748
0
        AUTO_PROFILER_TRACING("IPC", "PLayerTransaction::Msg_ShutdownSync");
749
0
        sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
750
0
    }
751
0
    if ((!(sendok__))) {
752
0
        return false;
753
0
    }
754
0
755
0
    if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
756
0
        mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
757
0
    }
758
0
759
0
    return true;
760
0
}
761
762
auto PLayerTransactionChild::RemoveManagee(
763
        int32_t aProtocolId,
764
        IProtocol* aListener) -> void
765
0
{
766
0
    FatalError("unreached");
767
0
    return;
768
0
}
769
770
auto PLayerTransactionChild::OnMessageReceived(const Message& msg__) -> PLayerTransactionChild::Result
771
0
{
772
0
    switch ((msg__).type()) {
773
0
    case PLayerTransaction::Msg___delete____ID:
774
0
        {
775
0
            if (mozilla::ipc::LoggingEnabledFor("PLayerTransactionChild")) {
776
0
                mozilla::ipc::LogMessageForProtocol("PLayerTransactionChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
777
0
            }
778
0
            AUTO_PROFILER_LABEL("PLayerTransaction::Msg___delete__", OTHER);
779
0
780
0
            PickleIterator iter__(msg__);
781
0
            PLayerTransactionChild* actor;
782
0
783
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) {
784
0
                FatalError("Error deserializing 'PLayerTransactionChild'");
785
0
                return MsgValueError;
786
0
            }
787
0
            if ((!((*((&(actor))))))) {
788
0
                FatalError("Error deserializing 'PLayerTransactionChild'");
789
0
                return MsgValueError;
790
0
            }
791
0
            // Sentinel = 'actor'
792
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
793
0
                mozilla::ipc::SentinelReadError("Error deserializing 'PLayerTransactionChild'");
794
0
                return MsgValueError;
795
0
            }
796
0
            (msg__).EndRead(iter__, (msg__).type());
797
0
            if ((!(StateTransition(true, (&(mLivenessState)))))) {
798
0
                FatalError("Transition error");
799
0
                return MsgValueError;
800
0
            }
801
0
            if ((!(Recv__delete__()))) {
802
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
803
0
                // Error handled in mozilla::ipc::IPCResult
804
0
                return MsgProcessingError;
805
0
            }
806
0
807
0
808
0
            IProtocol* mgr = (actor)->Manager();
809
0
            (actor)->DestroySubtree(Deletion);
810
0
            (actor)->DeallocSubtree();
811
0
            (mgr)->RemoveManagee(PLayerTransactionMsgStart, actor);
812
0
813
0
            return MsgProcessed;
814
0
        }
815
0
    default:
816
0
        {
817
0
            return MsgNotKnown;
818
0
        }
819
0
    }
820
0
}
821
822
auto PLayerTransactionChild::OnMessageReceived(
823
        const Message& msg__,
824
        Message*& reply__) -> PLayerTransactionChild::Result
825
0
{
826
0
    return MsgNotKnown;
827
0
}
828
829
auto PLayerTransactionChild::OnCallReceived(
830
        const Message& msg__,
831
        Message*& reply__) -> PLayerTransactionChild::Result
832
0
{
833
0
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
834
0
    return MsgNotKnown;
835
0
}
836
837
auto PLayerTransactionChild::GetProtocolTypeId() -> int32_t
838
0
{
839
0
    return PLayerTransactionMsgStart;
840
0
}
841
842
auto PLayerTransactionChild::DestroySubtree(ActorDestroyReason why) -> void
843
0
{
844
0
    // Unregister from our manager.
845
0
    Unregister(Id());
846
0
847
0
    // Reject owning pending responses.
848
0
    (GetIPCChannel())->RejectPendingResponsesForActor(this);
849
0
850
0
    // Finally, destroy "us".
851
0
    ActorDestroy(why);
852
0
}
853
854
auto PLayerTransactionChild::DeallocSubtree() -> void
855
0
{
856
0
}
857
858
859
860
} // namespace layers
861
} // namespace mozilla
862
namespace mozilla {
863
namespace ipc {
864
auto IPDLParamTraits<mozilla::layers::PLayerTransactionChild>::Write(
865
        IPC::Message* aMsg,
866
        mozilla::ipc::IProtocol* aActor,
867
        const paramType& aVar) -> void
868
0
{
869
0
    int32_t id;
870
0
    if ((!(aVar))) {
871
0
        id = 0;
872
0
    }
873
0
    else {
874
0
        id = (aVar)->Id();
875
0
        if ((1) == (id)) {
876
0
            (aActor)->FatalError("actor has been |delete|d");
877
0
        }
878
0
    }
879
0
    WriteIPDLParam(aMsg, aActor, id);
880
0
}
881
882
auto IPDLParamTraits<mozilla::layers::PLayerTransactionChild>::Read(
883
        const IPC::Message* aMsg,
884
        PickleIterator* aIter,
885
        mozilla::ipc::IProtocol* aActor,
886
        paramType* aVar) -> bool
887
0
{
888
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PLayerTransaction", PLayerTransactionMsgStart);
889
0
    if ((actor).isNothing()) {
890
0
        return false;
891
0
    }
892
0
893
0
    (*(aVar)) = static_cast<mozilla::layers::PLayerTransactionChild*>((actor).value());
894
0
    return true;
895
0
}
896
897
} // namespace ipc
898
} // namespace mozilla