Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PServiceWorkerContainerChild.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/dom/PServiceWorkerContainerChild.h"
8
9
#include "mozilla/ipc/PBackgroundChild.h"
10
11
#include "nsIFile.h"
12
#include "GeckoProfiler.h"
13
14
namespace mozilla {
15
namespace dom {
16
17
18
auto PServiceWorkerContainerChild::Recv__delete__() -> mozilla::ipc::IPCResult
19
0
{
20
0
    return IPC_OK();
21
0
}
22
23
auto PServiceWorkerContainerChild::ActorDestroy(ActorDestroyReason aWhy) -> void
24
0
{
25
0
}
26
27
MOZ_IMPLICIT PServiceWorkerContainerChild::PServiceWorkerContainerChild() :
28
    mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
29
    mLivenessState(mozilla::ipc::LivenessState::Dead)
30
0
{
31
0
    MOZ_COUNT_CTOR(PServiceWorkerContainerChild);
32
0
}
33
34
PServiceWorkerContainerChild::~PServiceWorkerContainerChild()
35
0
{
36
0
    MOZ_COUNT_DTOR(PServiceWorkerContainerChild);
37
0
}
38
39
auto PServiceWorkerContainerChild::Manager() const -> PBackgroundChild*
40
0
{
41
0
    return static_cast<PBackgroundChild*>(IProtocol::Manager());
42
0
}
43
44
auto PServiceWorkerContainerChild::SendTeardown() -> bool
45
0
{
46
0
    IPC::Message* msg__ = PServiceWorkerContainer::Msg_Teardown(Id());
47
0
48
0
49
0
50
0
51
0
52
0
    if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerContainerChild")) {
53
0
        mozilla::ipc::LogMessageForProtocol("PServiceWorkerContainerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
54
0
    }
55
0
    AUTO_PROFILER_LABEL("PServiceWorkerContainer::Msg_Teardown", OTHER);
56
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
57
0
        mozilla::ipc::LogicError("Transition error");
58
0
    }
59
0
60
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
61
0
    return sendok__;
62
0
}
63
64
auto PServiceWorkerContainerChild::SendRegister(
65
        const IPCClientInfo& aClientInfo,
66
        const nsCString& aScopeURL,
67
        const nsCString& aScriptURL,
68
        const ServiceWorkerUpdateViaCache& aUpdateViaCache,
69
        mozilla::ipc::ResolveCallback<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult>&& aResolve,
70
        mozilla::ipc::RejectCallback&& aReject) -> void
71
0
{
72
0
    IPC::Message* msg__ = PServiceWorkerContainer::Msg_Register(Id());
73
0
74
0
    WriteIPDLParam(msg__, this, aClientInfo);
75
0
    // Sentinel = 'aClientInfo'
76
0
    (msg__)->WriteSentinel(2716254963);
77
0
    WriteIPDLParam(msg__, this, aScopeURL);
78
0
    // Sentinel = 'aScopeURL'
79
0
    (msg__)->WriteSentinel(3900369927);
80
0
    WriteIPDLParam(msg__, this, aScriptURL);
81
0
    // Sentinel = 'aScriptURL'
82
0
    (msg__)->WriteSentinel(810746149);
83
0
    WriteIPDLParam(msg__, this, aUpdateViaCache);
84
0
    // Sentinel = 'aUpdateViaCache'
85
0
    (msg__)->WriteSentinel(3351708919);
86
0
87
0
88
0
89
0
90
0
    if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerContainerChild")) {
91
0
        mozilla::ipc::LogMessageForProtocol("PServiceWorkerContainerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
92
0
    }
93
0
    AUTO_PROFILER_LABEL("PServiceWorkerContainer::Msg_Register", OTHER);
94
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
95
0
        mozilla::ipc::LogicError("Transition error");
96
0
    }
97
0
98
0
    (GetIPCChannel())->Send(msg__, this, std::move(aResolve), std::move(aReject));
99
0
    return;
100
0
}
101
102
auto PServiceWorkerContainerChild::SendRegister(
103
        const IPCClientInfo& aClientInfo,
104
        const nsCString& aScopeURL,
105
        const nsCString& aScriptURL,
106
        const ServiceWorkerUpdateViaCache& aUpdateViaCache) -> RefPtr<RegisterPromise>
107
0
{
108
0
109
0
    RefPtr<MozPromise<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult, ResponseRejectReason, false>::Private> promise__ = new MozPromise<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult, ResponseRejectReason, false>::Private(__func__);
110
0
111
0
    SendRegister(aClientInfo, aScopeURL, aScriptURL, aUpdateViaCache, [promise__](IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult&& aValue) {
112
0
        (promise__)->Resolve(std::move(aValue), __func__);
113
0
    }, [promise__](ResponseRejectReason aReason) {
114
0
        (promise__)->Reject(aReason, __func__);
115
0
    });
116
0
    return promise__;
117
0
}
118
119
auto PServiceWorkerContainerChild::SendGetRegistration(
120
        const IPCClientInfo& aClientInfo,
121
        const nsCString& aURL,
122
        mozilla::ipc::ResolveCallback<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult>&& aResolve,
123
        mozilla::ipc::RejectCallback&& aReject) -> void
124
0
{
125
0
    IPC::Message* msg__ = PServiceWorkerContainer::Msg_GetRegistration(Id());
126
0
127
0
    WriteIPDLParam(msg__, this, aClientInfo);
128
0
    // Sentinel = 'aClientInfo'
129
0
    (msg__)->WriteSentinel(2716254963);
130
0
    WriteIPDLParam(msg__, this, aURL);
131
0
    // Sentinel = 'aURL'
132
0
    (msg__)->WriteSentinel(2075506328);
133
0
134
0
135
0
136
0
137
0
    if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerContainerChild")) {
138
0
        mozilla::ipc::LogMessageForProtocol("PServiceWorkerContainerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
139
0
    }
140
0
    AUTO_PROFILER_LABEL("PServiceWorkerContainer::Msg_GetRegistration", OTHER);
141
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
142
0
        mozilla::ipc::LogicError("Transition error");
143
0
    }
144
0
145
0
    (GetIPCChannel())->Send(msg__, this, std::move(aResolve), std::move(aReject));
146
0
    return;
147
0
}
148
149
auto PServiceWorkerContainerChild::SendGetRegistration(
150
        const IPCClientInfo& aClientInfo,
151
        const nsCString& aURL) -> RefPtr<GetRegistrationPromise>
152
0
{
153
0
154
0
    RefPtr<MozPromise<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult, ResponseRejectReason, false>::Private> promise__ = new MozPromise<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult, ResponseRejectReason, false>::Private(__func__);
155
0
156
0
    SendGetRegistration(aClientInfo, aURL, [promise__](IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult&& aValue) {
157
0
        (promise__)->Resolve(std::move(aValue), __func__);
158
0
    }, [promise__](ResponseRejectReason aReason) {
159
0
        (promise__)->Reject(aReason, __func__);
160
0
    });
161
0
    return promise__;
162
0
}
163
164
auto PServiceWorkerContainerChild::SendGetRegistrations(
165
        const IPCClientInfo& aClientInfo,
166
        mozilla::ipc::ResolveCallback<IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult>&& aResolve,
167
        mozilla::ipc::RejectCallback&& aReject) -> void
168
0
{
169
0
    IPC::Message* msg__ = PServiceWorkerContainer::Msg_GetRegistrations(Id());
170
0
171
0
    WriteIPDLParam(msg__, this, aClientInfo);
172
0
    // Sentinel = 'aClientInfo'
173
0
    (msg__)->WriteSentinel(2716254963);
174
0
175
0
176
0
177
0
178
0
    if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerContainerChild")) {
179
0
        mozilla::ipc::LogMessageForProtocol("PServiceWorkerContainerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
180
0
    }
181
0
    AUTO_PROFILER_LABEL("PServiceWorkerContainer::Msg_GetRegistrations", OTHER);
182
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
183
0
        mozilla::ipc::LogicError("Transition error");
184
0
    }
185
0
186
0
    (GetIPCChannel())->Send(msg__, this, std::move(aResolve), std::move(aReject));
187
0
    return;
188
0
}
189
190
auto PServiceWorkerContainerChild::SendGetRegistrations(const IPCClientInfo& aClientInfo) -> RefPtr<GetRegistrationsPromise>
191
0
{
192
0
193
0
    RefPtr<MozPromise<IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult, ResponseRejectReason, false>::Private> promise__ = new MozPromise<IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult, ResponseRejectReason, false>::Private(__func__);
194
0
195
0
    SendGetRegistrations(aClientInfo, [promise__](IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult&& aValue) {
196
0
        (promise__)->Resolve(std::move(aValue), __func__);
197
0
    }, [promise__](ResponseRejectReason aReason) {
198
0
        (promise__)->Reject(aReason, __func__);
199
0
    });
200
0
    return promise__;
201
0
}
202
203
auto PServiceWorkerContainerChild::SendGetReady(
204
        const IPCClientInfo& aClientInfo,
205
        mozilla::ipc::ResolveCallback<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult>&& aResolve,
206
        mozilla::ipc::RejectCallback&& aReject) -> void
207
0
{
208
0
    IPC::Message* msg__ = PServiceWorkerContainer::Msg_GetReady(Id());
209
0
210
0
    WriteIPDLParam(msg__, this, aClientInfo);
211
0
    // Sentinel = 'aClientInfo'
212
0
    (msg__)->WriteSentinel(2716254963);
213
0
214
0
215
0
216
0
217
0
    if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerContainerChild")) {
218
0
        mozilla::ipc::LogMessageForProtocol("PServiceWorkerContainerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
219
0
    }
220
0
    AUTO_PROFILER_LABEL("PServiceWorkerContainer::Msg_GetReady", OTHER);
221
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
222
0
        mozilla::ipc::LogicError("Transition error");
223
0
    }
224
0
225
0
    (GetIPCChannel())->Send(msg__, this, std::move(aResolve), std::move(aReject));
226
0
    return;
227
0
}
228
229
auto PServiceWorkerContainerChild::SendGetReady(const IPCClientInfo& aClientInfo) -> RefPtr<GetReadyPromise>
230
0
{
231
0
232
0
    RefPtr<MozPromise<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult, ResponseRejectReason, false>::Private> promise__ = new MozPromise<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult, ResponseRejectReason, false>::Private(__func__);
233
0
234
0
    SendGetReady(aClientInfo, [promise__](IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult&& aValue) {
235
0
        (promise__)->Resolve(std::move(aValue), __func__);
236
0
    }, [promise__](ResponseRejectReason aReason) {
237
0
        (promise__)->Reject(aReason, __func__);
238
0
    });
239
0
    return promise__;
240
0
}
241
242
auto PServiceWorkerContainerChild::RemoveManagee(
243
        int32_t aProtocolId,
244
        IProtocol* aListener) -> void
245
0
{
246
0
    FatalError("unreached");
247
0
    return;
248
0
}
249
250
auto PServiceWorkerContainerChild::OnMessageReceived(const Message& msg__) -> PServiceWorkerContainerChild::Result
251
0
{
252
0
    switch ((msg__).type()) {
253
0
    case PServiceWorkerContainer::Reply_Register__ID:
254
0
        {
255
0
            if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerContainerChild")) {
256
0
                mozilla::ipc::LogMessageForProtocol("PServiceWorkerContainerChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
257
0
            }
258
0
            AUTO_PROFILER_LABEL("PServiceWorkerContainer::Msg_Register", OTHER);
259
0
260
0
            PickleIterator iter__(msg__);
261
0
            bool resolve__;
262
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(resolve__)))))) {
263
0
                FatalError("Error deserializing 'resolve__'");
264
0
                return MsgValueError;
265
0
            }
266
0
            // Sentinel = 'resolve__'
267
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3997392463)))) {
268
0
                mozilla::ipc::SentinelReadError("Error deserializing 'resolve__'");
269
0
                return MsgValueError;
270
0
            }
271
0
272
0
            UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback = (GetIPCChannel())->PopCallback(msg__);
273
0
            MessageChannel::CallbackHolder<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult>* callback = static_cast<MessageChannel::CallbackHolder<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult>*>((untypedCallback).get());
274
0
            if ((!(callback))) {
275
0
                FatalError("Error unknown callback");
276
0
                return MsgProcessingError;
277
0
            }
278
0
            if (resolve__) {
279
0
                IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult aResult;
280
0
281
0
                if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aResult)))))) {
282
0
                    FatalError("Error deserializing 'IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult'");
283
0
                    return MsgValueError;
284
0
                }
285
0
                // Sentinel = 'aResult'
286
0
                if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3888726089)))) {
287
0
                    mozilla::ipc::SentinelReadError("Error deserializing 'IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult'");
288
0
                    return MsgValueError;
289
0
                }
290
0
                (msg__).EndRead(iter__, (msg__).type());
291
0
                (callback)->Resolve(std::move(aResult));
292
0
            }
293
0
            else {
294
0
                ResponseRejectReason reason__;
295
0
                if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(reason__)))))) {
296
0
                    FatalError("Error deserializing 'reason__'");
297
0
                    return MsgValueError;
298
0
                }
299
0
                // Sentinel = 'reason__'
300
0
                if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 913452670)))) {
301
0
                    mozilla::ipc::SentinelReadError("Error deserializing 'reason__'");
302
0
                    return MsgValueError;
303
0
                }
304
0
                (msg__).EndRead(iter__, (msg__).type());
305
0
                (callback)->Reject(reason__);
306
0
            }
307
0
            return MsgProcessed;
308
0
        }
309
0
    case PServiceWorkerContainer::Reply_GetRegistration__ID:
310
0
        {
311
0
            if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerContainerChild")) {
312
0
                mozilla::ipc::LogMessageForProtocol("PServiceWorkerContainerChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
313
0
            }
314
0
            AUTO_PROFILER_LABEL("PServiceWorkerContainer::Msg_GetRegistration", OTHER);
315
0
316
0
            PickleIterator iter__(msg__);
317
0
            bool resolve__;
318
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(resolve__)))))) {
319
0
                FatalError("Error deserializing 'resolve__'");
320
0
                return MsgValueError;
321
0
            }
322
0
            // Sentinel = 'resolve__'
323
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3997392463)))) {
324
0
                mozilla::ipc::SentinelReadError("Error deserializing 'resolve__'");
325
0
                return MsgValueError;
326
0
            }
327
0
328
0
            UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback = (GetIPCChannel())->PopCallback(msg__);
329
0
            MessageChannel::CallbackHolder<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult>* callback = static_cast<MessageChannel::CallbackHolder<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult>*>((untypedCallback).get());
330
0
            if ((!(callback))) {
331
0
                FatalError("Error unknown callback");
332
0
                return MsgProcessingError;
333
0
            }
334
0
            if (resolve__) {
335
0
                IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult aResult;
336
0
337
0
                if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aResult)))))) {
338
0
                    FatalError("Error deserializing 'IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult'");
339
0
                    return MsgValueError;
340
0
                }
341
0
                // Sentinel = 'aResult'
342
0
                if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3888726089)))) {
343
0
                    mozilla::ipc::SentinelReadError("Error deserializing 'IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult'");
344
0
                    return MsgValueError;
345
0
                }
346
0
                (msg__).EndRead(iter__, (msg__).type());
347
0
                (callback)->Resolve(std::move(aResult));
348
0
            }
349
0
            else {
350
0
                ResponseRejectReason reason__;
351
0
                if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(reason__)))))) {
352
0
                    FatalError("Error deserializing 'reason__'");
353
0
                    return MsgValueError;
354
0
                }
355
0
                // Sentinel = 'reason__'
356
0
                if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 913452670)))) {
357
0
                    mozilla::ipc::SentinelReadError("Error deserializing 'reason__'");
358
0
                    return MsgValueError;
359
0
                }
360
0
                (msg__).EndRead(iter__, (msg__).type());
361
0
                (callback)->Reject(reason__);
362
0
            }
363
0
            return MsgProcessed;
364
0
        }
365
0
    case PServiceWorkerContainer::Reply_GetRegistrations__ID:
366
0
        {
367
0
            if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerContainerChild")) {
368
0
                mozilla::ipc::LogMessageForProtocol("PServiceWorkerContainerChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
369
0
            }
370
0
            AUTO_PROFILER_LABEL("PServiceWorkerContainer::Msg_GetRegistrations", OTHER);
371
0
372
0
            PickleIterator iter__(msg__);
373
0
            bool resolve__;
374
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(resolve__)))))) {
375
0
                FatalError("Error deserializing 'resolve__'");
376
0
                return MsgValueError;
377
0
            }
378
0
            // Sentinel = 'resolve__'
379
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3997392463)))) {
380
0
                mozilla::ipc::SentinelReadError("Error deserializing 'resolve__'");
381
0
                return MsgValueError;
382
0
            }
383
0
384
0
            UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback = (GetIPCChannel())->PopCallback(msg__);
385
0
            MessageChannel::CallbackHolder<IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult>* callback = static_cast<MessageChannel::CallbackHolder<IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult>*>((untypedCallback).get());
386
0
            if ((!(callback))) {
387
0
                FatalError("Error unknown callback");
388
0
                return MsgProcessingError;
389
0
            }
390
0
            if (resolve__) {
391
0
                IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult aResult;
392
0
393
0
                if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aResult)))))) {
394
0
                    FatalError("Error deserializing 'IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult'");
395
0
                    return MsgValueError;
396
0
                }
397
0
                // Sentinel = 'aResult'
398
0
                if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3888726089)))) {
399
0
                    mozilla::ipc::SentinelReadError("Error deserializing 'IPCServiceWorkerRegistrationDescriptorListOrCopyableErrorResult'");
400
0
                    return MsgValueError;
401
0
                }
402
0
                (msg__).EndRead(iter__, (msg__).type());
403
0
                (callback)->Resolve(std::move(aResult));
404
0
            }
405
0
            else {
406
0
                ResponseRejectReason reason__;
407
0
                if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(reason__)))))) {
408
0
                    FatalError("Error deserializing 'reason__'");
409
0
                    return MsgValueError;
410
0
                }
411
0
                // Sentinel = 'reason__'
412
0
                if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 913452670)))) {
413
0
                    mozilla::ipc::SentinelReadError("Error deserializing 'reason__'");
414
0
                    return MsgValueError;
415
0
                }
416
0
                (msg__).EndRead(iter__, (msg__).type());
417
0
                (callback)->Reject(reason__);
418
0
            }
419
0
            return MsgProcessed;
420
0
        }
421
0
    case PServiceWorkerContainer::Reply_GetReady__ID:
422
0
        {
423
0
            if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerContainerChild")) {
424
0
                mozilla::ipc::LogMessageForProtocol("PServiceWorkerContainerChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
425
0
            }
426
0
            AUTO_PROFILER_LABEL("PServiceWorkerContainer::Msg_GetReady", OTHER);
427
0
428
0
            PickleIterator iter__(msg__);
429
0
            bool resolve__;
430
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(resolve__)))))) {
431
0
                FatalError("Error deserializing 'resolve__'");
432
0
                return MsgValueError;
433
0
            }
434
0
            // Sentinel = 'resolve__'
435
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3997392463)))) {
436
0
                mozilla::ipc::SentinelReadError("Error deserializing 'resolve__'");
437
0
                return MsgValueError;
438
0
            }
439
0
440
0
            UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback = (GetIPCChannel())->PopCallback(msg__);
441
0
            MessageChannel::CallbackHolder<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult>* callback = static_cast<MessageChannel::CallbackHolder<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult>*>((untypedCallback).get());
442
0
            if ((!(callback))) {
443
0
                FatalError("Error unknown callback");
444
0
                return MsgProcessingError;
445
0
            }
446
0
            if (resolve__) {
447
0
                IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult aResult;
448
0
449
0
                if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aResult)))))) {
450
0
                    FatalError("Error deserializing 'IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult'");
451
0
                    return MsgValueError;
452
0
                }
453
0
                // Sentinel = 'aResult'
454
0
                if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3888726089)))) {
455
0
                    mozilla::ipc::SentinelReadError("Error deserializing 'IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult'");
456
0
                    return MsgValueError;
457
0
                }
458
0
                (msg__).EndRead(iter__, (msg__).type());
459
0
                (callback)->Resolve(std::move(aResult));
460
0
            }
461
0
            else {
462
0
                ResponseRejectReason reason__;
463
0
                if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(reason__)))))) {
464
0
                    FatalError("Error deserializing 'reason__'");
465
0
                    return MsgValueError;
466
0
                }
467
0
                // Sentinel = 'reason__'
468
0
                if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 913452670)))) {
469
0
                    mozilla::ipc::SentinelReadError("Error deserializing 'reason__'");
470
0
                    return MsgValueError;
471
0
                }
472
0
                (msg__).EndRead(iter__, (msg__).type());
473
0
                (callback)->Reject(reason__);
474
0
            }
475
0
            return MsgProcessed;
476
0
        }
477
0
    case PServiceWorkerContainer::Msg___delete____ID:
478
0
        {
479
0
            if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerContainerChild")) {
480
0
                mozilla::ipc::LogMessageForProtocol("PServiceWorkerContainerChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
481
0
            }
482
0
            AUTO_PROFILER_LABEL("PServiceWorkerContainer::Msg___delete__", OTHER);
483
0
484
0
            PickleIterator iter__(msg__);
485
0
            PServiceWorkerContainerChild* actor;
486
0
487
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) {
488
0
                FatalError("Error deserializing 'PServiceWorkerContainerChild'");
489
0
                return MsgValueError;
490
0
            }
491
0
            if ((!((*((&(actor))))))) {
492
0
                FatalError("Error deserializing 'PServiceWorkerContainerChild'");
493
0
                return MsgValueError;
494
0
            }
495
0
            // Sentinel = 'actor'
496
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
497
0
                mozilla::ipc::SentinelReadError("Error deserializing 'PServiceWorkerContainerChild'");
498
0
                return MsgValueError;
499
0
            }
500
0
            (msg__).EndRead(iter__, (msg__).type());
501
0
            if ((!(StateTransition(true, (&(mLivenessState)))))) {
502
0
                FatalError("Transition error");
503
0
                return MsgValueError;
504
0
            }
505
0
            if ((!(Recv__delete__()))) {
506
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
507
0
                // Error handled in mozilla::ipc::IPCResult
508
0
                return MsgProcessingError;
509
0
            }
510
0
511
0
512
0
            IProtocol* mgr = (actor)->Manager();
513
0
            (actor)->DestroySubtree(Deletion);
514
0
            (actor)->DeallocSubtree();
515
0
            (mgr)->RemoveManagee(PServiceWorkerContainerMsgStart, actor);
516
0
517
0
            return MsgProcessed;
518
0
        }
519
0
    default:
520
0
        {
521
0
            return MsgNotKnown;
522
0
        }
523
0
    }
524
0
}
525
526
auto PServiceWorkerContainerChild::OnMessageReceived(
527
        const Message& msg__,
528
        Message*& reply__) -> PServiceWorkerContainerChild::Result
529
0
{
530
0
    return MsgNotKnown;
531
0
}
532
533
auto PServiceWorkerContainerChild::OnCallReceived(
534
        const Message& msg__,
535
        Message*& reply__) -> PServiceWorkerContainerChild::Result
536
0
{
537
0
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
538
0
    return MsgNotKnown;
539
0
}
540
541
auto PServiceWorkerContainerChild::GetProtocolTypeId() -> int32_t
542
0
{
543
0
    return PServiceWorkerContainerMsgStart;
544
0
}
545
546
auto PServiceWorkerContainerChild::DestroySubtree(ActorDestroyReason why) -> void
547
0
{
548
0
    // Unregister from our manager.
549
0
    Unregister(Id());
550
0
551
0
    // Reject owning pending responses.
552
0
    (GetIPCChannel())->RejectPendingResponsesForActor(this);
553
0
554
0
    // Finally, destroy "us".
555
0
    ActorDestroy(why);
556
0
}
557
558
auto PServiceWorkerContainerChild::DeallocSubtree() -> void
559
0
{
560
0
}
561
562
563
564
} // namespace dom
565
} // namespace mozilla
566
namespace mozilla {
567
namespace ipc {
568
auto IPDLParamTraits<mozilla::dom::PServiceWorkerContainerChild>::Write(
569
        IPC::Message* aMsg,
570
        mozilla::ipc::IProtocol* aActor,
571
        const paramType& aVar) -> void
572
0
{
573
0
    int32_t id;
574
0
    if ((!(aVar))) {
575
0
        id = 0;
576
0
    }
577
0
    else {
578
0
        id = (aVar)->Id();
579
0
        if ((1) == (id)) {
580
0
            (aActor)->FatalError("actor has been |delete|d");
581
0
        }
582
0
    }
583
0
    WriteIPDLParam(aMsg, aActor, id);
584
0
}
585
586
auto IPDLParamTraits<mozilla::dom::PServiceWorkerContainerChild>::Read(
587
        const IPC::Message* aMsg,
588
        PickleIterator* aIter,
589
        mozilla::ipc::IProtocol* aActor,
590
        paramType* aVar) -> bool
591
0
{
592
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PServiceWorkerContainer", PServiceWorkerContainerMsgStart);
593
0
    if ((actor).isNothing()) {
594
0
        return false;
595
0
    }
596
0
597
0
    (*(aVar)) = static_cast<mozilla::dom::PServiceWorkerContainerChild*>((actor).value());
598
0
    return true;
599
0
}
600
601
} // namespace ipc
602
} // namespace mozilla