/work/obj-fuzz/ipc/ipdl/PWebrtcGlobalChild.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/PWebrtcGlobalChild.h" |
8 | | #include "mozilla/dom/RTCStatsReportBinding.h" |
9 | | |
10 | | #include "mozilla/dom/PContentChild.h" |
11 | | |
12 | | #include "nsIFile.h" |
13 | | #include "GeckoProfiler.h" |
14 | | |
15 | | namespace mozilla { |
16 | | namespace dom { |
17 | | |
18 | | |
19 | | auto PWebrtcGlobalChild::ActorDestroy(ActorDestroyReason aWhy) -> void |
20 | 0 | { |
21 | 0 | } |
22 | | |
23 | | MOZ_IMPLICIT PWebrtcGlobalChild::PWebrtcGlobalChild() : |
24 | | mozilla::ipc::IProtocol(mozilla::ipc::ChildSide), |
25 | | mLivenessState(mozilla::ipc::LivenessState::Dead) |
26 | 0 | { |
27 | 0 | MOZ_COUNT_CTOR(PWebrtcGlobalChild); |
28 | 0 | } |
29 | | |
30 | | PWebrtcGlobalChild::~PWebrtcGlobalChild() |
31 | 0 | { |
32 | 0 | MOZ_COUNT_DTOR(PWebrtcGlobalChild); |
33 | 0 | } |
34 | | |
35 | | auto PWebrtcGlobalChild::Manager() const -> PContentChild* |
36 | 0 | { |
37 | 0 | return static_cast<PContentChild*>(IProtocol::Manager()); |
38 | 0 | } |
39 | | |
40 | | auto PWebrtcGlobalChild::SendGetStatsResult( |
41 | | const int& aRequestId, |
42 | | const nsTArray<RTCStatsReportInternal>& aStats) -> bool |
43 | 0 | { |
44 | 0 | IPC::Message* msg__ = PWebrtcGlobal::Msg_GetStatsResult(Id()); |
45 | 0 |
|
46 | 0 | WriteIPDLParam(msg__, this, aRequestId); |
47 | 0 | // Sentinel = 'aRequestId' |
48 | 0 | (msg__)->WriteSentinel(3709302657); |
49 | 0 | WriteIPDLParam(msg__, this, aStats); |
50 | 0 | // Sentinel = 'aStats' |
51 | 0 | (msg__)->WriteSentinel(3694751948); |
52 | 0 |
|
53 | 0 |
|
54 | 0 |
|
55 | 0 |
|
56 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) { |
57 | 0 | mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
58 | 0 | } |
59 | 0 | AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_GetStatsResult", OTHER); |
60 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
61 | 0 | mozilla::ipc::LogicError("Transition error"); |
62 | 0 | } |
63 | 0 |
|
64 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
65 | 0 | return sendok__; |
66 | 0 | } |
67 | | |
68 | | auto PWebrtcGlobalChild::SendGetLogResult( |
69 | | const int& aRequestId, |
70 | | const WebrtcGlobalLog& aLog) -> bool |
71 | 0 | { |
72 | 0 | IPC::Message* msg__ = PWebrtcGlobal::Msg_GetLogResult(Id()); |
73 | 0 |
|
74 | 0 | WriteIPDLParam(msg__, this, aRequestId); |
75 | 0 | // Sentinel = 'aRequestId' |
76 | 0 | (msg__)->WriteSentinel(3709302657); |
77 | 0 | WriteIPDLParam(msg__, this, aLog); |
78 | 0 | // Sentinel = 'aLog' |
79 | 0 | (msg__)->WriteSentinel(2709198341); |
80 | 0 |
|
81 | 0 |
|
82 | 0 |
|
83 | 0 |
|
84 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) { |
85 | 0 | mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
86 | 0 | } |
87 | 0 | AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_GetLogResult", OTHER); |
88 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
89 | 0 | mozilla::ipc::LogicError("Transition error"); |
90 | 0 | } |
91 | 0 |
|
92 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
93 | 0 | return sendok__; |
94 | 0 | } |
95 | | |
96 | | auto PWebrtcGlobalChild::Send__delete__(PWebrtcGlobalChild* actor) -> bool |
97 | 0 | { |
98 | 0 | if ((!(actor))) { |
99 | 0 | return false; |
100 | 0 | } |
101 | 0 | |
102 | 0 | IPC::Message* msg__ = PWebrtcGlobal::Msg___delete__((actor)->Id()); |
103 | 0 |
|
104 | 0 | MOZ_RELEASE_ASSERT(actor, "NULL actor value passed to non-nullable param"); |
105 | 0 | WriteIPDLParam(msg__, actor, actor); |
106 | 0 | // Sentinel = 'actor' |
107 | 0 | (msg__)->WriteSentinel(875202478); |
108 | 0 |
|
109 | 0 |
|
110 | 0 |
|
111 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) { |
112 | 0 | mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
113 | 0 | } |
114 | 0 | AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg___delete__", OTHER); |
115 | 0 | if ((!(StateTransition(true, (&((actor)->mLivenessState)))))) { |
116 | 0 | mozilla::ipc::LogicError("Transition error"); |
117 | 0 | } |
118 | 0 |
|
119 | 0 | bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__); |
120 | 0 |
|
121 | 0 | IProtocol* mgr = (actor)->Manager(); |
122 | 0 | (actor)->DestroySubtree(Deletion); |
123 | 0 | (actor)->DeallocSubtree(); |
124 | 0 | (mgr)->RemoveManagee(PWebrtcGlobalMsgStart, actor); |
125 | 0 | return sendok__; |
126 | 0 | } |
127 | | |
128 | | auto PWebrtcGlobalChild::RemoveManagee( |
129 | | int32_t aProtocolId, |
130 | | IProtocol* aListener) -> void |
131 | 0 | { |
132 | 0 | FatalError("unreached"); |
133 | 0 | return; |
134 | 0 | } |
135 | | |
136 | | auto PWebrtcGlobalChild::OnMessageReceived(const Message& msg__) -> PWebrtcGlobalChild::Result |
137 | 0 | { |
138 | 0 | switch ((msg__).type()) { |
139 | 0 | case PWebrtcGlobal::Msg_GetStatsRequest__ID: |
140 | 0 | { |
141 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) { |
142 | 0 | mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
143 | 0 | } |
144 | 0 | AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_GetStatsRequest", OTHER); |
145 | 0 |
|
146 | 0 | PickleIterator iter__(msg__); |
147 | 0 | int aRequestId; |
148 | 0 | nsString aPcIdFilter; |
149 | 0 |
|
150 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aRequestId)))))) { |
151 | 0 | FatalError("Error deserializing 'int'"); |
152 | 0 | return MsgValueError; |
153 | 0 | } |
154 | 0 | // Sentinel = 'aRequestId' |
155 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3709302657)))) { |
156 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'int'"); |
157 | 0 | return MsgValueError; |
158 | 0 | } |
159 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aPcIdFilter)))))) { |
160 | 0 | FatalError("Error deserializing 'nsString'"); |
161 | 0 | return MsgValueError; |
162 | 0 | } |
163 | 0 | // Sentinel = 'aPcIdFilter' |
164 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1293029124)))) { |
165 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsString'"); |
166 | 0 | return MsgValueError; |
167 | 0 | } |
168 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
169 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
170 | 0 | FatalError("Transition error"); |
171 | 0 | return MsgValueError; |
172 | 0 | } |
173 | 0 | if ((!(RecvGetStatsRequest(aRequestId, aPcIdFilter)))) { |
174 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
175 | 0 | // Error handled in mozilla::ipc::IPCResult |
176 | 0 | return MsgProcessingError; |
177 | 0 | } |
178 | 0 | |
179 | 0 | return MsgProcessed; |
180 | 0 | } |
181 | 0 | case PWebrtcGlobal::Msg_ClearStatsRequest__ID: |
182 | 0 | { |
183 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) { |
184 | 0 | mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
185 | 0 | } |
186 | 0 | AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_ClearStatsRequest", OTHER); |
187 | 0 |
|
188 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
189 | 0 | FatalError("Transition error"); |
190 | 0 | return MsgValueError; |
191 | 0 | } |
192 | 0 | if ((!(RecvClearStatsRequest()))) { |
193 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
194 | 0 | // Error handled in mozilla::ipc::IPCResult |
195 | 0 | return MsgProcessingError; |
196 | 0 | } |
197 | 0 | |
198 | 0 | return MsgProcessed; |
199 | 0 | } |
200 | 0 | case PWebrtcGlobal::Msg_GetLogRequest__ID: |
201 | 0 | { |
202 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) { |
203 | 0 | mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
204 | 0 | } |
205 | 0 | AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_GetLogRequest", OTHER); |
206 | 0 |
|
207 | 0 | PickleIterator iter__(msg__); |
208 | 0 | int aRequestId; |
209 | 0 | nsCString aPattern; |
210 | 0 |
|
211 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aRequestId)))))) { |
212 | 0 | FatalError("Error deserializing 'int'"); |
213 | 0 | return MsgValueError; |
214 | 0 | } |
215 | 0 | // Sentinel = 'aRequestId' |
216 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3709302657)))) { |
217 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'int'"); |
218 | 0 | return MsgValueError; |
219 | 0 | } |
220 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aPattern)))))) { |
221 | 0 | FatalError("Error deserializing 'nsCString'"); |
222 | 0 | return MsgValueError; |
223 | 0 | } |
224 | 0 | // Sentinel = 'aPattern' |
225 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3502183121)))) { |
226 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
227 | 0 | return MsgValueError; |
228 | 0 | } |
229 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
230 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
231 | 0 | FatalError("Transition error"); |
232 | 0 | return MsgValueError; |
233 | 0 | } |
234 | 0 | if ((!(RecvGetLogRequest(aRequestId, aPattern)))) { |
235 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
236 | 0 | // Error handled in mozilla::ipc::IPCResult |
237 | 0 | return MsgProcessingError; |
238 | 0 | } |
239 | 0 | |
240 | 0 | return MsgProcessed; |
241 | 0 | } |
242 | 0 | case PWebrtcGlobal::Msg_ClearLogRequest__ID: |
243 | 0 | { |
244 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) { |
245 | 0 | mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
246 | 0 | } |
247 | 0 | AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_ClearLogRequest", OTHER); |
248 | 0 |
|
249 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
250 | 0 | FatalError("Transition error"); |
251 | 0 | return MsgValueError; |
252 | 0 | } |
253 | 0 | if ((!(RecvClearLogRequest()))) { |
254 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
255 | 0 | // Error handled in mozilla::ipc::IPCResult |
256 | 0 | return MsgProcessingError; |
257 | 0 | } |
258 | 0 | |
259 | 0 | return MsgProcessed; |
260 | 0 | } |
261 | 0 | case PWebrtcGlobal::Msg_SetAecLogging__ID: |
262 | 0 | { |
263 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) { |
264 | 0 | mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
265 | 0 | } |
266 | 0 | AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_SetAecLogging", OTHER); |
267 | 0 |
|
268 | 0 | PickleIterator iter__(msg__); |
269 | 0 | bool aEnable; |
270 | 0 |
|
271 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aEnable)))))) { |
272 | 0 | FatalError("Error deserializing 'bool'"); |
273 | 0 | return MsgValueError; |
274 | 0 | } |
275 | 0 | // Sentinel = 'aEnable' |
276 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 163837555)))) { |
277 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); |
278 | 0 | return MsgValueError; |
279 | 0 | } |
280 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
281 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
282 | 0 | FatalError("Transition error"); |
283 | 0 | return MsgValueError; |
284 | 0 | } |
285 | 0 | if ((!(RecvSetAecLogging(aEnable)))) { |
286 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
287 | 0 | // Error handled in mozilla::ipc::IPCResult |
288 | 0 | return MsgProcessingError; |
289 | 0 | } |
290 | 0 | |
291 | 0 | return MsgProcessed; |
292 | 0 | } |
293 | 0 | case PWebrtcGlobal::Msg_SetDebugMode__ID: |
294 | 0 | { |
295 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWebrtcGlobalChild")) { |
296 | 0 | mozilla::ipc::LogMessageForProtocol("PWebrtcGlobalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
297 | 0 | } |
298 | 0 | AUTO_PROFILER_LABEL("PWebrtcGlobal::Msg_SetDebugMode", OTHER); |
299 | 0 |
|
300 | 0 | PickleIterator iter__(msg__); |
301 | 0 | int aLevel; |
302 | 0 |
|
303 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aLevel)))))) { |
304 | 0 | FatalError("Error deserializing 'int'"); |
305 | 0 | return MsgValueError; |
306 | 0 | } |
307 | 0 | // Sentinel = 'aLevel' |
308 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1717579975)))) { |
309 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'int'"); |
310 | 0 | return MsgValueError; |
311 | 0 | } |
312 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
313 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
314 | 0 | FatalError("Transition error"); |
315 | 0 | return MsgValueError; |
316 | 0 | } |
317 | 0 | if ((!(RecvSetDebugMode(aLevel)))) { |
318 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
319 | 0 | // Error handled in mozilla::ipc::IPCResult |
320 | 0 | return MsgProcessingError; |
321 | 0 | } |
322 | 0 | |
323 | 0 | return MsgProcessed; |
324 | 0 | } |
325 | 0 | case PWebrtcGlobal::Reply___delete____ID: |
326 | 0 | { |
327 | 0 | return MsgProcessed; |
328 | 0 | } |
329 | 0 | default: |
330 | 0 | { |
331 | 0 | return MsgNotKnown; |
332 | 0 | } |
333 | 0 | } |
334 | 0 | } |
335 | | |
336 | | auto PWebrtcGlobalChild::OnMessageReceived( |
337 | | const Message& msg__, |
338 | | Message*& reply__) -> PWebrtcGlobalChild::Result |
339 | 0 | { |
340 | 0 | return MsgNotKnown; |
341 | 0 | } |
342 | | |
343 | | auto PWebrtcGlobalChild::OnCallReceived( |
344 | | const Message& msg__, |
345 | | Message*& reply__) -> PWebrtcGlobalChild::Result |
346 | 0 | { |
347 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
348 | 0 | return MsgNotKnown; |
349 | 0 | } |
350 | | |
351 | | auto PWebrtcGlobalChild::GetProtocolTypeId() -> int32_t |
352 | 0 | { |
353 | 0 | return PWebrtcGlobalMsgStart; |
354 | 0 | } |
355 | | |
356 | | auto PWebrtcGlobalChild::DestroySubtree(ActorDestroyReason why) -> void |
357 | 0 | { |
358 | 0 | // Unregister from our manager. |
359 | 0 | Unregister(Id()); |
360 | 0 |
|
361 | 0 | // Reject owning pending responses. |
362 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
363 | 0 |
|
364 | 0 | // Finally, destroy "us". |
365 | 0 | ActorDestroy(why); |
366 | 0 | } |
367 | | |
368 | | auto PWebrtcGlobalChild::DeallocSubtree() -> void |
369 | 0 | { |
370 | 0 | } |
371 | | |
372 | | |
373 | | |
374 | | } // namespace dom |
375 | | } // namespace mozilla |
376 | | namespace mozilla { |
377 | | namespace ipc { |
378 | | auto IPDLParamTraits<mozilla::dom::PWebrtcGlobalChild>::Write( |
379 | | IPC::Message* aMsg, |
380 | | mozilla::ipc::IProtocol* aActor, |
381 | | const paramType& aVar) -> void |
382 | 0 | { |
383 | 0 | int32_t id; |
384 | 0 | if ((!(aVar))) { |
385 | 0 | id = 0; |
386 | 0 | } |
387 | 0 | else { |
388 | 0 | id = (aVar)->Id(); |
389 | 0 | if ((1) == (id)) { |
390 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
391 | 0 | } |
392 | 0 | } |
393 | 0 | WriteIPDLParam(aMsg, aActor, id); |
394 | 0 | } |
395 | | |
396 | | auto IPDLParamTraits<mozilla::dom::PWebrtcGlobalChild>::Read( |
397 | | const IPC::Message* aMsg, |
398 | | PickleIterator* aIter, |
399 | | mozilla::ipc::IProtocol* aActor, |
400 | | paramType* aVar) -> bool |
401 | 0 | { |
402 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PWebrtcGlobal", PWebrtcGlobalMsgStart); |
403 | 0 | if ((actor).isNothing()) { |
404 | 0 | return false; |
405 | 0 | } |
406 | 0 | |
407 | 0 | (*(aVar)) = static_cast<mozilla::dom::PWebrtcGlobalChild*>((actor).value()); |
408 | 0 | return true; |
409 | 0 | } |
410 | | |
411 | | } // namespace ipc |
412 | | } // namespace mozilla |