Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PPluginModuleParent.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/plugins/PPluginModuleParent.h"
8
#include "mozilla/plugins/PluginMessageUtils.h"
9
#include "nsID.h"
10
11
#include "mozilla/plugins/PPluginInstanceParent.h"
12
#include "mozilla/plugins/PPluginScriptableObjectParent.h"
13
#include "mozilla/dom/PContentParent.h"
14
#include "mozilla/PProfilerParent.h"
15
#include "mozilla/plugins/PFunctionBrokerParent.h"
16
17
#include "nsIFile.h"
18
#include "GeckoProfiler.h"
19
20
namespace mozilla {
21
namespace plugins {
22
23
24
auto PPluginModuleParent::ActorDestroy(ActorDestroyReason aWhy) -> void
25
0
{
26
0
}
27
28
auto PPluginModuleParent::ProcessingError(
29
        Result aCode,
30
        const char* aReason) -> void
31
0
{
32
0
}
33
34
auto PPluginModuleParent::ShouldContinueFromReplyTimeout() -> bool
35
0
{
36
0
    return true;
37
0
}
38
39
auto PPluginModuleParent::EnteredCxxStack() -> void
40
0
{
41
0
}
42
43
auto PPluginModuleParent::ExitedCxxStack() -> void
44
0
{
45
0
}
46
47
auto PPluginModuleParent::EnteredCall() -> void
48
0
{
49
0
}
50
51
auto PPluginModuleParent::ExitedCall() -> void
52
0
{
53
0
}
54
55
MOZ_IMPLICIT PPluginModuleParent::PPluginModuleParent() :
56
    mozilla::ipc::IToplevelProtocol("PPluginModuleParent", PPluginModuleMsgStart, mozilla::ipc::ParentSide),
57
    mLivenessState(mozilla::ipc::LivenessState::Start)
58
0
{
59
0
    MOZ_COUNT_CTOR(PPluginModuleParent);
60
0
}
61
62
PPluginModuleParent::~PPluginModuleParent()
63
0
{
64
0
    MOZ_COUNT_DTOR(PPluginModuleParent);
65
0
}
66
67
auto PPluginModuleParent::ManagedPPluginInstanceParent(nsTArray<PPluginInstanceParent*>& aArr) const -> void
68
0
{
69
0
    (mManagedPPluginInstanceParent).ToArray(aArr);
70
0
}
71
72
auto PPluginModuleParent::ManagedPPluginInstanceParent() const -> const ManagedContainer<PPluginInstanceParent>&
73
0
{
74
0
    return mManagedPPluginInstanceParent;
75
0
}
76
77
auto PPluginModuleParent::SendProcessNativeEventsInInterruptCall() -> bool
78
0
{
79
0
    IPC::Message* msg__ = PPluginModule::Msg_ProcessNativeEventsInInterruptCall(MSG_ROUTING_CONTROL);
80
0
81
0
82
0
83
0
84
0
85
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
86
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
87
0
    }
88
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_ProcessNativeEventsInInterruptCall", OTHER);
89
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
90
0
        mozilla::ipc::LogicError("Transition error");
91
0
    }
92
0
93
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
94
0
    return sendok__;
95
0
}
96
97
auto PPluginModuleParent::SendInitProfiler(const Endpoint<mozilla::PProfilerChild>& aEndPoint) -> bool
98
0
{
99
0
    IPC::Message* msg__ = PPluginModule::Msg_InitProfiler(MSG_ROUTING_CONTROL);
100
0
101
0
    WriteIPDLParam(msg__, this, aEndPoint);
102
0
    // Sentinel = 'aEndPoint'
103
0
    (msg__)->WriteSentinel(1022620923);
104
0
105
0
106
0
107
0
108
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
109
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
110
0
    }
111
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_InitProfiler", OTHER);
112
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
113
0
        mozilla::ipc::LogicError("Transition error");
114
0
    }
115
0
116
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
117
0
    return sendok__;
118
0
}
119
120
auto PPluginModuleParent::SendDisableFlashProtectedMode() -> bool
121
0
{
122
0
    IPC::Message* msg__ = PPluginModule::Msg_DisableFlashProtectedMode(MSG_ROUTING_CONTROL);
123
0
124
0
125
0
126
0
127
0
128
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
129
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
130
0
    }
131
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_DisableFlashProtectedMode", OTHER);
132
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
133
0
        mozilla::ipc::LogicError("Transition error");
134
0
    }
135
0
136
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
137
0
    return sendok__;
138
0
}
139
140
auto PPluginModuleParent::CallModuleSupportsAsyncRender(bool* result) -> bool
141
0
{
142
0
    IPC::Message* msg__ = PPluginModule::Msg_ModuleSupportsAsyncRender(MSG_ROUTING_CONTROL);
143
0
144
0
145
0
146
0
147
0
    Message reply__;
148
0
149
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
150
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
151
0
    }
152
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_ModuleSupportsAsyncRender", OTHER);
153
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
154
0
        mozilla::ipc::LogicError("Transition error");
155
0
    }
156
0
157
0
    bool sendok__;
158
0
    {
159
0
        AUTO_PROFILER_TRACING("IPC", "PPluginModule::Msg_ModuleSupportsAsyncRender");
160
0
        sendok__ = (GetIPCChannel())->Call(msg__, (&(reply__)));
161
0
    }
162
0
    if ((!(sendok__))) {
163
0
        return false;
164
0
    }
165
0
166
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
167
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
168
0
    }
169
0
170
0
    PickleIterator iter__(reply__);
171
0
172
0
    if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, result)))) {
173
0
        FatalError("Error deserializing 'bool'");
174
0
        return false;
175
0
    }
176
0
    // Sentinel = 'result'
177
0
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3991766165)))) {
178
0
        mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
179
0
        return false;
180
0
    }
181
0
    (reply__).EndRead(iter__, (reply__).type());
182
0
183
0
    return true;
184
0
}
185
186
auto PPluginModuleParent::CallNP_GetEntryPoints(NPError* rv) -> bool
187
0
{
188
0
    IPC::Message* msg__ = PPluginModule::Msg_NP_GetEntryPoints(MSG_ROUTING_CONTROL);
189
0
190
0
191
0
192
0
193
0
    Message reply__;
194
0
195
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
196
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
197
0
    }
198
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_NP_GetEntryPoints", OTHER);
199
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
200
0
        mozilla::ipc::LogicError("Transition error");
201
0
    }
202
0
203
0
    bool sendok__;
204
0
    {
205
0
        AUTO_PROFILER_TRACING("IPC", "PPluginModule::Msg_NP_GetEntryPoints");
206
0
        sendok__ = (GetIPCChannel())->Call(msg__, (&(reply__)));
207
0
    }
208
0
    if ((!(sendok__))) {
209
0
        return false;
210
0
    }
211
0
212
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
213
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
214
0
    }
215
0
216
0
    PickleIterator iter__(reply__);
217
0
218
0
    if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, rv)))) {
219
0
        FatalError("Error deserializing 'NPError'");
220
0
        return false;
221
0
    }
222
0
    // Sentinel = 'rv'
223
0
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 702481058)))) {
224
0
        mozilla::ipc::SentinelReadError("Error deserializing 'NPError'");
225
0
        return false;
226
0
    }
227
0
    (reply__).EndRead(iter__, (reply__).type());
228
0
229
0
    return true;
230
0
}
231
232
auto PPluginModuleParent::CallNP_Initialize(
233
        const PluginSettings& settings,
234
        NPError* rv) -> bool
235
0
{
236
0
    IPC::Message* msg__ = PPluginModule::Msg_NP_Initialize(MSG_ROUTING_CONTROL);
237
0
238
0
    WriteIPDLParam(msg__, this, settings);
239
0
    // Sentinel = 'settings'
240
0
    (msg__)->WriteSentinel(2402913383);
241
0
242
0
243
0
244
0
    Message reply__;
245
0
246
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
247
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
248
0
    }
249
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_NP_Initialize", OTHER);
250
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
251
0
        mozilla::ipc::LogicError("Transition error");
252
0
    }
253
0
254
0
    bool sendok__;
255
0
    {
256
0
        AUTO_PROFILER_TRACING("IPC", "PPluginModule::Msg_NP_Initialize");
257
0
        sendok__ = (GetIPCChannel())->Call(msg__, (&(reply__)));
258
0
    }
259
0
    if ((!(sendok__))) {
260
0
        return false;
261
0
    }
262
0
263
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
264
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
265
0
    }
266
0
267
0
    PickleIterator iter__(reply__);
268
0
269
0
    if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, rv)))) {
270
0
        FatalError("Error deserializing 'NPError'");
271
0
        return false;
272
0
    }
273
0
    // Sentinel = 'rv'
274
0
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 702481058)))) {
275
0
        mozilla::ipc::SentinelReadError("Error deserializing 'NPError'");
276
0
        return false;
277
0
    }
278
0
    (reply__).EndRead(iter__, (reply__).type());
279
0
280
0
    return true;
281
0
}
282
283
auto PPluginModuleParent::SendPPluginInstanceConstructor(
284
        const nsCString& aMimeType,
285
        const nsTArray<nsCString>& aNames,
286
        const nsTArray<nsCString>& aValues) -> PPluginInstanceParent*
287
0
{
288
0
    return SendPPluginInstanceConstructor(AllocPPluginInstanceParent(aMimeType, aNames, aValues), aMimeType, aNames, aValues);
289
0
}
290
291
auto PPluginModuleParent::SendPPluginInstanceConstructor(
292
        PPluginInstanceParent* actor,
293
        const nsCString& aMimeType,
294
        const nsTArray<nsCString>& aNames,
295
        const nsTArray<nsCString>& aValues) -> PPluginInstanceParent*
296
0
{
297
0
    if ((!(actor))) {
298
0
        NS_WARNING("Error constructing actor PPluginInstanceParent");
299
0
        return nullptr;
300
0
    }
301
0
    (actor)->SetManagerAndRegister(this);
302
0
    (mManagedPPluginInstanceParent).PutEntry(actor);
303
0
    (actor)->mLivenessState = mozilla::ipc::ReEntrantDeleteLivenessState::Start;
304
0
305
0
    IPC::Message* msg__ = PPluginModule::Msg_PPluginInstanceConstructor(MSG_ROUTING_CONTROL);
306
0
307
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
308
0
    WriteIPDLParam(msg__, this, actor);
309
0
    // Sentinel = 'actor'
310
0
    (msg__)->WriteSentinel(875202478);
311
0
    WriteIPDLParam(msg__, this, aMimeType);
312
0
    // Sentinel = 'aMimeType'
313
0
    (msg__)->WriteSentinel(698220456);
314
0
    WriteIPDLParam(msg__, this, aNames);
315
0
    // Sentinel = 'aNames'
316
0
    (msg__)->WriteSentinel(1643765405);
317
0
    WriteIPDLParam(msg__, this, aValues);
318
0
    // Sentinel = 'aValues'
319
0
    (msg__)->WriteSentinel(223787060);
320
0
321
0
322
0
323
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
324
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
325
0
    }
326
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_PPluginInstanceConstructor", OTHER);
327
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
328
0
        mozilla::ipc::LogicError("Transition error");
329
0
    }
330
0
331
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
332
0
    if ((!(sendok__))) {
333
0
        IProtocol* mgr = (actor)->Manager();
334
0
        (actor)->DestroySubtree(FailedConstructor);
335
0
        (actor)->DeallocSubtree();
336
0
        (mgr)->RemoveManagee(PPluginInstanceMsgStart, actor);
337
0
        return nullptr;
338
0
    }
339
0
    return actor;
340
0
}
341
342
auto PPluginModuleParent::CallSyncNPP_New(
343
        PPluginInstanceParent* aActor,
344
        NPError* rv) -> bool
345
0
{
346
0
    IPC::Message* msg__ = PPluginModule::Msg_SyncNPP_New(MSG_ROUTING_CONTROL);
347
0
348
0
    MOZ_RELEASE_ASSERT(aActor, "NULL actor value passed to non-nullable param");
349
0
    WriteIPDLParam(msg__, this, aActor);
350
0
    // Sentinel = 'aActor'
351
0
    (msg__)->WriteSentinel(654298798);
352
0
353
0
354
0
355
0
    Message reply__;
356
0
357
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
358
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
359
0
    }
360
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_SyncNPP_New", OTHER);
361
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
362
0
        mozilla::ipc::LogicError("Transition error");
363
0
    }
364
0
365
0
    bool sendok__;
366
0
    {
367
0
        AUTO_PROFILER_TRACING("IPC", "PPluginModule::Msg_SyncNPP_New");
368
0
        sendok__ = (GetIPCChannel())->Call(msg__, (&(reply__)));
369
0
    }
370
0
    if ((!(sendok__))) {
371
0
        return false;
372
0
    }
373
0
374
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
375
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
376
0
    }
377
0
378
0
    PickleIterator iter__(reply__);
379
0
380
0
    if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, rv)))) {
381
0
        FatalError("Error deserializing 'NPError'");
382
0
        return false;
383
0
    }
384
0
    // Sentinel = 'rv'
385
0
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 702481058)))) {
386
0
        mozilla::ipc::SentinelReadError("Error deserializing 'NPError'");
387
0
        return false;
388
0
    }
389
0
    (reply__).EndRead(iter__, (reply__).type());
390
0
391
0
    return true;
392
0
}
393
394
auto PPluginModuleParent::CallNP_Shutdown(NPError* rv) -> bool
395
0
{
396
0
    IPC::Message* msg__ = PPluginModule::Msg_NP_Shutdown(MSG_ROUTING_CONTROL);
397
0
398
0
399
0
400
0
401
0
    Message reply__;
402
0
403
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
404
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
405
0
    }
406
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_NP_Shutdown", OTHER);
407
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
408
0
        mozilla::ipc::LogicError("Transition error");
409
0
    }
410
0
411
0
    bool sendok__;
412
0
    {
413
0
        AUTO_PROFILER_TRACING("IPC", "PPluginModule::Msg_NP_Shutdown");
414
0
        sendok__ = (GetIPCChannel())->Call(msg__, (&(reply__)));
415
0
    }
416
0
    if ((!(sendok__))) {
417
0
        return false;
418
0
    }
419
0
420
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
421
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
422
0
    }
423
0
424
0
    PickleIterator iter__(reply__);
425
0
426
0
    if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, rv)))) {
427
0
        FatalError("Error deserializing 'NPError'");
428
0
        return false;
429
0
    }
430
0
    // Sentinel = 'rv'
431
0
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 702481058)))) {
432
0
        mozilla::ipc::SentinelReadError("Error deserializing 'NPError'");
433
0
        return false;
434
0
    }
435
0
    (reply__).EndRead(iter__, (reply__).type());
436
0
437
0
    return true;
438
0
}
439
440
auto PPluginModuleParent::CallOptionalFunctionsSupported(
441
        bool* aURLRedirectNotify,
442
        bool* aClearSiteData,
443
        bool* aGetSitesWithData) -> bool
444
0
{
445
0
    IPC::Message* msg__ = PPluginModule::Msg_OptionalFunctionsSupported(MSG_ROUTING_CONTROL);
446
0
447
0
448
0
449
0
450
0
    Message reply__;
451
0
452
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
453
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
454
0
    }
455
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_OptionalFunctionsSupported", OTHER);
456
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
457
0
        mozilla::ipc::LogicError("Transition error");
458
0
    }
459
0
460
0
    bool sendok__;
461
0
    {
462
0
        AUTO_PROFILER_TRACING("IPC", "PPluginModule::Msg_OptionalFunctionsSupported");
463
0
        sendok__ = (GetIPCChannel())->Call(msg__, (&(reply__)));
464
0
    }
465
0
    if ((!(sendok__))) {
466
0
        return false;
467
0
    }
468
0
469
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
470
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
471
0
    }
472
0
473
0
    PickleIterator iter__(reply__);
474
0
475
0
    if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, aURLRedirectNotify)))) {
476
0
        FatalError("Error deserializing 'bool'");
477
0
        return false;
478
0
    }
479
0
    // Sentinel = 'aURLRedirectNotify'
480
0
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 4040347717)))) {
481
0
        mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
482
0
        return false;
483
0
    }
484
0
    if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, aClearSiteData)))) {
485
0
        FatalError("Error deserializing 'bool'");
486
0
        return false;
487
0
    }
488
0
    // Sentinel = 'aClearSiteData'
489
0
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 357136587)))) {
490
0
        mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
491
0
        return false;
492
0
    }
493
0
    if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, aGetSitesWithData)))) {
494
0
        FatalError("Error deserializing 'bool'");
495
0
        return false;
496
0
    }
497
0
    // Sentinel = 'aGetSitesWithData'
498
0
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 1891549156)))) {
499
0
        mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
500
0
        return false;
501
0
    }
502
0
    (reply__).EndRead(iter__, (reply__).type());
503
0
504
0
    return true;
505
0
}
506
507
auto PPluginModuleParent::SendNPP_ClearSiteData(
508
        const nsCString& site,
509
        const uint64_t& flags,
510
        const uint64_t& maxAge,
511
        const uint64_t& aCallbackId) -> bool
512
0
{
513
0
    IPC::Message* msg__ = PPluginModule::Msg_NPP_ClearSiteData(MSG_ROUTING_CONTROL);
514
0
515
0
    WriteIPDLParam(msg__, this, site);
516
0
    // Sentinel = 'site'
517
0
    (msg__)->WriteSentinel(925048205);
518
0
    WriteIPDLParam(msg__, this, flags);
519
0
    // Sentinel = 'flags'
520
0
    (msg__)->WriteSentinel(2550519284);
521
0
    WriteIPDLParam(msg__, this, maxAge);
522
0
    // Sentinel = 'maxAge'
523
0
    (msg__)->WriteSentinel(4136822029);
524
0
    WriteIPDLParam(msg__, this, aCallbackId);
525
0
    // Sentinel = 'aCallbackId'
526
0
    (msg__)->WriteSentinel(1362998144);
527
0
528
0
529
0
530
0
531
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
532
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
533
0
    }
534
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_NPP_ClearSiteData", 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 PPluginModuleParent::SendNPP_GetSitesWithData(const uint64_t& aCallbackId) -> bool
544
0
{
545
0
    IPC::Message* msg__ = PPluginModule::Msg_NPP_GetSitesWithData(MSG_ROUTING_CONTROL);
546
0
547
0
    WriteIPDLParam(msg__, this, aCallbackId);
548
0
    // Sentinel = 'aCallbackId'
549
0
    (msg__)->WriteSentinel(1362998144);
550
0
551
0
552
0
553
0
554
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
555
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
556
0
    }
557
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_NPP_GetSitesWithData", OTHER);
558
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
559
0
        mozilla::ipc::LogicError("Transition error");
560
0
    }
561
0
562
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
563
0
    return sendok__;
564
0
}
565
566
auto PPluginModuleParent::SendSetAudioSessionData(
567
        const nsID& aID,
568
        const nsString& aDisplayName,
569
        const nsString& aIconPath) -> bool
570
0
{
571
0
    IPC::Message* msg__ = PPluginModule::Msg_SetAudioSessionData(MSG_ROUTING_CONTROL);
572
0
573
0
    WriteIPDLParam(msg__, this, aID);
574
0
    // Sentinel = 'aID'
575
0
    (msg__)->WriteSentinel(2735041849);
576
0
    WriteIPDLParam(msg__, this, aDisplayName);
577
0
    // Sentinel = 'aDisplayName'
578
0
    (msg__)->WriteSentinel(531102644);
579
0
    WriteIPDLParam(msg__, this, aIconPath);
580
0
    // Sentinel = 'aIconPath'
581
0
    (msg__)->WriteSentinel(2359874914);
582
0
583
0
584
0
585
0
586
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
587
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
588
0
    }
589
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_SetAudioSessionData", OTHER);
590
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
591
0
        mozilla::ipc::LogicError("Transition error");
592
0
    }
593
0
594
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
595
0
    return sendok__;
596
0
}
597
598
auto PPluginModuleParent::SendSetParentHangTimeout(const uint32_t& seconds) -> bool
599
0
{
600
0
    IPC::Message* msg__ = PPluginModule::Msg_SetParentHangTimeout(MSG_ROUTING_CONTROL);
601
0
602
0
    WriteIPDLParam(msg__, this, seconds);
603
0
    // Sentinel = 'seconds'
604
0
    (msg__)->WriteSentinel(3246051016);
605
0
606
0
607
0
608
0
609
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
610
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
611
0
    }
612
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_SetParentHangTimeout", OTHER);
613
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
614
0
        mozilla::ipc::LogicError("Transition error");
615
0
    }
616
0
617
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
618
0
    return sendok__;
619
0
}
620
621
auto PPluginModuleParent::CallInitCrashReporter(
622
        Shmem& shmem,
623
        NativeThreadId* tid) -> bool
624
0
{
625
0
    IPC::Message* msg__ = PPluginModule::Msg_InitCrashReporter(MSG_ROUTING_CONTROL);
626
0
627
0
    WriteIPDLParam(msg__, this, shmem);
628
0
    // Sentinel = 'shmem'
629
0
    (msg__)->WriteSentinel(4252604405);
630
0
631
0
632
0
633
0
    Message reply__;
634
0
635
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
636
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
637
0
    }
638
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_InitCrashReporter", OTHER);
639
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
640
0
        mozilla::ipc::LogicError("Transition error");
641
0
    }
642
0
643
0
    bool sendok__;
644
0
    {
645
0
        AUTO_PROFILER_TRACING("IPC", "PPluginModule::Msg_InitCrashReporter");
646
0
        sendok__ = (GetIPCChannel())->Call(msg__, (&(reply__)));
647
0
    }
648
0
    if ((!(sendok__))) {
649
0
        return false;
650
0
    }
651
0
652
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
653
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
654
0
    }
655
0
656
0
    PickleIterator iter__(reply__);
657
0
658
0
    if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, tid)))) {
659
0
        FatalError("Error deserializing 'NativeThreadId'");
660
0
        return false;
661
0
    }
662
0
    // Sentinel = 'tid'
663
0
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 333309880)))) {
664
0
        mozilla::ipc::SentinelReadError("Error deserializing 'NativeThreadId'");
665
0
        return false;
666
0
    }
667
0
    (reply__).EndRead(iter__, (reply__).type());
668
0
669
0
    return true;
670
0
}
671
672
auto PPluginModuleParent::SendSettingChanged(const PluginSettings& settings) -> bool
673
0
{
674
0
    IPC::Message* msg__ = PPluginModule::Msg_SettingChanged(MSG_ROUTING_CONTROL);
675
0
676
0
    WriteIPDLParam(msg__, this, settings);
677
0
    // Sentinel = 'settings'
678
0
    (msg__)->WriteSentinel(2402913383);
679
0
680
0
681
0
682
0
683
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
684
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
685
0
    }
686
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_SettingChanged", OTHER);
687
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
688
0
        mozilla::ipc::LogicError("Transition error");
689
0
    }
690
0
691
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
692
0
    return sendok__;
693
0
}
694
695
auto PPluginModuleParent::SendNPP_SetValue_NPNVaudioDeviceChangeDetails(const NPAudioDeviceChangeDetailsIPC& changeDetails) -> bool
696
0
{
697
0
    IPC::Message* msg__ = PPluginModule::Msg_NPP_SetValue_NPNVaudioDeviceChangeDetails(MSG_ROUTING_CONTROL);
698
0
699
0
    WriteIPDLParam(msg__, this, changeDetails);
700
0
    // Sentinel = 'changeDetails'
701
0
    (msg__)->WriteSentinel(331935927);
702
0
703
0
704
0
705
0
706
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
707
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
708
0
    }
709
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_NPP_SetValue_NPNVaudioDeviceChangeDetails", OTHER);
710
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
711
0
        mozilla::ipc::LogicError("Transition error");
712
0
    }
713
0
714
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
715
0
    return sendok__;
716
0
}
717
718
auto PPluginModuleParent::SendNPP_SetValue_NPNVaudioDeviceStateChanged(const NPAudioDeviceStateChangedIPC& deviceState) -> bool
719
0
{
720
0
    IPC::Message* msg__ = PPluginModule::Msg_NPP_SetValue_NPNVaudioDeviceStateChanged(MSG_ROUTING_CONTROL);
721
0
722
0
    WriteIPDLParam(msg__, this, deviceState);
723
0
    // Sentinel = 'deviceState'
724
0
    (msg__)->WriteSentinel(238582270);
725
0
726
0
727
0
728
0
729
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
730
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
731
0
    }
732
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_NPP_SetValue_NPNVaudioDeviceStateChanged", OTHER);
733
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
734
0
        mozilla::ipc::LogicError("Transition error");
735
0
    }
736
0
737
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
738
0
    return sendok__;
739
0
}
740
741
auto PPluginModuleParent::SendInitPluginModuleChild(const Endpoint<mozilla::plugins::PPluginModuleChild>& endpoint) -> bool
742
0
{
743
0
    IPC::Message* msg__ = PPluginModule::Msg_InitPluginModuleChild(MSG_ROUTING_CONTROL);
744
0
745
0
    WriteIPDLParam(msg__, this, endpoint);
746
0
    // Sentinel = 'endpoint'
747
0
    (msg__)->WriteSentinel(3610972515);
748
0
749
0
750
0
751
0
752
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
753
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
754
0
    }
755
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_InitPluginModuleChild", OTHER);
756
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
757
0
        mozilla::ipc::LogicError("Transition error");
758
0
    }
759
0
760
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
761
0
    return sendok__;
762
0
}
763
764
auto PPluginModuleParent::SendInitPluginFunctionBroker(const Endpoint<mozilla::plugins::PFunctionBrokerChild>& endpoint) -> bool
765
0
{
766
0
    IPC::Message* msg__ = PPluginModule::Msg_InitPluginFunctionBroker(MSG_ROUTING_CONTROL);
767
0
768
0
    WriteIPDLParam(msg__, this, endpoint);
769
0
    // Sentinel = 'endpoint'
770
0
    (msg__)->WriteSentinel(3610972515);
771
0
772
0
773
0
774
0
775
0
    if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
776
0
        mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
777
0
    }
778
0
    AUTO_PROFILER_LABEL("PPluginModule::Msg_InitPluginFunctionBroker", OTHER);
779
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
780
0
        mozilla::ipc::LogicError("Transition error");
781
0
    }
782
0
783
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
784
0
    return sendok__;
785
0
}
786
787
auto PPluginModuleParent::RemoveManagee(
788
        int32_t aProtocolId,
789
        IProtocol* aListener) -> void
790
0
{
791
0
    switch (aProtocolId) {
792
0
    case PPluginInstanceMsgStart:
793
0
        {
794
0
            PPluginInstanceParent* actor = static_cast<PPluginInstanceParent*>(aListener);
795
0
            auto& container = mManagedPPluginInstanceParent;
796
0
            MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
797
0
798
0
            (container).RemoveEntry(actor);
799
0
            DeallocPPluginInstanceParent(actor);
800
0
            return;
801
0
        }
802
0
    default:
803
0
        {
804
0
            FatalError("unreached");
805
0
            return;
806
0
        }
807
0
    }
808
0
}
809
810
auto PPluginModuleParent::OnMessageReceived(const Message& msg__) -> PPluginModuleParent::Result
811
0
{
812
0
    int32_t route__ = (msg__).routing_id();
813
0
    if ((MSG_ROUTING_CONTROL) != (route__)) {
814
0
        IProtocol* routed__ = Lookup(route__);
815
0
        if ((!(routed__))) {
816
0
            return MsgRouteError;
817
0
        }
818
0
        return (routed__)->OnMessageReceived(msg__);
819
0
    }
820
0
821
0
    switch ((msg__).type()) {
822
0
    case PPluginModule::Msg_ProcessNativeEventsInInterruptCall__ID:
823
0
        {
824
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
825
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
826
0
            }
827
0
            AUTO_PROFILER_LABEL("PPluginModule::Msg_ProcessNativeEventsInInterruptCall", OTHER);
828
0
829
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
830
0
                FatalError("Transition error");
831
0
                return MsgValueError;
832
0
            }
833
0
            if ((!(RecvProcessNativeEventsInInterruptCall()))) {
834
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
835
0
                // Error handled in mozilla::ipc::IPCResult
836
0
                return MsgProcessingError;
837
0
            }
838
0
839
0
            return MsgProcessed;
840
0
        }
841
0
    case PPluginModule::Reply_PPluginInstanceConstructor__ID:
842
0
        {
843
0
            return MsgProcessed;
844
0
        }
845
0
    case PPluginModule::Msg_BackUpXResources__ID:
846
0
        {
847
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
848
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
849
0
            }
850
0
            AUTO_PROFILER_LABEL("PPluginModule::Msg_BackUpXResources", OTHER);
851
0
852
0
            PickleIterator iter__(msg__);
853
0
            FileDescriptor aXSocketFd;
854
0
855
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aXSocketFd)))))) {
856
0
                FatalError("Error deserializing 'FileDescriptor'");
857
0
                return MsgValueError;
858
0
            }
859
0
            // Sentinel = 'aXSocketFd'
860
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1448798316)))) {
861
0
                mozilla::ipc::SentinelReadError("Error deserializing 'FileDescriptor'");
862
0
                return MsgValueError;
863
0
            }
864
0
            (msg__).EndRead(iter__, (msg__).type());
865
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
866
0
                FatalError("Transition error");
867
0
                return MsgValueError;
868
0
            }
869
0
            if ((!(RecvBackUpXResources(aXSocketFd)))) {
870
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
871
0
                // Error handled in mozilla::ipc::IPCResult
872
0
                return MsgProcessingError;
873
0
            }
874
0
875
0
            return MsgProcessed;
876
0
        }
877
0
    case PPluginModule::Msg_PluginShowWindow__ID:
878
0
        {
879
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
880
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
881
0
            }
882
0
            AUTO_PROFILER_LABEL("PPluginModule::Msg_PluginShowWindow", OTHER);
883
0
884
0
            PickleIterator iter__(msg__);
885
0
            uint32_t aWindowId;
886
0
            bool aModal;
887
0
            int32_t aX;
888
0
            int32_t aY;
889
0
            size_t aWidth;
890
0
            size_t aHeight;
891
0
892
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aWindowId)))))) {
893
0
                FatalError("Error deserializing 'uint32_t'");
894
0
                return MsgValueError;
895
0
            }
896
0
            // Sentinel = 'aWindowId'
897
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3844940347)))) {
898
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
899
0
                return MsgValueError;
900
0
            }
901
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aModal)))))) {
902
0
                FatalError("Error deserializing 'bool'");
903
0
                return MsgValueError;
904
0
            }
905
0
            // Sentinel = 'aModal'
906
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1748782442)))) {
907
0
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
908
0
                return MsgValueError;
909
0
            }
910
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aX)))))) {
911
0
                FatalError("Error deserializing 'int32_t'");
912
0
                return MsgValueError;
913
0
            }
914
0
            // Sentinel = 'aX'
915
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2745208761)))) {
916
0
                mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'");
917
0
                return MsgValueError;
918
0
            }
919
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aY)))))) {
920
0
                FatalError("Error deserializing 'int32_t'");
921
0
                return MsgValueError;
922
0
            }
923
0
            // Sentinel = 'aY'
924
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2745208760)))) {
925
0
                mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'");
926
0
                return MsgValueError;
927
0
            }
928
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aWidth)))))) {
929
0
                FatalError("Error deserializing 'size_t'");
930
0
                return MsgValueError;
931
0
            }
932
0
            // Sentinel = 'aWidth'
933
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 196646625)))) {
934
0
                mozilla::ipc::SentinelReadError("Error deserializing 'size_t'");
935
0
                return MsgValueError;
936
0
            }
937
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aHeight)))))) {
938
0
                FatalError("Error deserializing 'size_t'");
939
0
                return MsgValueError;
940
0
            }
941
0
            // Sentinel = 'aHeight'
942
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3588433859)))) {
943
0
                mozilla::ipc::SentinelReadError("Error deserializing 'size_t'");
944
0
                return MsgValueError;
945
0
            }
946
0
            (msg__).EndRead(iter__, (msg__).type());
947
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
948
0
                FatalError("Transition error");
949
0
                return MsgValueError;
950
0
            }
951
0
            if ((!(RecvPluginShowWindow(aWindowId, aModal, aX, aY, aWidth, aHeight)))) {
952
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
953
0
                // Error handled in mozilla::ipc::IPCResult
954
0
                return MsgProcessingError;
955
0
            }
956
0
957
0
            return MsgProcessed;
958
0
        }
959
0
    case PPluginModule::Msg_PluginHideWindow__ID:
960
0
        {
961
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
962
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
963
0
            }
964
0
            AUTO_PROFILER_LABEL("PPluginModule::Msg_PluginHideWindow", OTHER);
965
0
966
0
            PickleIterator iter__(msg__);
967
0
            uint32_t aWindowId;
968
0
969
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aWindowId)))))) {
970
0
                FatalError("Error deserializing 'uint32_t'");
971
0
                return MsgValueError;
972
0
            }
973
0
            // Sentinel = 'aWindowId'
974
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3844940347)))) {
975
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
976
0
                return MsgValueError;
977
0
            }
978
0
            (msg__).EndRead(iter__, (msg__).type());
979
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
980
0
                FatalError("Transition error");
981
0
                return MsgValueError;
982
0
            }
983
0
            if ((!(RecvPluginHideWindow(aWindowId)))) {
984
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
985
0
                // Error handled in mozilla::ipc::IPCResult
986
0
                return MsgProcessingError;
987
0
            }
988
0
989
0
            return MsgProcessed;
990
0
        }
991
0
    case PPluginModule::Msg_SetCursor__ID:
992
0
        {
993
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
994
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
995
0
            }
996
0
            AUTO_PROFILER_LABEL("PPluginModule::Msg_SetCursor", OTHER);
997
0
998
0
            PickleIterator iter__(msg__);
999
0
            NSCursorInfo cursorInfo;
1000
0
1001
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(cursorInfo)))))) {
1002
0
                FatalError("Error deserializing 'NSCursorInfo'");
1003
0
                return MsgValueError;
1004
0
            }
1005
0
            // Sentinel = 'cursorInfo'
1006
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 351096996)))) {
1007
0
                mozilla::ipc::SentinelReadError("Error deserializing 'NSCursorInfo'");
1008
0
                return MsgValueError;
1009
0
            }
1010
0
            (msg__).EndRead(iter__, (msg__).type());
1011
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1012
0
                FatalError("Transition error");
1013
0
                return MsgValueError;
1014
0
            }
1015
0
            if ((!(RecvSetCursor(cursorInfo)))) {
1016
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1017
0
                // Error handled in mozilla::ipc::IPCResult
1018
0
                return MsgProcessingError;
1019
0
            }
1020
0
1021
0
            return MsgProcessed;
1022
0
        }
1023
0
    case PPluginModule::Msg_ShowCursor__ID:
1024
0
        {
1025
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
1026
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1027
0
            }
1028
0
            AUTO_PROFILER_LABEL("PPluginModule::Msg_ShowCursor", OTHER);
1029
0
1030
0
            PickleIterator iter__(msg__);
1031
0
            bool show;
1032
0
1033
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(show)))))) {
1034
0
                FatalError("Error deserializing 'bool'");
1035
0
                return MsgValueError;
1036
0
            }
1037
0
            // Sentinel = 'show'
1038
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 352668679)))) {
1039
0
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
1040
0
                return MsgValueError;
1041
0
            }
1042
0
            (msg__).EndRead(iter__, (msg__).type());
1043
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1044
0
                FatalError("Transition error");
1045
0
                return MsgValueError;
1046
0
            }
1047
0
            if ((!(RecvShowCursor(show)))) {
1048
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1049
0
                // Error handled in mozilla::ipc::IPCResult
1050
0
                return MsgProcessingError;
1051
0
            }
1052
0
1053
0
            return MsgProcessed;
1054
0
        }
1055
0
    case PPluginModule::Msg_PushCursor__ID:
1056
0
        {
1057
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
1058
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1059
0
            }
1060
0
            AUTO_PROFILER_LABEL("PPluginModule::Msg_PushCursor", OTHER);
1061
0
1062
0
            PickleIterator iter__(msg__);
1063
0
            NSCursorInfo cursorInfo;
1064
0
1065
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(cursorInfo)))))) {
1066
0
                FatalError("Error deserializing 'NSCursorInfo'");
1067
0
                return MsgValueError;
1068
0
            }
1069
0
            // Sentinel = 'cursorInfo'
1070
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 351096996)))) {
1071
0
                mozilla::ipc::SentinelReadError("Error deserializing 'NSCursorInfo'");
1072
0
                return MsgValueError;
1073
0
            }
1074
0
            (msg__).EndRead(iter__, (msg__).type());
1075
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1076
0
                FatalError("Transition error");
1077
0
                return MsgValueError;
1078
0
            }
1079
0
            if ((!(RecvPushCursor(cursorInfo)))) {
1080
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1081
0
                // Error handled in mozilla::ipc::IPCResult
1082
0
                return MsgProcessingError;
1083
0
            }
1084
0
1085
0
            return MsgProcessed;
1086
0
        }
1087
0
    case PPluginModule::Msg_PopCursor__ID:
1088
0
        {
1089
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
1090
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1091
0
            }
1092
0
            AUTO_PROFILER_LABEL("PPluginModule::Msg_PopCursor", OTHER);
1093
0
1094
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1095
0
                FatalError("Transition error");
1096
0
                return MsgValueError;
1097
0
            }
1098
0
            if ((!(RecvPopCursor()))) {
1099
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1100
0
                // Error handled in mozilla::ipc::IPCResult
1101
0
                return MsgProcessingError;
1102
0
            }
1103
0
1104
0
            return MsgProcessed;
1105
0
        }
1106
0
    case PPluginModule::Msg_NPN_ReloadPlugins__ID:
1107
0
        {
1108
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
1109
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1110
0
            }
1111
0
            AUTO_PROFILER_LABEL("PPluginModule::Msg_NPN_ReloadPlugins", OTHER);
1112
0
1113
0
            PickleIterator iter__(msg__);
1114
0
            bool aReloadPages;
1115
0
1116
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aReloadPages)))))) {
1117
0
                FatalError("Error deserializing 'bool'");
1118
0
                return MsgValueError;
1119
0
            }
1120
0
            // Sentinel = 'aReloadPages'
1121
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1141623534)))) {
1122
0
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
1123
0
                return MsgValueError;
1124
0
            }
1125
0
            (msg__).EndRead(iter__, (msg__).type());
1126
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1127
0
                FatalError("Transition error");
1128
0
                return MsgValueError;
1129
0
            }
1130
0
            if ((!(RecvNPN_ReloadPlugins(aReloadPages)))) {
1131
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1132
0
                // Error handled in mozilla::ipc::IPCResult
1133
0
                return MsgProcessingError;
1134
0
            }
1135
0
1136
0
            return MsgProcessed;
1137
0
        }
1138
0
    case PPluginModule::Msg_NotifyContentModuleDestroyed__ID:
1139
0
        {
1140
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
1141
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1142
0
            }
1143
0
            AUTO_PROFILER_LABEL("PPluginModule::Msg_NotifyContentModuleDestroyed", OTHER);
1144
0
1145
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1146
0
                FatalError("Transition error");
1147
0
                return MsgValueError;
1148
0
            }
1149
0
            if ((!(RecvNotifyContentModuleDestroyed()))) {
1150
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1151
0
                // Error handled in mozilla::ipc::IPCResult
1152
0
                return MsgProcessingError;
1153
0
            }
1154
0
1155
0
            return MsgProcessed;
1156
0
        }
1157
0
    case PPluginModule::Msg_ReturnClearSiteData__ID:
1158
0
        {
1159
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
1160
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1161
0
            }
1162
0
            AUTO_PROFILER_LABEL("PPluginModule::Msg_ReturnClearSiteData", OTHER);
1163
0
1164
0
            PickleIterator iter__(msg__);
1165
0
            NPError aRv;
1166
0
            uint64_t aCallbackId;
1167
0
1168
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aRv)))))) {
1169
0
                FatalError("Error deserializing 'NPError'");
1170
0
                return MsgValueError;
1171
0
            }
1172
0
            // Sentinel = 'aRv'
1173
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2742041894)))) {
1174
0
                mozilla::ipc::SentinelReadError("Error deserializing 'NPError'");
1175
0
                return MsgValueError;
1176
0
            }
1177
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aCallbackId)))))) {
1178
0
                FatalError("Error deserializing 'uint64_t'");
1179
0
                return MsgValueError;
1180
0
            }
1181
0
            // Sentinel = 'aCallbackId'
1182
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1362998144)))) {
1183
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
1184
0
                return MsgValueError;
1185
0
            }
1186
0
            (msg__).EndRead(iter__, (msg__).type());
1187
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1188
0
                FatalError("Transition error");
1189
0
                return MsgValueError;
1190
0
            }
1191
0
            if ((!(RecvReturnClearSiteData(aRv, aCallbackId)))) {
1192
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1193
0
                // Error handled in mozilla::ipc::IPCResult
1194
0
                return MsgProcessingError;
1195
0
            }
1196
0
1197
0
            return MsgProcessed;
1198
0
        }
1199
0
    case PPluginModule::Msg_ReturnSitesWithData__ID:
1200
0
        {
1201
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
1202
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1203
0
            }
1204
0
            AUTO_PROFILER_LABEL("PPluginModule::Msg_ReturnSitesWithData", OTHER);
1205
0
1206
0
            PickleIterator iter__(msg__);
1207
0
            nsTArray<nsCString> aSites;
1208
0
            uint64_t aCallbackId;
1209
0
1210
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aSites)))))) {
1211
0
                FatalError("Error deserializing 'nsTArray'");
1212
0
                return MsgValueError;
1213
0
            }
1214
0
            // Sentinel = 'aSites'
1215
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2169354461)))) {
1216
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'");
1217
0
                return MsgValueError;
1218
0
            }
1219
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aCallbackId)))))) {
1220
0
                FatalError("Error deserializing 'uint64_t'");
1221
0
                return MsgValueError;
1222
0
            }
1223
0
            // Sentinel = 'aCallbackId'
1224
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1362998144)))) {
1225
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
1226
0
                return MsgValueError;
1227
0
            }
1228
0
            (msg__).EndRead(iter__, (msg__).type());
1229
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1230
0
                FatalError("Transition error");
1231
0
                return MsgValueError;
1232
0
            }
1233
0
            if ((!(RecvReturnSitesWithData(std::move(aSites), aCallbackId)))) {
1234
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1235
0
                // Error handled in mozilla::ipc::IPCResult
1236
0
                return MsgProcessingError;
1237
0
            }
1238
0
1239
0
            return MsgProcessed;
1240
0
        }
1241
0
    default:
1242
0
        {
1243
0
            return MsgNotKnown;
1244
0
        }
1245
0
    case SHMEM_CREATED_MESSAGE_TYPE:
1246
0
        {
1247
0
            if ((!(ShmemCreated(msg__)))) {
1248
0
                return MsgPayloadError;
1249
0
            }
1250
0
            return MsgProcessed;
1251
0
        }
1252
0
    case SHMEM_DESTROYED_MESSAGE_TYPE:
1253
0
        {
1254
0
            if ((!(ShmemDestroyed(msg__)))) {
1255
0
                return MsgPayloadError;
1256
0
            }
1257
0
            return MsgProcessed;
1258
0
        }
1259
0
    }
1260
0
}
1261
1262
auto PPluginModuleParent::OnMessageReceived(
1263
        const Message& msg__,
1264
        Message*& reply__) -> PPluginModuleParent::Result
1265
0
{
1266
0
    int32_t route__ = (msg__).routing_id();
1267
0
    if ((MSG_ROUTING_CONTROL) != (route__)) {
1268
0
        IProtocol* routed__ = Lookup(route__);
1269
0
        if ((!(routed__))) {
1270
0
            return MsgRouteError;
1271
0
        }
1272
0
        return (routed__)->OnMessageReceived(msg__, reply__);
1273
0
    }
1274
0
1275
0
    switch ((msg__).type()) {
1276
0
    case PPluginModule::Msg_NPN_SetException__ID:
1277
0
        {
1278
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
1279
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1280
0
            }
1281
0
            AUTO_PROFILER_LABEL("PPluginModule::Msg_NPN_SetException", OTHER);
1282
0
1283
0
            PickleIterator iter__(msg__);
1284
0
            nsCString message;
1285
0
1286
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(message)))))) {
1287
0
                FatalError("Error deserializing 'nsCString'");
1288
0
                return MsgValueError;
1289
0
            }
1290
0
            // Sentinel = 'message'
1291
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1366108954)))) {
1292
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
1293
0
                return MsgValueError;
1294
0
            }
1295
0
            (msg__).EndRead(iter__, (msg__).type());
1296
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1297
0
                FatalError("Transition error");
1298
0
                return MsgValueError;
1299
0
            }
1300
0
            int32_t id__ = MSG_ROUTING_CONTROL;
1301
0
            if ((!(RecvNPN_SetException(message)))) {
1302
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1303
0
                // Error handled in mozilla::ipc::IPCResult
1304
0
                return MsgProcessingError;
1305
0
            }
1306
0
1307
0
            reply__ = PPluginModule::Reply_NPN_SetException(id__);
1308
0
1309
0
1310
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
1311
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
1312
0
            }
1313
0
            return MsgProcessed;
1314
0
        }
1315
0
    default:
1316
0
        {
1317
0
            return MsgNotKnown;
1318
0
        }
1319
0
    }
1320
0
}
1321
1322
auto PPluginModuleParent::OnCallReceived(
1323
        const Message& msg__,
1324
        Message*& reply__) -> PPluginModuleParent::Result
1325
0
{
1326
0
    int32_t route__ = (msg__).routing_id();
1327
0
    if ((MSG_ROUTING_CONTROL) != (route__)) {
1328
0
        IProtocol* routed__ = Lookup(route__);
1329
0
        if ((!(routed__))) {
1330
0
            return MsgRouteError;
1331
0
        }
1332
0
        return (routed__)->OnCallReceived(msg__, reply__);
1333
0
    }
1334
0
1335
0
    switch ((msg__).type()) {
1336
0
    case PPluginModule::Msg_ProcessSomeEvents__ID:
1337
0
        {
1338
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
1339
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1340
0
            }
1341
0
            AUTO_PROFILER_LABEL("PPluginModule::Msg_ProcessSomeEvents", OTHER);
1342
0
1343
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1344
0
                FatalError("Transition error");
1345
0
                return MsgValueError;
1346
0
            }
1347
0
            int32_t id__ = MSG_ROUTING_CONTROL;
1348
0
            if ((!(AnswerProcessSomeEvents()))) {
1349
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1350
0
                // Error handled in mozilla::ipc::IPCResult
1351
0
                return MsgProcessingError;
1352
0
            }
1353
0
1354
0
            reply__ = PPluginModule::Reply_ProcessSomeEvents(id__);
1355
0
1356
0
1357
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
1358
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
1359
0
            }
1360
0
            return MsgProcessed;
1361
0
        }
1362
0
    case PPluginModule::Msg_NPN_SetValue_NPPVpluginRequiresAudioDeviceChanges__ID:
1363
0
        {
1364
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
1365
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1366
0
            }
1367
0
            AUTO_PROFILER_LABEL("PPluginModule::Msg_NPN_SetValue_NPPVpluginRequiresAudioDeviceChanges", OTHER);
1368
0
1369
0
            PickleIterator iter__(msg__);
1370
0
            bool shouldRegister;
1371
0
1372
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(shouldRegister)))))) {
1373
0
                FatalError("Error deserializing 'bool'");
1374
0
                return MsgValueError;
1375
0
            }
1376
0
            // Sentinel = 'shouldRegister'
1377
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 397502372)))) {
1378
0
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
1379
0
                return MsgValueError;
1380
0
            }
1381
0
            (msg__).EndRead(iter__, (msg__).type());
1382
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
1383
0
                FatalError("Transition error");
1384
0
                return MsgValueError;
1385
0
            }
1386
0
            int32_t id__ = MSG_ROUTING_CONTROL;
1387
0
            NPError result;
1388
0
            if ((!(AnswerNPN_SetValue_NPPVpluginRequiresAudioDeviceChanges(shouldRegister, (&(result)))))) {
1389
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1390
0
                // Error handled in mozilla::ipc::IPCResult
1391
0
                return MsgProcessingError;
1392
0
            }
1393
0
1394
0
            reply__ = PPluginModule::Reply_NPN_SetValue_NPPVpluginRequiresAudioDeviceChanges(id__);
1395
0
1396
0
            WriteIPDLParam(reply__, this, result);
1397
0
            // Sentinel = 'result'
1398
0
            (reply__)->WriteSentinel(3991766165);
1399
0
1400
0
            if (mozilla::ipc::LoggingEnabledFor("PPluginModuleParent")) {
1401
0
                mozilla::ipc::LogMessageForProtocol("PPluginModuleParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
1402
0
            }
1403
0
            return MsgProcessed;
1404
0
        }
1405
0
    default:
1406
0
        {
1407
0
            return MsgNotKnown;
1408
0
        }
1409
0
    }
1410
0
}
1411
1412
auto PPluginModuleParent::GetProtocolTypeId() -> int32_t
1413
0
{
1414
0
    return PPluginModuleMsgStart;
1415
0
}
1416
1417
auto PPluginModuleParent::OnChannelClose() -> void
1418
0
{
1419
0
    DestroySubtree(NormalShutdown);
1420
0
    DeallocSubtree();
1421
0
    DeallocShmems();
1422
0
    DeallocPPluginModuleParent();
1423
0
}
1424
1425
auto PPluginModuleParent::OnChannelError() -> void
1426
0
{
1427
0
    DestroySubtree(AbnormalShutdown);
1428
0
    DeallocSubtree();
1429
0
    DeallocShmems();
1430
0
    DeallocPPluginModuleParent();
1431
0
}
1432
1433
auto PPluginModuleParent::ProcessNativeEventsInInterruptCall() -> void
1434
0
{
1435
#ifdef OS_WIN
1436
    ((DowncastState())->GetIPCChannel())->ProcessNativeEventsInInterruptCall();
1437
#else
1438
    FatalError("This method is Windows-only");
1439
0
#endif
1440
0
}
1441
1442
auto PPluginModuleParent::DestroySubtree(ActorDestroyReason why) -> void
1443
0
{
1444
0
    ActorDestroyReason subtreewhy = (((why) == (Deletion)) || ((why) == (FailedConstructor)) ? AncestorDeletion : why);
1445
0
1446
0
    {
1447
0
        // Recursively shutting down PPluginInstance kids
1448
0
        nsTArray<PPluginInstanceParent*> kids;
1449
0
        // Accumulate kids into a stable structure to iterate over
1450
0
        ManagedPPluginInstanceParent(kids);
1451
0
        for (auto& kid : kids) {
1452
0
            // Guarding against a child removing a sibling from the list during the iteration.
1453
0
            if ((mManagedPPluginInstanceParent).Contains(kid)) {
1454
0
                (kid)->DestroySubtree(subtreewhy);
1455
0
            }
1456
0
        }
1457
0
    }
1458
0
1459
0
    // Reject owning pending responses.
1460
0
    (GetIPCChannel())->RejectPendingResponsesForActor(this);
1461
0
1462
0
    // Finally, destroy "us".
1463
0
    ActorDestroy(why);
1464
0
}
1465
1466
auto PPluginModuleParent::DeallocSubtree() -> void
1467
0
{
1468
0
    {
1469
0
        // Recursively deleting PPluginInstance kids
1470
0
        for (auto iter = (mManagedPPluginInstanceParent).Iter(); (!((iter).Done())); (iter).Next()) {
1471
0
            (((iter).Get())->GetKey())->DeallocSubtree();
1472
0
        }
1473
0
1474
0
        for (auto iter = (mManagedPPluginInstanceParent).Iter(); (!((iter).Done())); (iter).Next()) {
1475
0
            DeallocPPluginInstanceParent(((iter).Get())->GetKey());
1476
0
        }
1477
0
        (mManagedPPluginInstanceParent).Clear();
1478
0
    }
1479
0
}
1480
1481
auto PPluginModuleParent::DeallocPPluginModuleParent() -> void
1482
0
{
1483
0
}
1484
1485
1486
1487
} // namespace plugins
1488
} // namespace mozilla
1489
namespace mozilla {
1490
namespace ipc {
1491
auto IPDLParamTraits<mozilla::plugins::PPluginModuleParent>::Write(
1492
        IPC::Message* aMsg,
1493
        mozilla::ipc::IProtocol* aActor,
1494
        const paramType& aVar) -> void
1495
0
{
1496
0
    int32_t id;
1497
0
    if ((!(aVar))) {
1498
0
        id = 0;
1499
0
    }
1500
0
    else {
1501
0
        id = (aVar)->Id();
1502
0
        if ((1) == (id)) {
1503
0
            (aActor)->FatalError("actor has been |delete|d");
1504
0
        }
1505
0
    }
1506
0
    WriteIPDLParam(aMsg, aActor, id);
1507
0
}
1508
1509
auto IPDLParamTraits<mozilla::plugins::PPluginModuleParent>::Read(
1510
        const IPC::Message* aMsg,
1511
        PickleIterator* aIter,
1512
        mozilla::ipc::IProtocol* aActor,
1513
        paramType* aVar) -> bool
1514
0
{
1515
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PPluginModule", PPluginModuleMsgStart);
1516
0
    if ((actor).isNothing()) {
1517
0
        return false;
1518
0
    }
1519
0
1520
0
    (*(aVar)) = static_cast<mozilla::plugins::PPluginModuleParent*>((actor).value());
1521
0
    return true;
1522
0
}
1523
1524
} // namespace ipc
1525
} // namespace mozilla