/work/obj-fuzz/ipc/ipdl/PPluginModuleChild.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/plugins/PPluginModuleChild.h" |
8 | | #include "mozilla/plugins/PluginMessageUtils.h" |
9 | | #include "nsID.h" |
10 | | |
11 | | #include "mozilla/plugins/PPluginInstanceChild.h" |
12 | | #include "mozilla/plugins/PPluginScriptableObjectChild.h" |
13 | | #include "mozilla/dom/PContentChild.h" |
14 | | #include "mozilla/PProfilerChild.h" |
15 | | #include "mozilla/plugins/PFunctionBrokerChild.h" |
16 | | |
17 | | #include "nsIFile.h" |
18 | | #include "GeckoProfiler.h" |
19 | | |
20 | | namespace mozilla { |
21 | | namespace plugins { |
22 | | |
23 | | |
24 | | auto PPluginModuleChild::RecvPPluginInstanceConstructor( |
25 | | PPluginInstanceChild* actor, |
26 | | const nsCString& aMimeType, |
27 | | nsTArray<nsCString>&& aNames, |
28 | | nsTArray<nsCString>&& aValues) -> mozilla::ipc::IPCResult |
29 | 0 | { |
30 | 0 | return IPC_OK(); |
31 | 0 | } |
32 | | |
33 | | auto PPluginModuleChild::ActorDestroy(ActorDestroyReason aWhy) -> void |
34 | 0 | { |
35 | 0 | } |
36 | | |
37 | | auto PPluginModuleChild::ProcessingError( |
38 | | Result aCode, |
39 | | const char* aReason) -> void |
40 | 0 | { |
41 | 0 | } |
42 | | |
43 | | auto PPluginModuleChild::ShouldContinueFromReplyTimeout() -> bool |
44 | 0 | { |
45 | 0 | return true; |
46 | 0 | } |
47 | | |
48 | | auto PPluginModuleChild::EnteredCxxStack() -> void |
49 | 0 | { |
50 | 0 | } |
51 | | |
52 | | auto PPluginModuleChild::ExitedCxxStack() -> void |
53 | 0 | { |
54 | 0 | } |
55 | | |
56 | | auto PPluginModuleChild::EnteredCall() -> void |
57 | 0 | { |
58 | 0 | } |
59 | | |
60 | | auto PPluginModuleChild::ExitedCall() -> void |
61 | 0 | { |
62 | 0 | } |
63 | | |
64 | | MOZ_IMPLICIT PPluginModuleChild::PPluginModuleChild() : |
65 | | mozilla::ipc::IToplevelProtocol("PPluginModuleChild", PPluginModuleMsgStart, mozilla::ipc::ChildSide), |
66 | | mLivenessState(mozilla::ipc::LivenessState::Start) |
67 | 0 | { |
68 | 0 | MOZ_COUNT_CTOR(PPluginModuleChild); |
69 | 0 | } |
70 | | |
71 | | PPluginModuleChild::~PPluginModuleChild() |
72 | 0 | { |
73 | 0 | MOZ_COUNT_DTOR(PPluginModuleChild); |
74 | 0 | } |
75 | | |
76 | | auto PPluginModuleChild::ManagedPPluginInstanceChild(nsTArray<PPluginInstanceChild*>& aArr) const -> void |
77 | 0 | { |
78 | 0 | (mManagedPPluginInstanceChild).ToArray(aArr); |
79 | 0 | } |
80 | | |
81 | | auto PPluginModuleChild::ManagedPPluginInstanceChild() const -> const ManagedContainer<PPluginInstanceChild>& |
82 | 0 | { |
83 | 0 | return mManagedPPluginInstanceChild; |
84 | 0 | } |
85 | | |
86 | | auto PPluginModuleChild::SendProcessNativeEventsInInterruptCall() -> bool |
87 | 0 | { |
88 | 0 | IPC::Message* msg__ = PPluginModule::Msg_ProcessNativeEventsInInterruptCall(MSG_ROUTING_CONTROL); |
89 | 0 |
|
90 | 0 |
|
91 | 0 |
|
92 | 0 |
|
93 | 0 |
|
94 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
95 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
96 | 0 | } |
97 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_ProcessNativeEventsInInterruptCall", OTHER); |
98 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
99 | 0 | mozilla::ipc::LogicError("Transition error"); |
100 | 0 | } |
101 | 0 |
|
102 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
103 | 0 | return sendok__; |
104 | 0 | } |
105 | | |
106 | | auto PPluginModuleChild::SendBackUpXResources(const FileDescriptor& aXSocketFd) -> bool |
107 | 0 | { |
108 | 0 | IPC::Message* msg__ = PPluginModule::Msg_BackUpXResources(MSG_ROUTING_CONTROL); |
109 | 0 |
|
110 | 0 | WriteIPDLParam(msg__, this, aXSocketFd); |
111 | 0 | // Sentinel = 'aXSocketFd' |
112 | 0 | (msg__)->WriteSentinel(1448798316); |
113 | 0 |
|
114 | 0 |
|
115 | 0 |
|
116 | 0 |
|
117 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
118 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
119 | 0 | } |
120 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_BackUpXResources", OTHER); |
121 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
122 | 0 | mozilla::ipc::LogicError("Transition error"); |
123 | 0 | } |
124 | 0 |
|
125 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
126 | 0 | return sendok__; |
127 | 0 | } |
128 | | |
129 | | auto PPluginModuleChild::CallProcessSomeEvents() -> bool |
130 | 0 | { |
131 | 0 | IPC::Message* msg__ = PPluginModule::Msg_ProcessSomeEvents(MSG_ROUTING_CONTROL); |
132 | 0 |
|
133 | 0 |
|
134 | 0 |
|
135 | 0 |
|
136 | 0 | Message reply__; |
137 | 0 |
|
138 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
139 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
140 | 0 | } |
141 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_ProcessSomeEvents", OTHER); |
142 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
143 | 0 | mozilla::ipc::LogicError("Transition error"); |
144 | 0 | } |
145 | 0 |
|
146 | 0 | bool sendok__; |
147 | 0 | { |
148 | 0 | AUTO_PROFILER_TRACING("IPC", "PPluginModule::Msg_ProcessSomeEvents"); |
149 | 0 | sendok__ = (GetIPCChannel())->Call(msg__, (&(reply__))); |
150 | 0 | } |
151 | 0 | if ((!(sendok__))) { |
152 | 0 | return false; |
153 | 0 | } |
154 | 0 | |
155 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
156 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
157 | 0 | } |
158 | 0 |
|
159 | 0 | return true; |
160 | 0 | } |
161 | | |
162 | | auto PPluginModuleChild::SendPluginShowWindow( |
163 | | const uint32_t& aWindowId, |
164 | | const bool& aModal, |
165 | | const int32_t& aX, |
166 | | const int32_t& aY, |
167 | | const size_t& aWidth, |
168 | | const size_t& aHeight) -> bool |
169 | 0 | { |
170 | 0 | IPC::Message* msg__ = PPluginModule::Msg_PluginShowWindow(MSG_ROUTING_CONTROL); |
171 | 0 |
|
172 | 0 | WriteIPDLParam(msg__, this, aWindowId); |
173 | 0 | // Sentinel = 'aWindowId' |
174 | 0 | (msg__)->WriteSentinel(3844940347); |
175 | 0 | WriteIPDLParam(msg__, this, aModal); |
176 | 0 | // Sentinel = 'aModal' |
177 | 0 | (msg__)->WriteSentinel(1748782442); |
178 | 0 | WriteIPDLParam(msg__, this, aX); |
179 | 0 | // Sentinel = 'aX' |
180 | 0 | (msg__)->WriteSentinel(2745208761); |
181 | 0 | WriteIPDLParam(msg__, this, aY); |
182 | 0 | // Sentinel = 'aY' |
183 | 0 | (msg__)->WriteSentinel(2745208760); |
184 | 0 | WriteIPDLParam(msg__, this, aWidth); |
185 | 0 | // Sentinel = 'aWidth' |
186 | 0 | (msg__)->WriteSentinel(196646625); |
187 | 0 | WriteIPDLParam(msg__, this, aHeight); |
188 | 0 | // Sentinel = 'aHeight' |
189 | 0 | (msg__)->WriteSentinel(3588433859); |
190 | 0 |
|
191 | 0 |
|
192 | 0 |
|
193 | 0 |
|
194 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
195 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
196 | 0 | } |
197 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_PluginShowWindow", OTHER); |
198 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
199 | 0 | mozilla::ipc::LogicError("Transition error"); |
200 | 0 | } |
201 | 0 |
|
202 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
203 | 0 | return sendok__; |
204 | 0 | } |
205 | | |
206 | | auto PPluginModuleChild::SendPluginHideWindow(const uint32_t& aWindowId) -> bool |
207 | 0 | { |
208 | 0 | IPC::Message* msg__ = PPluginModule::Msg_PluginHideWindow(MSG_ROUTING_CONTROL); |
209 | 0 |
|
210 | 0 | WriteIPDLParam(msg__, this, aWindowId); |
211 | 0 | // Sentinel = 'aWindowId' |
212 | 0 | (msg__)->WriteSentinel(3844940347); |
213 | 0 |
|
214 | 0 |
|
215 | 0 |
|
216 | 0 |
|
217 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
218 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
219 | 0 | } |
220 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_PluginHideWindow", OTHER); |
221 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
222 | 0 | mozilla::ipc::LogicError("Transition error"); |
223 | 0 | } |
224 | 0 |
|
225 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
226 | 0 | return sendok__; |
227 | 0 | } |
228 | | |
229 | | auto PPluginModuleChild::SendSetCursor(const NSCursorInfo& cursorInfo) -> bool |
230 | 0 | { |
231 | 0 | IPC::Message* msg__ = PPluginModule::Msg_SetCursor(MSG_ROUTING_CONTROL); |
232 | 0 |
|
233 | 0 | WriteIPDLParam(msg__, this, cursorInfo); |
234 | 0 | // Sentinel = 'cursorInfo' |
235 | 0 | (msg__)->WriteSentinel(351096996); |
236 | 0 |
|
237 | 0 |
|
238 | 0 |
|
239 | 0 |
|
240 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
241 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
242 | 0 | } |
243 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_SetCursor", OTHER); |
244 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
245 | 0 | mozilla::ipc::LogicError("Transition error"); |
246 | 0 | } |
247 | 0 |
|
248 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
249 | 0 | return sendok__; |
250 | 0 | } |
251 | | |
252 | | auto PPluginModuleChild::SendShowCursor(const bool& show) -> bool |
253 | 0 | { |
254 | 0 | IPC::Message* msg__ = PPluginModule::Msg_ShowCursor(MSG_ROUTING_CONTROL); |
255 | 0 |
|
256 | 0 | WriteIPDLParam(msg__, this, show); |
257 | 0 | // Sentinel = 'show' |
258 | 0 | (msg__)->WriteSentinel(352668679); |
259 | 0 |
|
260 | 0 |
|
261 | 0 |
|
262 | 0 |
|
263 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
264 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
265 | 0 | } |
266 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_ShowCursor", OTHER); |
267 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
268 | 0 | mozilla::ipc::LogicError("Transition error"); |
269 | 0 | } |
270 | 0 |
|
271 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
272 | 0 | return sendok__; |
273 | 0 | } |
274 | | |
275 | | auto PPluginModuleChild::SendPushCursor(const NSCursorInfo& cursorInfo) -> bool |
276 | 0 | { |
277 | 0 | IPC::Message* msg__ = PPluginModule::Msg_PushCursor(MSG_ROUTING_CONTROL); |
278 | 0 |
|
279 | 0 | WriteIPDLParam(msg__, this, cursorInfo); |
280 | 0 | // Sentinel = 'cursorInfo' |
281 | 0 | (msg__)->WriteSentinel(351096996); |
282 | 0 |
|
283 | 0 |
|
284 | 0 |
|
285 | 0 |
|
286 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
287 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
288 | 0 | } |
289 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_PushCursor", OTHER); |
290 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
291 | 0 | mozilla::ipc::LogicError("Transition error"); |
292 | 0 | } |
293 | 0 |
|
294 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
295 | 0 | return sendok__; |
296 | 0 | } |
297 | | |
298 | | auto PPluginModuleChild::SendPopCursor() -> bool |
299 | 0 | { |
300 | 0 | IPC::Message* msg__ = PPluginModule::Msg_PopCursor(MSG_ROUTING_CONTROL); |
301 | 0 |
|
302 | 0 |
|
303 | 0 |
|
304 | 0 |
|
305 | 0 |
|
306 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
307 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
308 | 0 | } |
309 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_PopCursor", OTHER); |
310 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
311 | 0 | mozilla::ipc::LogicError("Transition error"); |
312 | 0 | } |
313 | 0 |
|
314 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
315 | 0 | return sendok__; |
316 | 0 | } |
317 | | |
318 | | auto PPluginModuleChild::SendNPN_SetException(const nsCString& message) -> bool |
319 | 0 | { |
320 | 0 | IPC::Message* msg__ = PPluginModule::Msg_NPN_SetException(MSG_ROUTING_CONTROL); |
321 | 0 |
|
322 | 0 | WriteIPDLParam(msg__, this, message); |
323 | 0 | // Sentinel = 'message' |
324 | 0 | (msg__)->WriteSentinel(1366108954); |
325 | 0 |
|
326 | 0 |
|
327 | 0 |
|
328 | 0 | Message reply__; |
329 | 0 |
|
330 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
331 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
332 | 0 | } |
333 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_NPN_SetException", OTHER); |
334 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
335 | 0 | mozilla::ipc::LogicError("Transition error"); |
336 | 0 | } |
337 | 0 |
|
338 | 0 | bool sendok__; |
339 | 0 | { |
340 | 0 | AUTO_PROFILER_TRACING("IPC", "PPluginModule::Msg_NPN_SetException"); |
341 | 0 | sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__))); |
342 | 0 | } |
343 | 0 | if ((!(sendok__))) { |
344 | 0 | return false; |
345 | 0 | } |
346 | 0 | |
347 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
348 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
349 | 0 | } |
350 | 0 |
|
351 | 0 | return true; |
352 | 0 | } |
353 | | |
354 | | auto PPluginModuleChild::SendNPN_ReloadPlugins(const bool& aReloadPages) -> bool |
355 | 0 | { |
356 | 0 | IPC::Message* msg__ = PPluginModule::Msg_NPN_ReloadPlugins(MSG_ROUTING_CONTROL); |
357 | 0 |
|
358 | 0 | WriteIPDLParam(msg__, this, aReloadPages); |
359 | 0 | // Sentinel = 'aReloadPages' |
360 | 0 | (msg__)->WriteSentinel(1141623534); |
361 | 0 |
|
362 | 0 |
|
363 | 0 |
|
364 | 0 |
|
365 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
366 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
367 | 0 | } |
368 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_NPN_ReloadPlugins", OTHER); |
369 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
370 | 0 | mozilla::ipc::LogicError("Transition error"); |
371 | 0 | } |
372 | 0 |
|
373 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
374 | 0 | return sendok__; |
375 | 0 | } |
376 | | |
377 | | auto PPluginModuleChild::SendNotifyContentModuleDestroyed() -> bool |
378 | 0 | { |
379 | 0 | IPC::Message* msg__ = PPluginModule::Msg_NotifyContentModuleDestroyed(MSG_ROUTING_CONTROL); |
380 | 0 |
|
381 | 0 |
|
382 | 0 |
|
383 | 0 |
|
384 | 0 |
|
385 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
386 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
387 | 0 | } |
388 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_NotifyContentModuleDestroyed", OTHER); |
389 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
390 | 0 | mozilla::ipc::LogicError("Transition error"); |
391 | 0 | } |
392 | 0 |
|
393 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
394 | 0 | return sendok__; |
395 | 0 | } |
396 | | |
397 | | auto PPluginModuleChild::SendReturnClearSiteData( |
398 | | const NPError& aRv, |
399 | | const uint64_t& aCallbackId) -> bool |
400 | 0 | { |
401 | 0 | IPC::Message* msg__ = PPluginModule::Msg_ReturnClearSiteData(MSG_ROUTING_CONTROL); |
402 | 0 |
|
403 | 0 | WriteIPDLParam(msg__, this, aRv); |
404 | 0 | // Sentinel = 'aRv' |
405 | 0 | (msg__)->WriteSentinel(2742041894); |
406 | 0 | WriteIPDLParam(msg__, this, aCallbackId); |
407 | 0 | // Sentinel = 'aCallbackId' |
408 | 0 | (msg__)->WriteSentinel(1362998144); |
409 | 0 |
|
410 | 0 |
|
411 | 0 |
|
412 | 0 |
|
413 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
414 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
415 | 0 | } |
416 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_ReturnClearSiteData", OTHER); |
417 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
418 | 0 | mozilla::ipc::LogicError("Transition error"); |
419 | 0 | } |
420 | 0 |
|
421 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
422 | 0 | return sendok__; |
423 | 0 | } |
424 | | |
425 | | auto PPluginModuleChild::SendReturnSitesWithData( |
426 | | const nsTArray<nsCString>& aSites, |
427 | | const uint64_t& aCallbackId) -> bool |
428 | 0 | { |
429 | 0 | IPC::Message* msg__ = PPluginModule::Msg_ReturnSitesWithData(MSG_ROUTING_CONTROL); |
430 | 0 |
|
431 | 0 | WriteIPDLParam(msg__, this, aSites); |
432 | 0 | // Sentinel = 'aSites' |
433 | 0 | (msg__)->WriteSentinel(2169354461); |
434 | 0 | WriteIPDLParam(msg__, this, aCallbackId); |
435 | 0 | // Sentinel = 'aCallbackId' |
436 | 0 | (msg__)->WriteSentinel(1362998144); |
437 | 0 |
|
438 | 0 |
|
439 | 0 |
|
440 | 0 |
|
441 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
442 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
443 | 0 | } |
444 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_ReturnSitesWithData", OTHER); |
445 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
446 | 0 | mozilla::ipc::LogicError("Transition error"); |
447 | 0 | } |
448 | 0 |
|
449 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
450 | 0 | return sendok__; |
451 | 0 | } |
452 | | |
453 | | auto PPluginModuleChild::CallNPN_SetValue_NPPVpluginRequiresAudioDeviceChanges( |
454 | | const bool& shouldRegister, |
455 | | NPError* result) -> bool |
456 | 0 | { |
457 | 0 | IPC::Message* msg__ = PPluginModule::Msg_NPN_SetValue_NPPVpluginRequiresAudioDeviceChanges(MSG_ROUTING_CONTROL); |
458 | 0 |
|
459 | 0 | WriteIPDLParam(msg__, this, shouldRegister); |
460 | 0 | // Sentinel = 'shouldRegister' |
461 | 0 | (msg__)->WriteSentinel(397502372); |
462 | 0 |
|
463 | 0 |
|
464 | 0 |
|
465 | 0 | Message reply__; |
466 | 0 |
|
467 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
468 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
469 | 0 | } |
470 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_NPN_SetValue_NPPVpluginRequiresAudioDeviceChanges", OTHER); |
471 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
472 | 0 | mozilla::ipc::LogicError("Transition error"); |
473 | 0 | } |
474 | 0 |
|
475 | 0 | bool sendok__; |
476 | 0 | { |
477 | 0 | AUTO_PROFILER_TRACING("IPC", "PPluginModule::Msg_NPN_SetValue_NPPVpluginRequiresAudioDeviceChanges"); |
478 | 0 | sendok__ = (GetIPCChannel())->Call(msg__, (&(reply__))); |
479 | 0 | } |
480 | 0 | if ((!(sendok__))) { |
481 | 0 | return false; |
482 | 0 | } |
483 | 0 | |
484 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
485 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
486 | 0 | } |
487 | 0 |
|
488 | 0 | PickleIterator iter__(reply__); |
489 | 0 |
|
490 | 0 | if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, result)))) { |
491 | 0 | FatalError("Error deserializing 'NPError'"); |
492 | 0 | return false; |
493 | 0 | } |
494 | 0 | // Sentinel = 'result' |
495 | 0 | if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3991766165)))) { |
496 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'NPError'"); |
497 | 0 | return false; |
498 | 0 | } |
499 | 0 | (reply__).EndRead(iter__, (reply__).type()); |
500 | 0 |
|
501 | 0 | return true; |
502 | 0 | } |
503 | | |
504 | | auto PPluginModuleChild::RemoveManagee( |
505 | | int32_t aProtocolId, |
506 | | IProtocol* aListener) -> void |
507 | 0 | { |
508 | 0 | switch (aProtocolId) { |
509 | 0 | case PPluginInstanceMsgStart: |
510 | 0 | { |
511 | 0 | PPluginInstanceChild* actor = static_cast<PPluginInstanceChild*>(aListener); |
512 | 0 | auto& container = mManagedPPluginInstanceChild; |
513 | 0 | MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!"); |
514 | 0 |
|
515 | 0 | (container).RemoveEntry(actor); |
516 | 0 | DeallocPPluginInstanceChild(actor); |
517 | 0 | return; |
518 | 0 | } |
519 | 0 | default: |
520 | 0 | { |
521 | 0 | FatalError("unreached"); |
522 | 0 | return; |
523 | 0 | } |
524 | 0 | } |
525 | 0 | } |
526 | | |
527 | | auto PPluginModuleChild::OnMessageReceived(const Message& msg__) -> PPluginModuleChild::Result |
528 | 0 | { |
529 | 0 | int32_t route__ = (msg__).routing_id(); |
530 | 0 | if ((MSG_ROUTING_CONTROL) != (route__)) { |
531 | 0 | IProtocol* routed__ = Lookup(route__); |
532 | 0 | if ((!(routed__))) { |
533 | 0 | return MsgRouteError; |
534 | 0 | } |
535 | 0 | return (routed__)->OnMessageReceived(msg__); |
536 | 0 | } |
537 | 0 | |
538 | 0 | switch ((msg__).type()) { |
539 | 0 | case PPluginModule::Msg_ProcessNativeEventsInInterruptCall__ID: |
540 | 0 | { |
541 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
542 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
543 | 0 | } |
544 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_ProcessNativeEventsInInterruptCall", OTHER); |
545 | 0 |
|
546 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
547 | 0 | FatalError("Transition error"); |
548 | 0 | return MsgValueError; |
549 | 0 | } |
550 | 0 | if ((!(RecvProcessNativeEventsInInterruptCall()))) { |
551 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
552 | 0 | // Error handled in mozilla::ipc::IPCResult |
553 | 0 | return MsgProcessingError; |
554 | 0 | } |
555 | 0 | |
556 | 0 | return MsgProcessed; |
557 | 0 | } |
558 | 0 | case PPluginModule::Msg_InitProfiler__ID: |
559 | 0 | { |
560 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
561 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
562 | 0 | } |
563 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_InitProfiler", OTHER); |
564 | 0 |
|
565 | 0 | PickleIterator iter__(msg__); |
566 | 0 | Endpoint<mozilla::PProfilerChild> aEndPoint; |
567 | 0 |
|
568 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aEndPoint)))))) { |
569 | 0 | FatalError("Error deserializing 'Endpoint<mozilla::PProfilerChild>'"); |
570 | 0 | return MsgValueError; |
571 | 0 | } |
572 | 0 | // Sentinel = 'aEndPoint' |
573 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1022620923)))) { |
574 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::PProfilerChild>'"); |
575 | 0 | return MsgValueError; |
576 | 0 | } |
577 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
578 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
579 | 0 | FatalError("Transition error"); |
580 | 0 | return MsgValueError; |
581 | 0 | } |
582 | 0 | if ((!(RecvInitProfiler(std::move(aEndPoint))))) { |
583 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
584 | 0 | // Error handled in mozilla::ipc::IPCResult |
585 | 0 | return MsgProcessingError; |
586 | 0 | } |
587 | 0 | |
588 | 0 | return MsgProcessed; |
589 | 0 | } |
590 | 0 | case PPluginModule::Msg_DisableFlashProtectedMode__ID: |
591 | 0 | { |
592 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
593 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
594 | 0 | } |
595 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_DisableFlashProtectedMode", OTHER); |
596 | 0 |
|
597 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
598 | 0 | FatalError("Transition error"); |
599 | 0 | return MsgValueError; |
600 | 0 | } |
601 | 0 | if ((!(RecvDisableFlashProtectedMode()))) { |
602 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
603 | 0 | // Error handled in mozilla::ipc::IPCResult |
604 | 0 | return MsgProcessingError; |
605 | 0 | } |
606 | 0 | |
607 | 0 | return MsgProcessed; |
608 | 0 | } |
609 | 0 | case PPluginModule::Msg_PPluginInstanceConstructor__ID: |
610 | 0 | { |
611 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
612 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
613 | 0 | } |
614 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_PPluginInstanceConstructor", OTHER); |
615 | 0 |
|
616 | 0 | PickleIterator iter__(msg__); |
617 | 0 | ActorHandle handle__; |
618 | 0 | PPluginInstanceChild* actor; |
619 | 0 | nsCString aMimeType; |
620 | 0 | nsTArray<nsCString> aNames; |
621 | 0 | nsTArray<nsCString> aValues; |
622 | 0 |
|
623 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(handle__)))))) { |
624 | 0 | FatalError("Error deserializing 'ActorHandle'"); |
625 | 0 | return MsgValueError; |
626 | 0 | } |
627 | 0 | // Sentinel = 'actor' |
628 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
629 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'"); |
630 | 0 | return MsgValueError; |
631 | 0 | } |
632 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aMimeType)))))) { |
633 | 0 | FatalError("Error deserializing 'nsCString'"); |
634 | 0 | return MsgValueError; |
635 | 0 | } |
636 | 0 | // Sentinel = 'aMimeType' |
637 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 698220456)))) { |
638 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
639 | 0 | return MsgValueError; |
640 | 0 | } |
641 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aNames)))))) { |
642 | 0 | FatalError("Error deserializing 'nsTArray'"); |
643 | 0 | return MsgValueError; |
644 | 0 | } |
645 | 0 | // Sentinel = 'aNames' |
646 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1643765405)))) { |
647 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'"); |
648 | 0 | return MsgValueError; |
649 | 0 | } |
650 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aValues)))))) { |
651 | 0 | FatalError("Error deserializing 'nsTArray'"); |
652 | 0 | return MsgValueError; |
653 | 0 | } |
654 | 0 | // Sentinel = 'aValues' |
655 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 223787060)))) { |
656 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'"); |
657 | 0 | return MsgValueError; |
658 | 0 | } |
659 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
660 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
661 | 0 | FatalError("Transition error"); |
662 | 0 | return MsgValueError; |
663 | 0 | } |
664 | 0 | actor = AllocPPluginInstanceChild(aMimeType, aNames, aValues); |
665 | 0 | if ((!(actor))) { |
666 | 0 | NS_WARNING("Error constructing actor PPluginInstanceChild"); |
667 | 0 | return MsgValueError; |
668 | 0 | } |
669 | 0 | (actor)->SetManagerAndRegister(this, (handle__).mId); |
670 | 0 | (mManagedPPluginInstanceChild).PutEntry(actor); |
671 | 0 | (actor)->mLivenessState = mozilla::ipc::ReEntrantDeleteLivenessState::Start; |
672 | 0 |
|
673 | 0 | if ((!(RecvPPluginInstanceConstructor(actor, aMimeType, std::move(aNames), std::move(aValues))))) { |
674 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
675 | 0 | // Error handled in mozilla::ipc::IPCResult |
676 | 0 | return MsgProcessingError; |
677 | 0 | } |
678 | 0 | |
679 | 0 | return MsgProcessed; |
680 | 0 | } |
681 | 0 | case PPluginModule::Msg_NPP_ClearSiteData__ID: |
682 | 0 | { |
683 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
684 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
685 | 0 | } |
686 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_NPP_ClearSiteData", OTHER); |
687 | 0 |
|
688 | 0 | PickleIterator iter__(msg__); |
689 | 0 | nsCString site; |
690 | 0 | uint64_t flags; |
691 | 0 | uint64_t maxAge; |
692 | 0 | uint64_t aCallbackId; |
693 | 0 |
|
694 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(site)))))) { |
695 | 0 | FatalError("Error deserializing 'nsCString'"); |
696 | 0 | return MsgValueError; |
697 | 0 | } |
698 | 0 | // Sentinel = 'site' |
699 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 925048205)))) { |
700 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
701 | 0 | return MsgValueError; |
702 | 0 | } |
703 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(flags)))))) { |
704 | 0 | FatalError("Error deserializing 'uint64_t'"); |
705 | 0 | return MsgValueError; |
706 | 0 | } |
707 | 0 | // Sentinel = 'flags' |
708 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2550519284)))) { |
709 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'"); |
710 | 0 | return MsgValueError; |
711 | 0 | } |
712 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(maxAge)))))) { |
713 | 0 | FatalError("Error deserializing 'uint64_t'"); |
714 | 0 | return MsgValueError; |
715 | 0 | } |
716 | 0 | // Sentinel = 'maxAge' |
717 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4136822029)))) { |
718 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'"); |
719 | 0 | return MsgValueError; |
720 | 0 | } |
721 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aCallbackId)))))) { |
722 | 0 | FatalError("Error deserializing 'uint64_t'"); |
723 | 0 | return MsgValueError; |
724 | 0 | } |
725 | 0 | // Sentinel = 'aCallbackId' |
726 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1362998144)))) { |
727 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'"); |
728 | 0 | return MsgValueError; |
729 | 0 | } |
730 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
731 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
732 | 0 | FatalError("Transition error"); |
733 | 0 | return MsgValueError; |
734 | 0 | } |
735 | 0 | if ((!(RecvNPP_ClearSiteData(site, flags, maxAge, aCallbackId)))) { |
736 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
737 | 0 | // Error handled in mozilla::ipc::IPCResult |
738 | 0 | return MsgProcessingError; |
739 | 0 | } |
740 | 0 | |
741 | 0 | return MsgProcessed; |
742 | 0 | } |
743 | 0 | case PPluginModule::Msg_NPP_GetSitesWithData__ID: |
744 | 0 | { |
745 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
746 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
747 | 0 | } |
748 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_NPP_GetSitesWithData", OTHER); |
749 | 0 |
|
750 | 0 | PickleIterator iter__(msg__); |
751 | 0 | uint64_t aCallbackId; |
752 | 0 |
|
753 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aCallbackId)))))) { |
754 | 0 | FatalError("Error deserializing 'uint64_t'"); |
755 | 0 | return MsgValueError; |
756 | 0 | } |
757 | 0 | // Sentinel = 'aCallbackId' |
758 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1362998144)))) { |
759 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'"); |
760 | 0 | return MsgValueError; |
761 | 0 | } |
762 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
763 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
764 | 0 | FatalError("Transition error"); |
765 | 0 | return MsgValueError; |
766 | 0 | } |
767 | 0 | if ((!(RecvNPP_GetSitesWithData(aCallbackId)))) { |
768 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
769 | 0 | // Error handled in mozilla::ipc::IPCResult |
770 | 0 | return MsgProcessingError; |
771 | 0 | } |
772 | 0 | |
773 | 0 | return MsgProcessed; |
774 | 0 | } |
775 | 0 | case PPluginModule::Msg_SetAudioSessionData__ID: |
776 | 0 | { |
777 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
778 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
779 | 0 | } |
780 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_SetAudioSessionData", OTHER); |
781 | 0 |
|
782 | 0 | PickleIterator iter__(msg__); |
783 | 0 | nsID aID; |
784 | 0 | nsString aDisplayName; |
785 | 0 | nsString aIconPath; |
786 | 0 |
|
787 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aID)))))) { |
788 | 0 | FatalError("Error deserializing 'nsID'"); |
789 | 0 | return MsgValueError; |
790 | 0 | } |
791 | 0 | // Sentinel = 'aID' |
792 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2735041849)))) { |
793 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsID'"); |
794 | 0 | return MsgValueError; |
795 | 0 | } |
796 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aDisplayName)))))) { |
797 | 0 | FatalError("Error deserializing 'nsString'"); |
798 | 0 | return MsgValueError; |
799 | 0 | } |
800 | 0 | // Sentinel = 'aDisplayName' |
801 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 531102644)))) { |
802 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsString'"); |
803 | 0 | return MsgValueError; |
804 | 0 | } |
805 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aIconPath)))))) { |
806 | 0 | FatalError("Error deserializing 'nsString'"); |
807 | 0 | return MsgValueError; |
808 | 0 | } |
809 | 0 | // Sentinel = 'aIconPath' |
810 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2359874914)))) { |
811 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsString'"); |
812 | 0 | return MsgValueError; |
813 | 0 | } |
814 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
815 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
816 | 0 | FatalError("Transition error"); |
817 | 0 | return MsgValueError; |
818 | 0 | } |
819 | 0 | if ((!(RecvSetAudioSessionData(aID, aDisplayName, aIconPath)))) { |
820 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
821 | 0 | // Error handled in mozilla::ipc::IPCResult |
822 | 0 | return MsgProcessingError; |
823 | 0 | } |
824 | 0 | |
825 | 0 | return MsgProcessed; |
826 | 0 | } |
827 | 0 | case PPluginModule::Msg_SetParentHangTimeout__ID: |
828 | 0 | { |
829 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
830 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
831 | 0 | } |
832 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_SetParentHangTimeout", OTHER); |
833 | 0 |
|
834 | 0 | PickleIterator iter__(msg__); |
835 | 0 | uint32_t seconds; |
836 | 0 |
|
837 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(seconds)))))) { |
838 | 0 | FatalError("Error deserializing 'uint32_t'"); |
839 | 0 | return MsgValueError; |
840 | 0 | } |
841 | 0 | // Sentinel = 'seconds' |
842 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3246051016)))) { |
843 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'"); |
844 | 0 | return MsgValueError; |
845 | 0 | } |
846 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
847 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
848 | 0 | FatalError("Transition error"); |
849 | 0 | return MsgValueError; |
850 | 0 | } |
851 | 0 | if ((!(RecvSetParentHangTimeout(seconds)))) { |
852 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
853 | 0 | // Error handled in mozilla::ipc::IPCResult |
854 | 0 | return MsgProcessingError; |
855 | 0 | } |
856 | 0 | |
857 | 0 | return MsgProcessed; |
858 | 0 | } |
859 | 0 | case PPluginModule::Msg_SettingChanged__ID: |
860 | 0 | { |
861 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
862 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
863 | 0 | } |
864 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_SettingChanged", OTHER); |
865 | 0 |
|
866 | 0 | PickleIterator iter__(msg__); |
867 | 0 | PluginSettings settings; |
868 | 0 |
|
869 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(settings)))))) { |
870 | 0 | FatalError("Error deserializing 'PluginSettings'"); |
871 | 0 | return MsgValueError; |
872 | 0 | } |
873 | 0 | // Sentinel = 'settings' |
874 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2402913383)))) { |
875 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PluginSettings'"); |
876 | 0 | return MsgValueError; |
877 | 0 | } |
878 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
879 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
880 | 0 | FatalError("Transition error"); |
881 | 0 | return MsgValueError; |
882 | 0 | } |
883 | 0 | if ((!(RecvSettingChanged(settings)))) { |
884 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
885 | 0 | // Error handled in mozilla::ipc::IPCResult |
886 | 0 | return MsgProcessingError; |
887 | 0 | } |
888 | 0 | |
889 | 0 | return MsgProcessed; |
890 | 0 | } |
891 | 0 | case PPluginModule::Msg_NPP_SetValue_NPNVaudioDeviceChangeDetails__ID: |
892 | 0 | { |
893 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
894 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
895 | 0 | } |
896 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_NPP_SetValue_NPNVaudioDeviceChangeDetails", OTHER); |
897 | 0 |
|
898 | 0 | PickleIterator iter__(msg__); |
899 | 0 | NPAudioDeviceChangeDetailsIPC changeDetails; |
900 | 0 |
|
901 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(changeDetails)))))) { |
902 | 0 | FatalError("Error deserializing 'NPAudioDeviceChangeDetailsIPC'"); |
903 | 0 | return MsgValueError; |
904 | 0 | } |
905 | 0 | // Sentinel = 'changeDetails' |
906 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 331935927)))) { |
907 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'NPAudioDeviceChangeDetailsIPC'"); |
908 | 0 | return MsgValueError; |
909 | 0 | } |
910 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
911 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
912 | 0 | FatalError("Transition error"); |
913 | 0 | return MsgValueError; |
914 | 0 | } |
915 | 0 | if ((!(RecvNPP_SetValue_NPNVaudioDeviceChangeDetails(changeDetails)))) { |
916 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
917 | 0 | // Error handled in mozilla::ipc::IPCResult |
918 | 0 | return MsgProcessingError; |
919 | 0 | } |
920 | 0 | |
921 | 0 | return MsgProcessed; |
922 | 0 | } |
923 | 0 | case PPluginModule::Msg_NPP_SetValue_NPNVaudioDeviceStateChanged__ID: |
924 | 0 | { |
925 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
926 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
927 | 0 | } |
928 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_NPP_SetValue_NPNVaudioDeviceStateChanged", OTHER); |
929 | 0 |
|
930 | 0 | PickleIterator iter__(msg__); |
931 | 0 | NPAudioDeviceStateChangedIPC deviceState; |
932 | 0 |
|
933 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(deviceState)))))) { |
934 | 0 | FatalError("Error deserializing 'NPAudioDeviceStateChangedIPC'"); |
935 | 0 | return MsgValueError; |
936 | 0 | } |
937 | 0 | // Sentinel = 'deviceState' |
938 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 238582270)))) { |
939 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'NPAudioDeviceStateChangedIPC'"); |
940 | 0 | return MsgValueError; |
941 | 0 | } |
942 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
943 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
944 | 0 | FatalError("Transition error"); |
945 | 0 | return MsgValueError; |
946 | 0 | } |
947 | 0 | if ((!(RecvNPP_SetValue_NPNVaudioDeviceStateChanged(deviceState)))) { |
948 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
949 | 0 | // Error handled in mozilla::ipc::IPCResult |
950 | 0 | return MsgProcessingError; |
951 | 0 | } |
952 | 0 | |
953 | 0 | return MsgProcessed; |
954 | 0 | } |
955 | 0 | case PPluginModule::Msg_InitPluginModuleChild__ID: |
956 | 0 | { |
957 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
958 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
959 | 0 | } |
960 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_InitPluginModuleChild", OTHER); |
961 | 0 |
|
962 | 0 | PickleIterator iter__(msg__); |
963 | 0 | Endpoint<mozilla::plugins::PPluginModuleChild> endpoint; |
964 | 0 |
|
965 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(endpoint)))))) { |
966 | 0 | FatalError("Error deserializing 'Endpoint<mozilla::plugins::PPluginModuleChild>'"); |
967 | 0 | return MsgValueError; |
968 | 0 | } |
969 | 0 | // Sentinel = 'endpoint' |
970 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3610972515)))) { |
971 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::plugins::PPluginModuleChild>'"); |
972 | 0 | return MsgValueError; |
973 | 0 | } |
974 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
975 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
976 | 0 | FatalError("Transition error"); |
977 | 0 | return MsgValueError; |
978 | 0 | } |
979 | 0 | if ((!(RecvInitPluginModuleChild(std::move(endpoint))))) { |
980 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
981 | 0 | // Error handled in mozilla::ipc::IPCResult |
982 | 0 | return MsgProcessingError; |
983 | 0 | } |
984 | 0 | |
985 | 0 | return MsgProcessed; |
986 | 0 | } |
987 | 0 | case PPluginModule::Msg_InitPluginFunctionBroker__ID: |
988 | 0 | { |
989 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
990 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
991 | 0 | } |
992 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_InitPluginFunctionBroker", OTHER); |
993 | 0 |
|
994 | 0 | PickleIterator iter__(msg__); |
995 | 0 | Endpoint<mozilla::plugins::PFunctionBrokerChild> endpoint; |
996 | 0 |
|
997 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(endpoint)))))) { |
998 | 0 | FatalError("Error deserializing 'Endpoint<mozilla::plugins::PFunctionBrokerChild>'"); |
999 | 0 | return MsgValueError; |
1000 | 0 | } |
1001 | 0 | // Sentinel = 'endpoint' |
1002 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3610972515)))) { |
1003 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::plugins::PFunctionBrokerChild>'"); |
1004 | 0 | return MsgValueError; |
1005 | 0 | } |
1006 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1007 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1008 | 0 | FatalError("Transition error"); |
1009 | 0 | return MsgValueError; |
1010 | 0 | } |
1011 | 0 | if ((!(RecvInitPluginFunctionBroker(std::move(endpoint))))) { |
1012 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1013 | 0 | // Error handled in mozilla::ipc::IPCResult |
1014 | 0 | return MsgProcessingError; |
1015 | 0 | } |
1016 | 0 | |
1017 | 0 | return MsgProcessed; |
1018 | 0 | } |
1019 | 0 | default: |
1020 | 0 | { |
1021 | 0 | return MsgNotKnown; |
1022 | 0 | } |
1023 | 0 | case SHMEM_CREATED_MESSAGE_TYPE: |
1024 | 0 | { |
1025 | 0 | if ((!(ShmemCreated(msg__)))) { |
1026 | 0 | return MsgPayloadError; |
1027 | 0 | } |
1028 | 0 | return MsgProcessed; |
1029 | 0 | } |
1030 | 0 | case SHMEM_DESTROYED_MESSAGE_TYPE: |
1031 | 0 | { |
1032 | 0 | if ((!(ShmemDestroyed(msg__)))) { |
1033 | 0 | return MsgPayloadError; |
1034 | 0 | } |
1035 | 0 | return MsgProcessed; |
1036 | 0 | } |
1037 | 0 | } |
1038 | 0 | } |
1039 | | |
1040 | | auto PPluginModuleChild::OnMessageReceived( |
1041 | | const Message& msg__, |
1042 | | Message*& reply__) -> PPluginModuleChild::Result |
1043 | 0 | { |
1044 | 0 | int32_t route__ = (msg__).routing_id(); |
1045 | 0 | if ((MSG_ROUTING_CONTROL) != (route__)) { |
1046 | 0 | IProtocol* routed__ = Lookup(route__); |
1047 | 0 | if ((!(routed__))) { |
1048 | 0 | return MsgRouteError; |
1049 | 0 | } |
1050 | 0 | return (routed__)->OnMessageReceived(msg__, reply__); |
1051 | 0 | } |
1052 | 0 | |
1053 | 0 | return MsgNotKnown; |
1054 | 0 | } |
1055 | | |
1056 | | auto PPluginModuleChild::OnCallReceived( |
1057 | | const Message& msg__, |
1058 | | Message*& reply__) -> PPluginModuleChild::Result |
1059 | 0 | { |
1060 | 0 | int32_t route__ = (msg__).routing_id(); |
1061 | 0 | if ((MSG_ROUTING_CONTROL) != (route__)) { |
1062 | 0 | IProtocol* routed__ = Lookup(route__); |
1063 | 0 | if ((!(routed__))) { |
1064 | 0 | return MsgRouteError; |
1065 | 0 | } |
1066 | 0 | return (routed__)->OnCallReceived(msg__, reply__); |
1067 | 0 | } |
1068 | 0 | |
1069 | 0 | switch ((msg__).type()) { |
1070 | 0 | case PPluginModule::Msg_ModuleSupportsAsyncRender__ID: |
1071 | 0 | { |
1072 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
1073 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1074 | 0 | } |
1075 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_ModuleSupportsAsyncRender", OTHER); |
1076 | 0 |
|
1077 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1078 | 0 | FatalError("Transition error"); |
1079 | 0 | return MsgValueError; |
1080 | 0 | } |
1081 | 0 | int32_t id__ = MSG_ROUTING_CONTROL; |
1082 | 0 | bool result; |
1083 | 0 | if ((!(AnswerModuleSupportsAsyncRender((&(result)))))) { |
1084 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1085 | 0 | // Error handled in mozilla::ipc::IPCResult |
1086 | 0 | return MsgProcessingError; |
1087 | 0 | } |
1088 | 0 | |
1089 | 0 | reply__ = PPluginModule::Reply_ModuleSupportsAsyncRender(id__); |
1090 | 0 |
|
1091 | 0 | WriteIPDLParam(reply__, this, result); |
1092 | 0 | // Sentinel = 'result' |
1093 | 0 | (reply__)->WriteSentinel(3991766165); |
1094 | 0 |
|
1095 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
1096 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1097 | 0 | } |
1098 | 0 | return MsgProcessed; |
1099 | 0 | } |
1100 | 0 | case PPluginModule::Msg_NP_GetEntryPoints__ID: |
1101 | 0 | { |
1102 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
1103 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1104 | 0 | } |
1105 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_NP_GetEntryPoints", OTHER); |
1106 | 0 |
|
1107 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1108 | 0 | FatalError("Transition error"); |
1109 | 0 | return MsgValueError; |
1110 | 0 | } |
1111 | 0 | int32_t id__ = MSG_ROUTING_CONTROL; |
1112 | 0 | NPError rv; |
1113 | 0 | if ((!(AnswerNP_GetEntryPoints((&(rv)))))) { |
1114 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1115 | 0 | // Error handled in mozilla::ipc::IPCResult |
1116 | 0 | return MsgProcessingError; |
1117 | 0 | } |
1118 | 0 | |
1119 | 0 | reply__ = PPluginModule::Reply_NP_GetEntryPoints(id__); |
1120 | 0 |
|
1121 | 0 | WriteIPDLParam(reply__, this, rv); |
1122 | 0 | // Sentinel = 'rv' |
1123 | 0 | (reply__)->WriteSentinel(702481058); |
1124 | 0 |
|
1125 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
1126 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1127 | 0 | } |
1128 | 0 | return MsgProcessed; |
1129 | 0 | } |
1130 | 0 | case PPluginModule::Msg_NP_Initialize__ID: |
1131 | 0 | { |
1132 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
1133 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1134 | 0 | } |
1135 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_NP_Initialize", OTHER); |
1136 | 0 |
|
1137 | 0 | PickleIterator iter__(msg__); |
1138 | 0 | PluginSettings settings; |
1139 | 0 |
|
1140 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(settings)))))) { |
1141 | 0 | FatalError("Error deserializing 'PluginSettings'"); |
1142 | 0 | return MsgValueError; |
1143 | 0 | } |
1144 | 0 | // Sentinel = 'settings' |
1145 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2402913383)))) { |
1146 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PluginSettings'"); |
1147 | 0 | return MsgValueError; |
1148 | 0 | } |
1149 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1150 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1151 | 0 | FatalError("Transition error"); |
1152 | 0 | return MsgValueError; |
1153 | 0 | } |
1154 | 0 | int32_t id__ = MSG_ROUTING_CONTROL; |
1155 | 0 | NPError rv; |
1156 | 0 | if ((!(AnswerNP_Initialize(settings, (&(rv)))))) { |
1157 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1158 | 0 | // Error handled in mozilla::ipc::IPCResult |
1159 | 0 | return MsgProcessingError; |
1160 | 0 | } |
1161 | 0 | |
1162 | 0 | reply__ = PPluginModule::Reply_NP_Initialize(id__); |
1163 | 0 |
|
1164 | 0 | WriteIPDLParam(reply__, this, rv); |
1165 | 0 | // Sentinel = 'rv' |
1166 | 0 | (reply__)->WriteSentinel(702481058); |
1167 | 0 |
|
1168 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
1169 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1170 | 0 | } |
1171 | 0 | return MsgProcessed; |
1172 | 0 | } |
1173 | 0 | case PPluginModule::Msg_SyncNPP_New__ID: |
1174 | 0 | { |
1175 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
1176 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1177 | 0 | } |
1178 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_SyncNPP_New", OTHER); |
1179 | 0 |
|
1180 | 0 | PickleIterator iter__(msg__); |
1181 | 0 | PPluginInstanceChild* aActor; |
1182 | 0 |
|
1183 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aActor)))))) { |
1184 | 0 | FatalError("Error deserializing 'PPluginInstanceChild'"); |
1185 | 0 | return MsgValueError; |
1186 | 0 | } |
1187 | 0 | if ((!((*((&(aActor))))))) { |
1188 | 0 | FatalError("Error deserializing 'PPluginInstanceChild'"); |
1189 | 0 | return MsgValueError; |
1190 | 0 | } |
1191 | 0 | // Sentinel = 'aActor' |
1192 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 654298798)))) { |
1193 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PPluginInstanceChild'"); |
1194 | 0 | return MsgValueError; |
1195 | 0 | } |
1196 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1197 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1198 | 0 | FatalError("Transition error"); |
1199 | 0 | return MsgValueError; |
1200 | 0 | } |
1201 | 0 | int32_t id__ = MSG_ROUTING_CONTROL; |
1202 | 0 | NPError rv; |
1203 | 0 | if ((!(AnswerSyncNPP_New(aActor, (&(rv)))))) { |
1204 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1205 | 0 | // Error handled in mozilla::ipc::IPCResult |
1206 | 0 | return MsgProcessingError; |
1207 | 0 | } |
1208 | 0 | |
1209 | 0 | reply__ = PPluginModule::Reply_SyncNPP_New(id__); |
1210 | 0 |
|
1211 | 0 | WriteIPDLParam(reply__, this, rv); |
1212 | 0 | // Sentinel = 'rv' |
1213 | 0 | (reply__)->WriteSentinel(702481058); |
1214 | 0 |
|
1215 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
1216 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1217 | 0 | } |
1218 | 0 | return MsgProcessed; |
1219 | 0 | } |
1220 | 0 | case PPluginModule::Msg_NP_Shutdown__ID: |
1221 | 0 | { |
1222 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
1223 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1224 | 0 | } |
1225 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_NP_Shutdown", OTHER); |
1226 | 0 |
|
1227 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1228 | 0 | FatalError("Transition error"); |
1229 | 0 | return MsgValueError; |
1230 | 0 | } |
1231 | 0 | int32_t id__ = MSG_ROUTING_CONTROL; |
1232 | 0 | NPError rv; |
1233 | 0 | if ((!(AnswerNP_Shutdown((&(rv)))))) { |
1234 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1235 | 0 | // Error handled in mozilla::ipc::IPCResult |
1236 | 0 | return MsgProcessingError; |
1237 | 0 | } |
1238 | 0 | |
1239 | 0 | reply__ = PPluginModule::Reply_NP_Shutdown(id__); |
1240 | 0 |
|
1241 | 0 | WriteIPDLParam(reply__, this, rv); |
1242 | 0 | // Sentinel = 'rv' |
1243 | 0 | (reply__)->WriteSentinel(702481058); |
1244 | 0 |
|
1245 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
1246 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1247 | 0 | } |
1248 | 0 | return MsgProcessed; |
1249 | 0 | } |
1250 | 0 | case PPluginModule::Msg_OptionalFunctionsSupported__ID: |
1251 | 0 | { |
1252 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
1253 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1254 | 0 | } |
1255 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_OptionalFunctionsSupported", OTHER); |
1256 | 0 |
|
1257 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1258 | 0 | FatalError("Transition error"); |
1259 | 0 | return MsgValueError; |
1260 | 0 | } |
1261 | 0 | int32_t id__ = MSG_ROUTING_CONTROL; |
1262 | 0 | bool aURLRedirectNotify; |
1263 | 0 | bool aClearSiteData; |
1264 | 0 | bool aGetSitesWithData; |
1265 | 0 | if ((!(AnswerOptionalFunctionsSupported((&(aURLRedirectNotify)), (&(aClearSiteData)), (&(aGetSitesWithData)))))) { |
1266 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1267 | 0 | // Error handled in mozilla::ipc::IPCResult |
1268 | 0 | return MsgProcessingError; |
1269 | 0 | } |
1270 | 0 | |
1271 | 0 | reply__ = PPluginModule::Reply_OptionalFunctionsSupported(id__); |
1272 | 0 |
|
1273 | 0 | WriteIPDLParam(reply__, this, aURLRedirectNotify); |
1274 | 0 | // Sentinel = 'aURLRedirectNotify' |
1275 | 0 | (reply__)->WriteSentinel(4040347717); |
1276 | 0 | WriteIPDLParam(reply__, this, aClearSiteData); |
1277 | 0 | // Sentinel = 'aClearSiteData' |
1278 | 0 | (reply__)->WriteSentinel(357136587); |
1279 | 0 | WriteIPDLParam(reply__, this, aGetSitesWithData); |
1280 | 0 | // Sentinel = 'aGetSitesWithData' |
1281 | 0 | (reply__)->WriteSentinel(1891549156); |
1282 | 0 |
|
1283 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
1284 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1285 | 0 | } |
1286 | 0 | return MsgProcessed; |
1287 | 0 | } |
1288 | 0 | case PPluginModule::Msg_InitCrashReporter__ID: |
1289 | 0 | { |
1290 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
1291 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
1292 | 0 | } |
1293 | 0 | AUTO_PROFILER_LABEL("PPluginModule::Msg_InitCrashReporter", OTHER); |
1294 | 0 |
|
1295 | 0 | PickleIterator iter__(msg__); |
1296 | 0 | Shmem shmem; |
1297 | 0 |
|
1298 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(shmem)))))) { |
1299 | 0 | FatalError("Error deserializing 'Shmem'"); |
1300 | 0 | return MsgValueError; |
1301 | 0 | } |
1302 | 0 | // Sentinel = 'shmem' |
1303 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4252604405)))) { |
1304 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Shmem'"); |
1305 | 0 | return MsgValueError; |
1306 | 0 | } |
1307 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
1308 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
1309 | 0 | FatalError("Transition error"); |
1310 | 0 | return MsgValueError; |
1311 | 0 | } |
1312 | 0 | int32_t id__ = MSG_ROUTING_CONTROL; |
1313 | 0 | NativeThreadId tid; |
1314 | 0 | if ((!(AnswerInitCrashReporter(std::move(shmem), (&(tid)))))) { |
1315 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
1316 | 0 | // Error handled in mozilla::ipc::IPCResult |
1317 | 0 | return MsgProcessingError; |
1318 | 0 | } |
1319 | 0 | |
1320 | 0 | reply__ = PPluginModule::Reply_InitCrashReporter(id__); |
1321 | 0 |
|
1322 | 0 | WriteIPDLParam(reply__, this, tid); |
1323 | 0 | // Sentinel = 'tid' |
1324 | 0 | (reply__)->WriteSentinel(333309880); |
1325 | 0 |
|
1326 | 0 | if (mozilla::ipc::LoggingEnabledFor("PPluginModuleChild")) { |
1327 | 0 | mozilla::ipc::LogMessageForProtocol("PPluginModuleChild", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending); |
1328 | 0 | } |
1329 | 0 | return MsgProcessed; |
1330 | 0 | } |
1331 | 0 | default: |
1332 | 0 | { |
1333 | 0 | return MsgNotKnown; |
1334 | 0 | } |
1335 | 0 | } |
1336 | 0 | } |
1337 | | |
1338 | | auto PPluginModuleChild::GetProtocolTypeId() -> int32_t |
1339 | 0 | { |
1340 | 0 | return PPluginModuleMsgStart; |
1341 | 0 | } |
1342 | | |
1343 | | auto PPluginModuleChild::OnChannelClose() -> void |
1344 | 0 | { |
1345 | 0 | DestroySubtree(NormalShutdown); |
1346 | 0 | DeallocSubtree(); |
1347 | 0 | DeallocShmems(); |
1348 | 0 | DeallocPPluginModuleChild(); |
1349 | 0 | } |
1350 | | |
1351 | | auto PPluginModuleChild::OnChannelError() -> void |
1352 | 0 | { |
1353 | 0 | DestroySubtree(AbnormalShutdown); |
1354 | 0 | DeallocSubtree(); |
1355 | 0 | DeallocShmems(); |
1356 | 0 | DeallocPPluginModuleChild(); |
1357 | 0 | } |
1358 | | |
1359 | | auto PPluginModuleChild::ProcessNativeEventsInInterruptCall() -> void |
1360 | 0 | { |
1361 | | #ifdef OS_WIN |
1362 | | ((DowncastState())->GetIPCChannel())->ProcessNativeEventsInInterruptCall(); |
1363 | | #else |
1364 | | FatalError("This method is Windows-only"); |
1365 | 0 | #endif |
1366 | 0 | } |
1367 | | |
1368 | | auto PPluginModuleChild::DestroySubtree(ActorDestroyReason why) -> void |
1369 | 0 | { |
1370 | 0 | ActorDestroyReason subtreewhy = (((why) == (Deletion)) || ((why) == (FailedConstructor)) ? AncestorDeletion : why); |
1371 | 0 |
|
1372 | 0 | { |
1373 | 0 | // Recursively shutting down PPluginInstance kids |
1374 | 0 | nsTArray<PPluginInstanceChild*> kids; |
1375 | 0 | // Accumulate kids into a stable structure to iterate over |
1376 | 0 | ManagedPPluginInstanceChild(kids); |
1377 | 0 | for (auto& kid : kids) { |
1378 | 0 | // Guarding against a child removing a sibling from the list during the iteration. |
1379 | 0 | if ((mManagedPPluginInstanceChild).Contains(kid)) { |
1380 | 0 | (kid)->DestroySubtree(subtreewhy); |
1381 | 0 | } |
1382 | 0 | } |
1383 | 0 | } |
1384 | 0 |
|
1385 | 0 | // Reject owning pending responses. |
1386 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
1387 | 0 |
|
1388 | 0 | // Finally, destroy "us". |
1389 | 0 | ActorDestroy(why); |
1390 | 0 | } |
1391 | | |
1392 | | auto PPluginModuleChild::DeallocSubtree() -> void |
1393 | 0 | { |
1394 | 0 | { |
1395 | 0 | // Recursively deleting PPluginInstance kids |
1396 | 0 | for (auto iter = (mManagedPPluginInstanceChild).Iter(); (!((iter).Done())); (iter).Next()) { |
1397 | 0 | (((iter).Get())->GetKey())->DeallocSubtree(); |
1398 | 0 | } |
1399 | 0 |
|
1400 | 0 | for (auto iter = (mManagedPPluginInstanceChild).Iter(); (!((iter).Done())); (iter).Next()) { |
1401 | 0 | DeallocPPluginInstanceChild(((iter).Get())->GetKey()); |
1402 | 0 | } |
1403 | 0 | (mManagedPPluginInstanceChild).Clear(); |
1404 | 0 | } |
1405 | 0 | } |
1406 | | |
1407 | | auto PPluginModuleChild::DeallocPPluginModuleChild() -> void |
1408 | 0 | { |
1409 | 0 | } |
1410 | | |
1411 | | |
1412 | | |
1413 | | } // namespace plugins |
1414 | | } // namespace mozilla |
1415 | | namespace mozilla { |
1416 | | namespace ipc { |
1417 | | auto IPDLParamTraits<mozilla::plugins::PPluginModuleChild>::Write( |
1418 | | IPC::Message* aMsg, |
1419 | | mozilla::ipc::IProtocol* aActor, |
1420 | | const paramType& aVar) -> void |
1421 | 0 | { |
1422 | 0 | int32_t id; |
1423 | 0 | if ((!(aVar))) { |
1424 | 0 | id = 0; |
1425 | 0 | } |
1426 | 0 | else { |
1427 | 0 | id = (aVar)->Id(); |
1428 | 0 | if ((1) == (id)) { |
1429 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
1430 | 0 | } |
1431 | 0 | } |
1432 | 0 | WriteIPDLParam(aMsg, aActor, id); |
1433 | 0 | } |
1434 | | |
1435 | | auto IPDLParamTraits<mozilla::plugins::PPluginModuleChild>::Read( |
1436 | | const IPC::Message* aMsg, |
1437 | | PickleIterator* aIter, |
1438 | | mozilla::ipc::IProtocol* aActor, |
1439 | | paramType* aVar) -> bool |
1440 | 0 | { |
1441 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PPluginModule", PPluginModuleMsgStart); |
1442 | 0 | if ((actor).isNothing()) { |
1443 | 0 | return false; |
1444 | 0 | } |
1445 | 0 | |
1446 | 0 | (*(aVar)) = static_cast<mozilla::plugins::PPluginModuleChild*>((actor).value()); |
1447 | 0 | return true; |
1448 | 0 | } |
1449 | | |
1450 | | } // namespace ipc |
1451 | | } // namespace mozilla |