Coverage Report

Created: 2018-09-25 14:53

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