Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PURLClassifierChild.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/PURLClassifierChild.h"
8
9
#include "mozilla/dom/PContentChild.h"
10
11
#include "nsIFile.h"
12
#include "GeckoProfiler.h"
13
14
namespace mozilla {
15
namespace dom {
16
17
18
auto PURLClassifierChild::Recv__delete__(
19
        const MaybeInfo& info,
20
        const nsresult& errorCode) -> mozilla::ipc::IPCResult
21
0
{
22
0
    return IPC_OK();
23
0
}
24
25
auto PURLClassifierChild::ActorDestroy(ActorDestroyReason aWhy) -> void
26
0
{
27
0
}
28
29
MOZ_IMPLICIT PURLClassifierChild::PURLClassifierChild() :
30
    mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
31
    mLivenessState(mozilla::ipc::LivenessState::Dead)
32
0
{
33
0
    MOZ_COUNT_CTOR(PURLClassifierChild);
34
0
}
35
36
PURLClassifierChild::~PURLClassifierChild()
37
0
{
38
0
    MOZ_COUNT_DTOR(PURLClassifierChild);
39
0
}
40
41
auto PURLClassifierChild::Manager() const -> PContentChild*
42
0
{
43
0
    return static_cast<PContentChild*>(IProtocol::Manager());
44
0
}
45
46
auto PURLClassifierChild::RemoveManagee(
47
        int32_t aProtocolId,
48
        IProtocol* aListener) -> void
49
0
{
50
0
    FatalError("unreached");
51
0
    return;
52
0
}
53
54
auto PURLClassifierChild::OnMessageReceived(const Message& msg__) -> PURLClassifierChild::Result
55
0
{
56
0
    switch ((msg__).type()) {
57
0
    case PURLClassifier::Msg___delete____ID:
58
0
        {
59
0
            if (mozilla::ipc::LoggingEnabledFor("PURLClassifierChild")) {
60
0
                mozilla::ipc::LogMessageForProtocol("PURLClassifierChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
61
0
            }
62
0
            AUTO_PROFILER_LABEL("PURLClassifier::Msg___delete__", OTHER);
63
0
64
0
            PickleIterator iter__(msg__);
65
0
            PURLClassifierChild* actor;
66
0
            MaybeInfo info;
67
0
            nsresult errorCode;
68
0
69
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) {
70
0
                FatalError("Error deserializing 'PURLClassifierChild'");
71
0
                return MsgValueError;
72
0
            }
73
0
            if ((!((*((&(actor))))))) {
74
0
                FatalError("Error deserializing 'PURLClassifierChild'");
75
0
                return MsgValueError;
76
0
            }
77
0
            // Sentinel = 'actor'
78
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
79
0
                mozilla::ipc::SentinelReadError("Error deserializing 'PURLClassifierChild'");
80
0
                return MsgValueError;
81
0
            }
82
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(info)))))) {
83
0
                FatalError("Error deserializing 'MaybeInfo'");
84
0
                return MsgValueError;
85
0
            }
86
0
            // Sentinel = 'info'
87
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3750868832)))) {
88
0
                mozilla::ipc::SentinelReadError("Error deserializing 'MaybeInfo'");
89
0
                return MsgValueError;
90
0
            }
91
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(errorCode)))))) {
92
0
                FatalError("Error deserializing 'nsresult'");
93
0
                return MsgValueError;
94
0
            }
95
0
            // Sentinel = 'errorCode'
96
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 262143504)))) {
97
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
98
0
                return MsgValueError;
99
0
            }
100
0
            (msg__).EndRead(iter__, (msg__).type());
101
0
            if ((!(StateTransition(true, (&(mLivenessState)))))) {
102
0
                FatalError("Transition error");
103
0
                return MsgValueError;
104
0
            }
105
0
            if ((!(Recv__delete__(info, errorCode)))) {
106
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
107
0
                // Error handled in mozilla::ipc::IPCResult
108
0
                return MsgProcessingError;
109
0
            }
110
0
111
0
112
0
            IProtocol* mgr = (actor)->Manager();
113
0
            (actor)->DestroySubtree(Deletion);
114
0
            (actor)->DeallocSubtree();
115
0
            (mgr)->RemoveManagee(PURLClassifierMsgStart, actor);
116
0
117
0
            return MsgProcessed;
118
0
        }
119
0
    default:
120
0
        {
121
0
            return MsgNotKnown;
122
0
        }
123
0
    }
124
0
}
125
126
auto PURLClassifierChild::OnMessageReceived(
127
        const Message& msg__,
128
        Message*& reply__) -> PURLClassifierChild::Result
129
0
{
130
0
    return MsgNotKnown;
131
0
}
132
133
auto PURLClassifierChild::OnCallReceived(
134
        const Message& msg__,
135
        Message*& reply__) -> PURLClassifierChild::Result
136
0
{
137
0
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
138
0
    return MsgNotKnown;
139
0
}
140
141
auto PURLClassifierChild::GetProtocolTypeId() -> int32_t
142
0
{
143
0
    return PURLClassifierMsgStart;
144
0
}
145
146
auto PURLClassifierChild::DestroySubtree(ActorDestroyReason why) -> void
147
0
{
148
0
    // Unregister from our manager.
149
0
    Unregister(Id());
150
0
151
0
    // Reject owning pending responses.
152
0
    (GetIPCChannel())->RejectPendingResponsesForActor(this);
153
0
154
0
    // Finally, destroy "us".
155
0
    ActorDestroy(why);
156
0
}
157
158
auto PURLClassifierChild::DeallocSubtree() -> void
159
0
{
160
0
}
161
162
163
164
} // namespace dom
165
} // namespace mozilla
166
namespace mozilla {
167
namespace ipc {
168
auto IPDLParamTraits<mozilla::dom::PURLClassifierChild>::Write(
169
        IPC::Message* aMsg,
170
        mozilla::ipc::IProtocol* aActor,
171
        const paramType& aVar) -> void
172
0
{
173
0
    int32_t id;
174
0
    if ((!(aVar))) {
175
0
        id = 0;
176
0
    }
177
0
    else {
178
0
        id = (aVar)->Id();
179
0
        if ((1) == (id)) {
180
0
            (aActor)->FatalError("actor has been |delete|d");
181
0
        }
182
0
    }
183
0
    WriteIPDLParam(aMsg, aActor, id);
184
0
}
185
186
auto IPDLParamTraits<mozilla::dom::PURLClassifierChild>::Read(
187
        const IPC::Message* aMsg,
188
        PickleIterator* aIter,
189
        mozilla::ipc::IProtocol* aActor,
190
        paramType* aVar) -> bool
191
0
{
192
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PURLClassifier", PURLClassifierMsgStart);
193
0
    if ((actor).isNothing()) {
194
0
        return false;
195
0
    }
196
0
197
0
    (*(aVar)) = static_cast<mozilla::dom::PURLClassifierChild*>((actor).value());
198
0
    return true;
199
0
}
200
201
} // namespace ipc
202
} // namespace mozilla