/work/obj-fuzz/ipc/ipdl/PVRChild.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/PVRChild.h" |
8 | | |
9 | | #include "mozilla/gfx/PVRGPUChild.h" |
10 | | |
11 | | #include "nsIFile.h" |
12 | | #include "GeckoProfiler.h" |
13 | | |
14 | | namespace mozilla { |
15 | | namespace gfx { |
16 | | |
17 | | |
18 | | auto PVRChild::ActorDestroy(ActorDestroyReason aWhy) -> void |
19 | 0 | { |
20 | 0 | } |
21 | | |
22 | | auto PVRChild::ProcessingError( |
23 | | Result aCode, |
24 | | const char* aReason) -> void |
25 | 0 | { |
26 | 0 | } |
27 | | |
28 | | auto PVRChild::ShouldContinueFromReplyTimeout() -> bool |
29 | 0 | { |
30 | 0 | return true; |
31 | 0 | } |
32 | | |
33 | | auto PVRChild::EnteredCxxStack() -> void |
34 | 0 | { |
35 | 0 | } |
36 | | |
37 | | auto PVRChild::ExitedCxxStack() -> void |
38 | 0 | { |
39 | 0 | } |
40 | | |
41 | | auto PVRChild::EnteredCall() -> void |
42 | 0 | { |
43 | 0 | } |
44 | | |
45 | | auto PVRChild::ExitedCall() -> void |
46 | 0 | { |
47 | 0 | } |
48 | | |
49 | | MOZ_IMPLICIT PVRChild::PVRChild() : |
50 | | mozilla::ipc::IToplevelProtocol("PVRChild", PVRMsgStart, mozilla::ipc::ChildSide), |
51 | | mLivenessState(mozilla::ipc::LivenessState::Start) |
52 | 0 | { |
53 | 0 | MOZ_COUNT_CTOR(PVRChild); |
54 | 0 | } |
55 | | |
56 | | PVRChild::~PVRChild() |
57 | 0 | { |
58 | 0 | MOZ_COUNT_DTOR(PVRChild); |
59 | 0 | } |
60 | | |
61 | | auto PVRChild::SendNewGPUVRManager(const Endpoint<mozilla::gfx::PVRGPUParent>& endpoint) -> bool |
62 | 0 | { |
63 | 0 | IPC::Message* msg__ = PVR::Msg_NewGPUVRManager(MSG_ROUTING_CONTROL); |
64 | 0 |
|
65 | 0 | WriteIPDLParam(msg__, this, endpoint); |
66 | 0 | // Sentinel = 'endpoint' |
67 | 0 | (msg__)->WriteSentinel(3610972515); |
68 | 0 |
|
69 | 0 |
|
70 | 0 |
|
71 | 0 |
|
72 | 0 | if (mozilla::ipc::LoggingEnabledFor("PVRChild")) { |
73 | 0 | mozilla::ipc::LogMessageForProtocol("PVRChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
74 | 0 | } |
75 | 0 | AUTO_PROFILER_LABEL("PVR::Msg_NewGPUVRManager", OTHER); |
76 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
77 | 0 | mozilla::ipc::LogicError("Transition error"); |
78 | 0 | } |
79 | 0 |
|
80 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
81 | 0 | return sendok__; |
82 | 0 | } |
83 | | |
84 | | auto PVRChild::SendInit( |
85 | | const nsTArray<GfxPrefSetting>& prefs, |
86 | | const nsTArray<GfxVarUpdate>& vars, |
87 | | const DevicePrefs& devicePrefs) -> bool |
88 | 0 | { |
89 | 0 | IPC::Message* msg__ = PVR::Msg_Init(MSG_ROUTING_CONTROL); |
90 | 0 |
|
91 | 0 | WriteIPDLParam(msg__, this, prefs); |
92 | 0 | // Sentinel = 'prefs' |
93 | 0 | (msg__)->WriteSentinel(3194398011); |
94 | 0 | WriteIPDLParam(msg__, this, vars); |
95 | 0 | // Sentinel = 'vars' |
96 | 0 | (msg__)->WriteSentinel(2632090118); |
97 | 0 | WriteIPDLParam(msg__, this, devicePrefs); |
98 | 0 | // Sentinel = 'devicePrefs' |
99 | 0 | (msg__)->WriteSentinel(2200416183); |
100 | 0 |
|
101 | 0 |
|
102 | 0 |
|
103 | 0 |
|
104 | 0 | if (mozilla::ipc::LoggingEnabledFor("PVRChild")) { |
105 | 0 | mozilla::ipc::LogMessageForProtocol("PVRChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
106 | 0 | } |
107 | 0 | AUTO_PROFILER_LABEL("PVR::Msg_Init", OTHER); |
108 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
109 | 0 | mozilla::ipc::LogicError("Transition error"); |
110 | 0 | } |
111 | 0 |
|
112 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
113 | 0 | return sendok__; |
114 | 0 | } |
115 | | |
116 | | auto PVRChild::SendNotifyVsync(const TimeStamp& vsyncTimestamp) -> bool |
117 | 0 | { |
118 | 0 | IPC::Message* msg__ = PVR::Msg_NotifyVsync(MSG_ROUTING_CONTROL); |
119 | 0 |
|
120 | 0 | WriteIPDLParam(msg__, this, vsyncTimestamp); |
121 | 0 | // Sentinel = 'vsyncTimestamp' |
122 | 0 | (msg__)->WriteSentinel(2945375443); |
123 | 0 |
|
124 | 0 |
|
125 | 0 |
|
126 | 0 |
|
127 | 0 | if (mozilla::ipc::LoggingEnabledFor("PVRChild")) { |
128 | 0 | mozilla::ipc::LogMessageForProtocol("PVRChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
129 | 0 | } |
130 | 0 | AUTO_PROFILER_LABEL("PVR::Msg_NotifyVsync", OTHER); |
131 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
132 | 0 | mozilla::ipc::LogicError("Transition error"); |
133 | 0 | } |
134 | 0 |
|
135 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
136 | 0 | return sendok__; |
137 | 0 | } |
138 | | |
139 | | auto PVRChild::SendUpdatePref(const GfxPrefSetting& pref) -> bool |
140 | 0 | { |
141 | 0 | IPC::Message* msg__ = PVR::Msg_UpdatePref(MSG_ROUTING_CONTROL); |
142 | 0 |
|
143 | 0 | WriteIPDLParam(msg__, this, pref); |
144 | 0 | // Sentinel = 'pref' |
145 | 0 | (msg__)->WriteSentinel(3089393963); |
146 | 0 |
|
147 | 0 |
|
148 | 0 |
|
149 | 0 |
|
150 | 0 | if (mozilla::ipc::LoggingEnabledFor("PVRChild")) { |
151 | 0 | mozilla::ipc::LogMessageForProtocol("PVRChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
152 | 0 | } |
153 | 0 | AUTO_PROFILER_LABEL("PVR::Msg_UpdatePref", OTHER); |
154 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
155 | 0 | mozilla::ipc::LogicError("Transition error"); |
156 | 0 | } |
157 | 0 |
|
158 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
159 | 0 | return sendok__; |
160 | 0 | } |
161 | | |
162 | | auto PVRChild::SendUpdateVar(const GfxVarUpdate& var) -> bool |
163 | 0 | { |
164 | 0 | IPC::Message* msg__ = PVR::Msg_UpdateVar(MSG_ROUTING_CONTROL); |
165 | 0 |
|
166 | 0 | WriteIPDLParam(msg__, this, var); |
167 | 0 | // Sentinel = 'var' |
168 | 0 | (msg__)->WriteSentinel(2283110200); |
169 | 0 |
|
170 | 0 |
|
171 | 0 |
|
172 | 0 |
|
173 | 0 | if (mozilla::ipc::LoggingEnabledFor("PVRChild")) { |
174 | 0 | mozilla::ipc::LogMessageForProtocol("PVRChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
175 | 0 | } |
176 | 0 | AUTO_PROFILER_LABEL("PVR::Msg_UpdateVar", OTHER); |
177 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
178 | 0 | mozilla::ipc::LogicError("Transition error"); |
179 | 0 | } |
180 | 0 |
|
181 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
182 | 0 | return sendok__; |
183 | 0 | } |
184 | | |
185 | | auto PVRChild::RemoveManagee( |
186 | | int32_t aProtocolId, |
187 | | IProtocol* aListener) -> void |
188 | 0 | { |
189 | 0 | FatalError("unreached"); |
190 | 0 | return; |
191 | 0 | } |
192 | | |
193 | | auto PVRChild::OnMessageReceived(const Message& msg__) -> PVRChild::Result |
194 | | { |
195 | | switch ((msg__).type()) { |
196 | | default: |
197 | | { |
198 | | return MsgNotKnown; |
199 | | } |
200 | | case SHMEM_CREATED_MESSAGE_TYPE: |
201 | | { |
202 | | FatalError("this protocol tree does not use shmem"); |
203 | | return MsgNotKnown; |
204 | | } |
205 | | case SHMEM_DESTROYED_MESSAGE_TYPE: |
206 | | { |
207 | | FatalError("this protocol tree does not use shmem"); |
208 | | return MsgNotKnown; |
209 | | } |
210 | | } |
211 | | } |
212 | | |
213 | | auto PVRChild::OnMessageReceived( |
214 | | const Message& msg__, |
215 | | Message*& reply__) -> PVRChild::Result |
216 | 0 | { |
217 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
218 | 0 | return MsgNotKnown; |
219 | 0 | } |
220 | | |
221 | | auto PVRChild::OnCallReceived( |
222 | | const Message& msg__, |
223 | | Message*& reply__) -> PVRChild::Result |
224 | 0 | { |
225 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
226 | 0 | return MsgNotKnown; |
227 | 0 | } |
228 | | |
229 | | auto PVRChild::GetProtocolTypeId() -> int32_t |
230 | 0 | { |
231 | 0 | return PVRMsgStart; |
232 | 0 | } |
233 | | |
234 | | auto PVRChild::OnChannelClose() -> void |
235 | 0 | { |
236 | 0 | DestroySubtree(NormalShutdown); |
237 | 0 | DeallocSubtree(); |
238 | 0 | DeallocShmems(); |
239 | 0 | DeallocPVRChild(); |
240 | 0 | } |
241 | | |
242 | | auto PVRChild::OnChannelError() -> void |
243 | 0 | { |
244 | 0 | DestroySubtree(AbnormalShutdown); |
245 | 0 | DeallocSubtree(); |
246 | 0 | DeallocShmems(); |
247 | 0 | DeallocPVRChild(); |
248 | 0 | } |
249 | | |
250 | | auto PVRChild::DestroySubtree(ActorDestroyReason why) -> void |
251 | 0 | { |
252 | 0 | // Reject owning pending responses. |
253 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
254 | 0 |
|
255 | 0 | // Finally, destroy "us". |
256 | 0 | ActorDestroy(why); |
257 | 0 | } |
258 | | |
259 | | auto PVRChild::DeallocSubtree() -> void |
260 | 0 | { |
261 | 0 | } |
262 | | |
263 | | auto PVRChild::DeallocPVRChild() -> void |
264 | 0 | { |
265 | 0 | } |
266 | | |
267 | | |
268 | | |
269 | | } // namespace gfx |
270 | | } // namespace mozilla |
271 | | namespace mozilla { |
272 | | namespace ipc { |
273 | | auto IPDLParamTraits<mozilla::gfx::PVRChild>::Write( |
274 | | IPC::Message* aMsg, |
275 | | mozilla::ipc::IProtocol* aActor, |
276 | | const paramType& aVar) -> void |
277 | 0 | { |
278 | 0 | int32_t id; |
279 | 0 | if ((!(aVar))) { |
280 | 0 | id = 0; |
281 | 0 | } |
282 | 0 | else { |
283 | 0 | id = (aVar)->Id(); |
284 | 0 | if ((1) == (id)) { |
285 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
286 | 0 | } |
287 | 0 | } |
288 | 0 | WriteIPDLParam(aMsg, aActor, id); |
289 | 0 | } |
290 | | |
291 | | auto IPDLParamTraits<mozilla::gfx::PVRChild>::Read( |
292 | | const IPC::Message* aMsg, |
293 | | PickleIterator* aIter, |
294 | | mozilla::ipc::IProtocol* aActor, |
295 | | paramType* aVar) -> bool |
296 | 0 | { |
297 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PVR", PVRMsgStart); |
298 | 0 | if ((actor).isNothing()) { |
299 | 0 | return false; |
300 | 0 | } |
301 | 0 | |
302 | 0 | (*(aVar)) = static_cast<mozilla::gfx::PVRChild*>((actor).value()); |
303 | 0 | return true; |
304 | 0 | } |
305 | | |
306 | | } // namespace ipc |
307 | | } // namespace mozilla |