Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PWyciwygChannelChild.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/net/PWyciwygChannelChild.h"
8
#include "SerializedLoadContext.h"
9
10
#include "mozilla/net/PNeckoChild.h"
11
#include "mozilla/dom/PBrowserChild.h"
12
13
#include "nsIFile.h"
14
#include "GeckoProfiler.h"
15
16
namespace mozilla {
17
namespace net {
18
19
20
auto PWyciwygChannelChild::ActorDestroy(ActorDestroyReason aWhy) -> void
21
0
{
22
0
}
23
24
MOZ_IMPLICIT PWyciwygChannelChild::PWyciwygChannelChild() :
25
    mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
26
    mLivenessState(mozilla::ipc::LivenessState::Dead)
27
0
{
28
0
    MOZ_COUNT_CTOR(PWyciwygChannelChild);
29
0
}
30
31
PWyciwygChannelChild::~PWyciwygChannelChild()
32
0
{
33
0
    MOZ_COUNT_DTOR(PWyciwygChannelChild);
34
0
}
35
36
auto PWyciwygChannelChild::Manager() const -> PNeckoChild*
37
0
{
38
0
    return static_cast<PNeckoChild*>(IProtocol::Manager());
39
0
}
40
41
auto PWyciwygChannelChild::Send__delete__(PWyciwygChannelChild* actor) -> bool
42
0
{
43
0
    if ((!(actor))) {
44
0
        return false;
45
0
    }
46
0
47
0
    IPC::Message* msg__ = PWyciwygChannel::Msg___delete__((actor)->Id());
48
0
49
0
    MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param");
50
0
    WriteIPDLParam(msg__, actor, actor);
51
0
    // Sentinel = 'actor'
52
0
    (msg__)->WriteSentinel(875202478);
53
0
54
0
55
0
56
0
    if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelChild")) {
57
0
        mozilla::ipc::LogMessageForProtocol("PWyciwygChannelChild", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
58
0
    }
59
0
    AUTO_PROFILER_LABEL("PWyciwygChannel::Msg___delete__", OTHER);
60
0
    if ((!(StateTransition(true, (&((actor)->mLivenessState)))))) {
61
0
        mozilla::ipc::LogicError("Transition error");
62
0
    }
63
0
64
0
    bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
65
0
66
0
    IProtocol* mgr = (actor)->Manager();
67
0
    (actor)->DestroySubtree(Deletion);
68
0
    (actor)->DeallocSubtree();
69
0
    (mgr)->RemoveManagee(PWyciwygChannelMsgStart, actor);
70
0
    return sendok__;
71
0
}
72
73
auto PWyciwygChannelChild::SendInit(
74
        const URIParams& uri,
75
        const PrincipalInfo& requestingPrincipalInfo,
76
        const PrincipalInfo& triggeringPrincipalInfo,
77
        const PrincipalInfo& principalToInheritInfo,
78
        const uint32_t& securityFlags,
79
        const uint32_t& contentPolicyType) -> bool
80
0
{
81
0
    IPC::Message* msg__ = PWyciwygChannel::Msg_Init(Id());
82
0
83
0
    WriteIPDLParam(msg__, this, uri);
84
0
    // Sentinel = 'uri'
85
0
    (msg__)->WriteSentinel(1453210605);
86
0
    WriteIPDLParam(msg__, this, requestingPrincipalInfo);
87
0
    // Sentinel = 'requestingPrincipalInfo'
88
0
    (msg__)->WriteSentinel(3181737698);
89
0
    WriteIPDLParam(msg__, this, triggeringPrincipalInfo);
90
0
    // Sentinel = 'triggeringPrincipalInfo'
91
0
    (msg__)->WriteSentinel(4145483429);
92
0
    WriteIPDLParam(msg__, this, principalToInheritInfo);
93
0
    // Sentinel = 'principalToInheritInfo'
94
0
    (msg__)->WriteSentinel(3087636212);
95
0
    WriteIPDLParam(msg__, this, securityFlags);
96
0
    // Sentinel = 'securityFlags'
97
0
    (msg__)->WriteSentinel(1948430358);
98
0
    WriteIPDLParam(msg__, this, contentPolicyType);
99
0
    // Sentinel = 'contentPolicyType'
100
0
    (msg__)->WriteSentinel(3089607692);
101
0
102
0
103
0
104
0
105
0
    if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelChild")) {
106
0
        mozilla::ipc::LogMessageForProtocol("PWyciwygChannelChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
107
0
    }
108
0
    AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_Init", OTHER);
109
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
110
0
        mozilla::ipc::LogicError("Transition error");
111
0
    }
112
0
113
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
114
0
    return sendok__;
115
0
}
116
117
auto PWyciwygChannelChild::SendAsyncOpen(
118
        const URIParams& originalURI,
119
        const uint32_t& loadFlags,
120
        const SerializedLoadContext& loadContext,
121
        const PBrowserOrId& browser) -> bool
122
0
{
123
0
    IPC::Message* msg__ = PWyciwygChannel::Msg_AsyncOpen(Id());
124
0
125
0
    WriteIPDLParam(msg__, this, originalURI);
126
0
    // Sentinel = 'originalURI'
127
0
    (msg__)->WriteSentinel(2451791718);
128
0
    WriteIPDLParam(msg__, this, loadFlags);
129
0
    // Sentinel = 'loadFlags'
130
0
    (msg__)->WriteSentinel(2391120444);
131
0
    WriteIPDLParam(msg__, this, loadContext);
132
0
    // Sentinel = 'loadContext'
133
0
    (msg__)->WriteSentinel(2917317838);
134
0
    WriteIPDLParam(msg__, this, browser);
135
0
    // Sentinel = 'browser'
136
0
    (msg__)->WriteSentinel(2836343679);
137
0
138
0
139
0
140
0
141
0
    if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelChild")) {
142
0
        mozilla::ipc::LogMessageForProtocol("PWyciwygChannelChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
143
0
    }
144
0
    AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_AsyncOpen", OTHER);
145
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
146
0
        mozilla::ipc::LogicError("Transition error");
147
0
    }
148
0
149
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
150
0
    return sendok__;
151
0
}
152
153
auto PWyciwygChannelChild::SendAppData(
154
        const SerializedLoadContext& loadContext,
155
        const PBrowserOrId& browser) -> bool
156
0
{
157
0
    IPC::Message* msg__ = PWyciwygChannel::Msg_AppData(Id());
158
0
159
0
    WriteIPDLParam(msg__, this, loadContext);
160
0
    // Sentinel = 'loadContext'
161
0
    (msg__)->WriteSentinel(2917317838);
162
0
    WriteIPDLParam(msg__, this, browser);
163
0
    // Sentinel = 'browser'
164
0
    (msg__)->WriteSentinel(2836343679);
165
0
166
0
167
0
168
0
169
0
    if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelChild")) {
170
0
        mozilla::ipc::LogMessageForProtocol("PWyciwygChannelChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
171
0
    }
172
0
    AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_AppData", OTHER);
173
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
174
0
        mozilla::ipc::LogicError("Transition error");
175
0
    }
176
0
177
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
178
0
    return sendok__;
179
0
}
180
181
auto PWyciwygChannelChild::SendWriteToCacheEntry(const nsDependentSubstring& data) -> bool
182
0
{
183
0
    IPC::Message* msg__ = PWyciwygChannel::Msg_WriteToCacheEntry(Id());
184
0
185
0
    WriteIPDLParam(msg__, this, data);
186
0
    // Sentinel = 'data'
187
0
    (msg__)->WriteSentinel(843352540);
188
0
189
0
190
0
191
0
192
0
    if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelChild")) {
193
0
        mozilla::ipc::LogMessageForProtocol("PWyciwygChannelChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
194
0
    }
195
0
    AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_WriteToCacheEntry", OTHER);
196
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
197
0
        mozilla::ipc::LogicError("Transition error");
198
0
    }
199
0
200
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
201
0
    return sendok__;
202
0
}
203
204
auto PWyciwygChannelChild::SendCloseCacheEntry(const nsresult& reason) -> bool
205
0
{
206
0
    IPC::Message* msg__ = PWyciwygChannel::Msg_CloseCacheEntry(Id());
207
0
208
0
    WriteIPDLParam(msg__, this, reason);
209
0
    // Sentinel = 'reason'
210
0
    (msg__)->WriteSentinel(4151390930);
211
0
212
0
213
0
214
0
215
0
    if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelChild")) {
216
0
        mozilla::ipc::LogMessageForProtocol("PWyciwygChannelChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
217
0
    }
218
0
    AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_CloseCacheEntry", OTHER);
219
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
220
0
        mozilla::ipc::LogicError("Transition error");
221
0
    }
222
0
223
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
224
0
    return sendok__;
225
0
}
226
227
auto PWyciwygChannelChild::SendSetCharsetAndSource(
228
        const int32_t& source,
229
        const nsCString& charset) -> bool
230
0
{
231
0
    IPC::Message* msg__ = PWyciwygChannel::Msg_SetCharsetAndSource(Id());
232
0
233
0
    WriteIPDLParam(msg__, this, source);
234
0
    // Sentinel = 'source'
235
0
    (msg__)->WriteSentinel(774264369);
236
0
    WriteIPDLParam(msg__, this, charset);
237
0
    // Sentinel = 'charset'
238
0
    (msg__)->WriteSentinel(1551550891);
239
0
240
0
241
0
242
0
243
0
    if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelChild")) {
244
0
        mozilla::ipc::LogMessageForProtocol("PWyciwygChannelChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
245
0
    }
246
0
    AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_SetCharsetAndSource", OTHER);
247
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
248
0
        mozilla::ipc::LogicError("Transition error");
249
0
    }
250
0
251
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
252
0
    return sendok__;
253
0
}
254
255
auto PWyciwygChannelChild::SendSetSecurityInfo(const nsCString& securityInfo) -> bool
256
0
{
257
0
    IPC::Message* msg__ = PWyciwygChannel::Msg_SetSecurityInfo(Id());
258
0
259
0
    WriteIPDLParam(msg__, this, securityInfo);
260
0
    // Sentinel = 'securityInfo'
261
0
    (msg__)->WriteSentinel(158838750);
262
0
263
0
264
0
265
0
266
0
    if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelChild")) {
267
0
        mozilla::ipc::LogMessageForProtocol("PWyciwygChannelChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
268
0
    }
269
0
    AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_SetSecurityInfo", OTHER);
270
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
271
0
        mozilla::ipc::LogicError("Transition error");
272
0
    }
273
0
274
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
275
0
    return sendok__;
276
0
}
277
278
auto PWyciwygChannelChild::SendCancel(const nsresult& status) -> bool
279
0
{
280
0
    IPC::Message* msg__ = PWyciwygChannel::Msg_Cancel(Id());
281
0
282
0
    WriteIPDLParam(msg__, this, status);
283
0
    // Sentinel = 'status'
284
0
    (msg__)->WriteSentinel(3714608576);
285
0
286
0
287
0
288
0
289
0
    if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelChild")) {
290
0
        mozilla::ipc::LogMessageForProtocol("PWyciwygChannelChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
291
0
    }
292
0
    AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_Cancel", OTHER);
293
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
294
0
        mozilla::ipc::LogicError("Transition error");
295
0
    }
296
0
297
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
298
0
    return sendok__;
299
0
}
300
301
auto PWyciwygChannelChild::RemoveManagee(
302
        int32_t aProtocolId,
303
        IProtocol* aListener) -> void
304
0
{
305
0
    FatalError("unreached");
306
0
    return;
307
0
}
308
309
auto PWyciwygChannelChild::OnMessageReceived(const Message& msg__) -> PWyciwygChannelChild::Result
310
0
{
311
0
    switch ((msg__).type()) {
312
0
    case PWyciwygChannel::Reply___delete____ID:
313
0
        {
314
0
            return MsgProcessed;
315
0
        }
316
0
    case PWyciwygChannel::Msg_OnStartRequest__ID:
317
0
        {
318
0
            if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelChild")) {
319
0
                mozilla::ipc::LogMessageForProtocol("PWyciwygChannelChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
320
0
            }
321
0
            AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_OnStartRequest", OTHER);
322
0
323
0
            PickleIterator iter__(msg__);
324
0
            nsresult statusCode;
325
0
            int64_t contentLength;
326
0
            int32_t source;
327
0
            nsCString charset;
328
0
            nsCString securityInfo;
329
0
330
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(statusCode)))))) {
331
0
                FatalError("Error deserializing 'nsresult'");
332
0
                return MsgValueError;
333
0
            }
334
0
            // Sentinel = 'statusCode'
335
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2709278591)))) {
336
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
337
0
                return MsgValueError;
338
0
            }
339
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(contentLength)))))) {
340
0
                FatalError("Error deserializing 'int64_t'");
341
0
                return MsgValueError;
342
0
            }
343
0
            // Sentinel = 'contentLength'
344
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2619011242)))) {
345
0
                mozilla::ipc::SentinelReadError("Error deserializing 'int64_t'");
346
0
                return MsgValueError;
347
0
            }
348
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(source)))))) {
349
0
                FatalError("Error deserializing 'int32_t'");
350
0
                return MsgValueError;
351
0
            }
352
0
            // Sentinel = 'source'
353
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 774264369)))) {
354
0
                mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'");
355
0
                return MsgValueError;
356
0
            }
357
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(charset)))))) {
358
0
                FatalError("Error deserializing 'nsCString'");
359
0
                return MsgValueError;
360
0
            }
361
0
            // Sentinel = 'charset'
362
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1551550891)))) {
363
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
364
0
                return MsgValueError;
365
0
            }
366
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(securityInfo)))))) {
367
0
                FatalError("Error deserializing 'nsCString'");
368
0
                return MsgValueError;
369
0
            }
370
0
            // Sentinel = 'securityInfo'
371
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 158838750)))) {
372
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
373
0
                return MsgValueError;
374
0
            }
375
0
            (msg__).EndRead(iter__, (msg__).type());
376
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
377
0
                FatalError("Transition error");
378
0
                return MsgValueError;
379
0
            }
380
0
            if ((!(RecvOnStartRequest(statusCode, contentLength, source, charset, securityInfo)))) {
381
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
382
0
                // Error handled in mozilla::ipc::IPCResult
383
0
                return MsgProcessingError;
384
0
            }
385
0
386
0
            return MsgProcessed;
387
0
        }
388
0
    case PWyciwygChannel::Msg_OnDataAvailable__ID:
389
0
        {
390
0
            if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelChild")) {
391
0
                mozilla::ipc::LogMessageForProtocol("PWyciwygChannelChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
392
0
            }
393
0
            AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_OnDataAvailable", OTHER);
394
0
395
0
            PickleIterator iter__(msg__);
396
0
            nsCString data;
397
0
            uint64_t offset;
398
0
399
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(data)))))) {
400
0
                FatalError("Error deserializing 'nsCString'");
401
0
                return MsgValueError;
402
0
            }
403
0
            // Sentinel = 'data'
404
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 843352540)))) {
405
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
406
0
                return MsgValueError;
407
0
            }
408
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(offset)))))) {
409
0
                FatalError("Error deserializing 'uint64_t'");
410
0
                return MsgValueError;
411
0
            }
412
0
            // Sentinel = 'offset'
413
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1369947863)))) {
414
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
415
0
                return MsgValueError;
416
0
            }
417
0
            (msg__).EndRead(iter__, (msg__).type());
418
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
419
0
                FatalError("Transition error");
420
0
                return MsgValueError;
421
0
            }
422
0
            if ((!(RecvOnDataAvailable(data, offset)))) {
423
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
424
0
                // Error handled in mozilla::ipc::IPCResult
425
0
                return MsgProcessingError;
426
0
            }
427
0
428
0
            return MsgProcessed;
429
0
        }
430
0
    case PWyciwygChannel::Msg_OnStopRequest__ID:
431
0
        {
432
0
            if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelChild")) {
433
0
                mozilla::ipc::LogMessageForProtocol("PWyciwygChannelChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
434
0
            }
435
0
            AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_OnStopRequest", OTHER);
436
0
437
0
            PickleIterator iter__(msg__);
438
0
            nsresult statusCode;
439
0
440
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(statusCode)))))) {
441
0
                FatalError("Error deserializing 'nsresult'");
442
0
                return MsgValueError;
443
0
            }
444
0
            // Sentinel = 'statusCode'
445
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2709278591)))) {
446
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
447
0
                return MsgValueError;
448
0
            }
449
0
            (msg__).EndRead(iter__, (msg__).type());
450
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
451
0
                FatalError("Transition error");
452
0
                return MsgValueError;
453
0
            }
454
0
            if ((!(RecvOnStopRequest(statusCode)))) {
455
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
456
0
                // Error handled in mozilla::ipc::IPCResult
457
0
                return MsgProcessingError;
458
0
            }
459
0
460
0
            return MsgProcessed;
461
0
        }
462
0
    case PWyciwygChannel::Msg_CancelEarly__ID:
463
0
        {
464
0
            if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelChild")) {
465
0
                mozilla::ipc::LogMessageForProtocol("PWyciwygChannelChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
466
0
            }
467
0
            AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_CancelEarly", OTHER);
468
0
469
0
            PickleIterator iter__(msg__);
470
0
            nsresult statusCode;
471
0
472
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(statusCode)))))) {
473
0
                FatalError("Error deserializing 'nsresult'");
474
0
                return MsgValueError;
475
0
            }
476
0
            // Sentinel = 'statusCode'
477
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2709278591)))) {
478
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
479
0
                return MsgValueError;
480
0
            }
481
0
            (msg__).EndRead(iter__, (msg__).type());
482
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
483
0
                FatalError("Transition error");
484
0
                return MsgValueError;
485
0
            }
486
0
            if ((!(RecvCancelEarly(statusCode)))) {
487
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
488
0
                // Error handled in mozilla::ipc::IPCResult
489
0
                return MsgProcessingError;
490
0
            }
491
0
492
0
            return MsgProcessed;
493
0
        }
494
0
    default:
495
0
        {
496
0
            return MsgNotKnown;
497
0
        }
498
0
    }
499
0
}
500
501
auto PWyciwygChannelChild::OnMessageReceived(
502
        const Message& msg__,
503
        Message*& reply__) -> PWyciwygChannelChild::Result
504
0
{
505
0
    return MsgNotKnown;
506
0
}
507
508
auto PWyciwygChannelChild::OnCallReceived(
509
        const Message& msg__,
510
        Message*& reply__) -> PWyciwygChannelChild::Result
511
0
{
512
0
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
513
0
    return MsgNotKnown;
514
0
}
515
516
auto PWyciwygChannelChild::GetProtocolTypeId() -> int32_t
517
0
{
518
0
    return PWyciwygChannelMsgStart;
519
0
}
520
521
auto PWyciwygChannelChild::DestroySubtree(ActorDestroyReason why) -> void
522
0
{
523
0
    // Unregister from our manager.
524
0
    Unregister(Id());
525
0
526
0
    // Reject owning pending responses.
527
0
    (GetIPCChannel())->RejectPendingResponsesForActor(this);
528
0
529
0
    // Finally, destroy "us".
530
0
    ActorDestroy(why);
531
0
}
532
533
auto PWyciwygChannelChild::DeallocSubtree() -> void
534
0
{
535
0
}
536
537
538
539
} // namespace net
540
} // namespace mozilla
541
namespace mozilla {
542
namespace ipc {
543
auto IPDLParamTraits<mozilla::net::PWyciwygChannelChild>::Write(
544
        IPC::Message* aMsg,
545
        mozilla::ipc::IProtocol* aActor,
546
        const paramType& aVar) -> void
547
0
{
548
0
    int32_t id;
549
0
    if ((!(aVar))) {
550
0
        id = 0;
551
0
    }
552
0
    else {
553
0
        id = (aVar)->Id();
554
0
        if ((1) == (id)) {
555
0
            (aActor)->FatalError("actor has been |delete|d");
556
0
        }
557
0
    }
558
0
    WriteIPDLParam(aMsg, aActor, id);
559
0
}
560
561
auto IPDLParamTraits<mozilla::net::PWyciwygChannelChild>::Read(
562
        const IPC::Message* aMsg,
563
        PickleIterator* aIter,
564
        mozilla::ipc::IProtocol* aActor,
565
        paramType* aVar) -> bool
566
0
{
567
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PWyciwygChannel", PWyciwygChannelMsgStart);
568
0
    if ((actor).isNothing()) {
569
0
        return false;
570
0
    }
571
0
572
0
    (*(aVar)) = static_cast<mozilla::net::PWyciwygChannelChild*>((actor).value());
573
0
    return true;
574
0
}
575
576
} // namespace ipc
577
} // namespace mozilla