Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PVRGPUChild.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/gfx/PVRGPUChild.h"
8
9
10
#include "nsIFile.h"
11
#include "GeckoProfiler.h"
12
13
namespace mozilla {
14
namespace gfx {
15
16
17
auto PVRGPUChild::ActorDestroy(ActorDestroyReason aWhy) -> void
18
0
{
19
0
}
20
21
auto PVRGPUChild::ProcessingError(
22
        Result aCode,
23
        const char* aReason) -> void
24
0
{
25
0
}
26
27
auto PVRGPUChild::ShouldContinueFromReplyTimeout() -> bool
28
0
{
29
0
    return true;
30
0
}
31
32
auto PVRGPUChild::EnteredCxxStack() -> void
33
0
{
34
0
}
35
36
auto PVRGPUChild::ExitedCxxStack() -> void
37
0
{
38
0
}
39
40
auto PVRGPUChild::EnteredCall() -> void
41
0
{
42
0
}
43
44
auto PVRGPUChild::ExitedCall() -> void
45
0
{
46
0
}
47
48
MOZ_IMPLICIT PVRGPUChild::PVRGPUChild() :
49
    mozilla::ipc::IToplevelProtocol("PVRGPUChild", PVRGPUMsgStart, mozilla::ipc::ChildSide),
50
    mLivenessState(mozilla::ipc::LivenessState::Start)
51
0
{
52
0
    MOZ_COUNT_CTOR(PVRGPUChild);
53
0
}
54
55
PVRGPUChild::~PVRGPUChild()
56
0
{
57
0
    MOZ_COUNT_DTOR(PVRGPUChild);
58
0
}
59
60
auto PVRGPUChild::SendStartVRService() -> bool
61
0
{
62
0
    IPC::Message* msg__ = PVRGPU::Msg_StartVRService(MSG_ROUTING_CONTROL);
63
0
64
0
65
0
66
0
67
0
68
0
    if (mozilla::ipc::LoggingEnabledFor("PVRGPUChild")) {
69
0
        mozilla::ipc::LogMessageForProtocol("PVRGPUChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
70
0
    }
71
0
    AUTO_PROFILER_LABEL("PVRGPU::Msg_StartVRService", OTHER);
72
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
73
0
        mozilla::ipc::LogicError("Transition error");
74
0
    }
75
0
76
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
77
0
    return sendok__;
78
0
}
79
80
auto PVRGPUChild::SendStopVRService() -> bool
81
0
{
82
0
    IPC::Message* msg__ = PVRGPU::Msg_StopVRService(MSG_ROUTING_CONTROL);
83
0
84
0
85
0
86
0
87
0
88
0
    if (mozilla::ipc::LoggingEnabledFor("PVRGPUChild")) {
89
0
        mozilla::ipc::LogMessageForProtocol("PVRGPUChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
90
0
    }
91
0
    AUTO_PROFILER_LABEL("PVRGPU::Msg_StopVRService", OTHER);
92
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
93
0
        mozilla::ipc::LogicError("Transition error");
94
0
    }
95
0
96
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
97
0
    return sendok__;
98
0
}
99
100
auto PVRGPUChild::RemoveManagee(
101
        int32_t aProtocolId,
102
        IProtocol* aListener) -> void
103
0
{
104
0
    FatalError("unreached");
105
0
    return;
106
0
}
107
108
auto PVRGPUChild::OnMessageReceived(const Message& msg__) -> PVRGPUChild::Result
109
{
110
    switch ((msg__).type()) {
111
    default:
112
        {
113
            return MsgNotKnown;
114
        }
115
    case SHMEM_CREATED_MESSAGE_TYPE:
116
        {
117
            FatalError("this protocol tree does not use shmem");
118
            return MsgNotKnown;
119
        }
120
    case SHMEM_DESTROYED_MESSAGE_TYPE:
121
        {
122
            FatalError("this protocol tree does not use shmem");
123
            return MsgNotKnown;
124
        }
125
    }
126
}
127
128
auto PVRGPUChild::OnMessageReceived(
129
        const Message& msg__,
130
        Message*& reply__) -> PVRGPUChild::Result
131
0
{
132
0
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
133
0
    return MsgNotKnown;
134
0
}
135
136
auto PVRGPUChild::OnCallReceived(
137
        const Message& msg__,
138
        Message*& reply__) -> PVRGPUChild::Result
139
0
{
140
0
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
141
0
    return MsgNotKnown;
142
0
}
143
144
auto PVRGPUChild::GetProtocolTypeId() -> int32_t
145
0
{
146
0
    return PVRGPUMsgStart;
147
0
}
148
149
auto PVRGPUChild::OnChannelClose() -> void
150
0
{
151
0
    DestroySubtree(NormalShutdown);
152
0
    DeallocSubtree();
153
0
    DeallocShmems();
154
0
    DeallocPVRGPUChild();
155
0
}
156
157
auto PVRGPUChild::OnChannelError() -> void
158
0
{
159
0
    DestroySubtree(AbnormalShutdown);
160
0
    DeallocSubtree();
161
0
    DeallocShmems();
162
0
    DeallocPVRGPUChild();
163
0
}
164
165
auto PVRGPUChild::DestroySubtree(ActorDestroyReason why) -> void
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 PVRGPUChild::DeallocSubtree() -> void
175
0
{
176
0
}
177
178
auto PVRGPUChild::DeallocPVRGPUChild() -> void
179
0
{
180
0
}
181
182
183
184
} // namespace gfx
185
} // namespace mozilla
186
namespace mozilla {
187
namespace ipc {
188
auto IPDLParamTraits<mozilla::gfx::PVRGPUChild>::Write(
189
        IPC::Message* aMsg,
190
        mozilla::ipc::IProtocol* aActor,
191
        const paramType& aVar) -> void
192
0
{
193
0
    int32_t id;
194
0
    if ((!(aVar))) {
195
0
        id = 0;
196
0
    }
197
0
    else {
198
0
        id = (aVar)->Id();
199
0
        if ((1) == (id)) {
200
0
            (aActor)->FatalError("actor has been |delete|d");
201
0
        }
202
0
    }
203
0
    WriteIPDLParam(aMsg, aActor, id);
204
0
}
205
206
auto IPDLParamTraits<mozilla::gfx::PVRGPUChild>::Read(
207
        const IPC::Message* aMsg,
208
        PickleIterator* aIter,
209
        mozilla::ipc::IProtocol* aActor,
210
        paramType* aVar) -> bool
211
0
{
212
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PVRGPU", PVRGPUMsgStart);
213
0
    if ((actor).isNothing()) {
214
0
        return false;
215
0
    }
216
0
217
0
    (*(aVar)) = static_cast<mozilla::gfx::PVRGPUChild*>((actor).value());
218
0
    return true;
219
0
}
220
221
} // namespace ipc
222
} // namespace mozilla