Coverage Report

Created: 2018-09-25 14:53

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