/work/obj-fuzz/ipc/ipdl/PUiCompositorControllerChild.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/layers/PUiCompositorControllerChild.h" |
8 | | |
9 | | |
10 | | #include "nsIFile.h" |
11 | | #include "GeckoProfiler.h" |
12 | | |
13 | | namespace mozilla { |
14 | | namespace layers { |
15 | | |
16 | | |
17 | | auto PUiCompositorControllerChild::ActorDestroy(ActorDestroyReason aWhy) -> void |
18 | 0 | { |
19 | 0 | } |
20 | | |
21 | | auto PUiCompositorControllerChild::ProcessingError( |
22 | | Result aCode, |
23 | | const char* aReason) -> void |
24 | 0 | { |
25 | 0 | } |
26 | | |
27 | | auto PUiCompositorControllerChild::ShouldContinueFromReplyTimeout() -> bool |
28 | 0 | { |
29 | 0 | return true; |
30 | 0 | } |
31 | | |
32 | | auto PUiCompositorControllerChild::EnteredCxxStack() -> void |
33 | 0 | { |
34 | 0 | } |
35 | | |
36 | | auto PUiCompositorControllerChild::ExitedCxxStack() -> void |
37 | 0 | { |
38 | 0 | } |
39 | | |
40 | | auto PUiCompositorControllerChild::EnteredCall() -> void |
41 | 0 | { |
42 | 0 | } |
43 | | |
44 | | auto PUiCompositorControllerChild::ExitedCall() -> void |
45 | 0 | { |
46 | 0 | } |
47 | | |
48 | | MOZ_IMPLICIT PUiCompositorControllerChild::PUiCompositorControllerChild() : |
49 | | mozilla::ipc::IToplevelProtocol("PUiCompositorControllerChild", PUiCompositorControllerMsgStart, mozilla::ipc::ChildSide), |
50 | | mLivenessState(mozilla::ipc::LivenessState::Start) |
51 | 0 | { |
52 | 0 | MOZ_COUNT_CTOR(PUiCompositorControllerChild); |
53 | 0 | } |
54 | | |
55 | | PUiCompositorControllerChild::~PUiCompositorControllerChild() |
56 | 0 | { |
57 | 0 | MOZ_COUNT_DTOR(PUiCompositorControllerChild); |
58 | 0 | } |
59 | | |
60 | | auto PUiCompositorControllerChild::SendPause() -> bool |
61 | 0 | { |
62 | 0 | IPC::Message* msg__ = PUiCompositorController::Msg_Pause(MSG_ROUTING_CONTROL); |
63 | 0 |
|
64 | 0 |
|
65 | 0 |
|
66 | 0 |
|
67 | 0 | Message reply__; |
68 | 0 |
|
69 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
70 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
71 | 0 | } |
72 | 0 | AUTO_PROFILER_LABEL("PUiCompositorController::Msg_Pause", OTHER); |
73 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
74 | 0 | mozilla::ipc::LogicError("Transition error"); |
75 | 0 | } |
76 | 0 |
|
77 | 0 | bool sendok__; |
78 | 0 | { |
79 | 0 | AUTO_PROFILER_TRACING("IPC", "PUiCompositorController::Msg_Pause"); |
80 | 0 | sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__))); |
81 | 0 | } |
82 | 0 | if ((!(sendok__))) { |
83 | 0 | return false; |
84 | 0 | } |
85 | 0 | |
86 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
87 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
88 | 0 | } |
89 | 0 |
|
90 | 0 | return true; |
91 | 0 | } |
92 | | |
93 | | auto PUiCompositorControllerChild::SendResume() -> bool |
94 | 0 | { |
95 | 0 | IPC::Message* msg__ = PUiCompositorController::Msg_Resume(MSG_ROUTING_CONTROL); |
96 | 0 |
|
97 | 0 |
|
98 | 0 |
|
99 | 0 |
|
100 | 0 | Message reply__; |
101 | 0 |
|
102 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
103 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
104 | 0 | } |
105 | 0 | AUTO_PROFILER_LABEL("PUiCompositorController::Msg_Resume", OTHER); |
106 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
107 | 0 | mozilla::ipc::LogicError("Transition error"); |
108 | 0 | } |
109 | 0 |
|
110 | 0 | bool sendok__; |
111 | 0 | { |
112 | 0 | AUTO_PROFILER_TRACING("IPC", "PUiCompositorController::Msg_Resume"); |
113 | 0 | sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__))); |
114 | 0 | } |
115 | 0 | if ((!(sendok__))) { |
116 | 0 | return false; |
117 | 0 | } |
118 | 0 | |
119 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
120 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
121 | 0 | } |
122 | 0 |
|
123 | 0 | return true; |
124 | 0 | } |
125 | | |
126 | | auto PUiCompositorControllerChild::SendResumeAndResize( |
127 | | const int32_t& aWidth, |
128 | | const int32_t& aHeight) -> bool |
129 | 0 | { |
130 | 0 | IPC::Message* msg__ = PUiCompositorController::Msg_ResumeAndResize(MSG_ROUTING_CONTROL); |
131 | 0 |
|
132 | 0 | WriteIPDLParam(msg__, this, aWidth); |
133 | 0 | // Sentinel = 'aWidth' |
134 | 0 | (msg__)->WriteSentinel(196646625); |
135 | 0 | WriteIPDLParam(msg__, this, aHeight); |
136 | 0 | // Sentinel = 'aHeight' |
137 | 0 | (msg__)->WriteSentinel(3588433859); |
138 | 0 |
|
139 | 0 |
|
140 | 0 |
|
141 | 0 | Message reply__; |
142 | 0 |
|
143 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
144 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
145 | 0 | } |
146 | 0 | AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ResumeAndResize", OTHER); |
147 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
148 | 0 | mozilla::ipc::LogicError("Transition error"); |
149 | 0 | } |
150 | 0 |
|
151 | 0 | bool sendok__; |
152 | 0 | { |
153 | 0 | AUTO_PROFILER_TRACING("IPC", "PUiCompositorController::Msg_ResumeAndResize"); |
154 | 0 | sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__))); |
155 | 0 | } |
156 | 0 | if ((!(sendok__))) { |
157 | 0 | return false; |
158 | 0 | } |
159 | 0 | |
160 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
161 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
162 | 0 | } |
163 | 0 |
|
164 | 0 | return true; |
165 | 0 | } |
166 | | |
167 | | auto PUiCompositorControllerChild::SendInvalidateAndRender() -> bool |
168 | 0 | { |
169 | 0 | IPC::Message* msg__ = PUiCompositorController::Msg_InvalidateAndRender(MSG_ROUTING_CONTROL); |
170 | 0 |
|
171 | 0 |
|
172 | 0 |
|
173 | 0 |
|
174 | 0 |
|
175 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
176 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
177 | 0 | } |
178 | 0 | AUTO_PROFILER_LABEL("PUiCompositorController::Msg_InvalidateAndRender", OTHER); |
179 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
180 | 0 | mozilla::ipc::LogicError("Transition error"); |
181 | 0 | } |
182 | 0 |
|
183 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
184 | 0 | return sendok__; |
185 | 0 | } |
186 | | |
187 | | auto PUiCompositorControllerChild::SendMaxToolbarHeight(const int32_t& aHeight) -> bool |
188 | 0 | { |
189 | 0 | IPC::Message* msg__ = PUiCompositorController::Msg_MaxToolbarHeight(MSG_ROUTING_CONTROL); |
190 | 0 |
|
191 | 0 | WriteIPDLParam(msg__, this, aHeight); |
192 | 0 | // Sentinel = 'aHeight' |
193 | 0 | (msg__)->WriteSentinel(3588433859); |
194 | 0 |
|
195 | 0 |
|
196 | 0 |
|
197 | 0 |
|
198 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
199 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
200 | 0 | } |
201 | 0 | AUTO_PROFILER_LABEL("PUiCompositorController::Msg_MaxToolbarHeight", OTHER); |
202 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
203 | 0 | mozilla::ipc::LogicError("Transition error"); |
204 | 0 | } |
205 | 0 |
|
206 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
207 | 0 | return sendok__; |
208 | 0 | } |
209 | | |
210 | | auto PUiCompositorControllerChild::SendPinned( |
211 | | const bool& aPinned, |
212 | | const int32_t& aReason) -> bool |
213 | 0 | { |
214 | 0 | IPC::Message* msg__ = PUiCompositorController::Msg_Pinned(MSG_ROUTING_CONTROL); |
215 | 0 |
|
216 | 0 | WriteIPDLParam(msg__, this, aPinned); |
217 | 0 | // Sentinel = 'aPinned' |
218 | 0 | (msg__)->WriteSentinel(1467325352); |
219 | 0 | WriteIPDLParam(msg__, this, aReason); |
220 | 0 | // Sentinel = 'aReason' |
221 | 0 | (msg__)->WriteSentinel(829905706); |
222 | 0 |
|
223 | 0 |
|
224 | 0 |
|
225 | 0 |
|
226 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
227 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
228 | 0 | } |
229 | 0 | AUTO_PROFILER_LABEL("PUiCompositorController::Msg_Pinned", OTHER); |
230 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
231 | 0 | mozilla::ipc::LogicError("Transition error"); |
232 | 0 | } |
233 | 0 |
|
234 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
235 | 0 | return sendok__; |
236 | 0 | } |
237 | | |
238 | | auto PUiCompositorControllerChild::SendToolbarAnimatorMessageFromUI(const int32_t& aMessage) -> bool |
239 | 0 | { |
240 | 0 | IPC::Message* msg__ = PUiCompositorController::Msg_ToolbarAnimatorMessageFromUI(MSG_ROUTING_CONTROL); |
241 | 0 |
|
242 | 0 | WriteIPDLParam(msg__, this, aMessage); |
243 | 0 | // Sentinel = 'aMessage' |
244 | 0 | (msg__)->WriteSentinel(3453110902); |
245 | 0 |
|
246 | 0 |
|
247 | 0 |
|
248 | 0 |
|
249 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
250 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
251 | 0 | } |
252 | 0 | AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ToolbarAnimatorMessageFromUI", OTHER); |
253 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
254 | 0 | mozilla::ipc::LogicError("Transition error"); |
255 | 0 | } |
256 | 0 |
|
257 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
258 | 0 | return sendok__; |
259 | 0 | } |
260 | | |
261 | | auto PUiCompositorControllerChild::SendDefaultClearColor(const uint32_t& aColor) -> bool |
262 | 0 | { |
263 | 0 | IPC::Message* msg__ = PUiCompositorController::Msg_DefaultClearColor(MSG_ROUTING_CONTROL); |
264 | 0 |
|
265 | 0 | WriteIPDLParam(msg__, this, aColor); |
266 | 0 | // Sentinel = 'aColor' |
267 | 0 | (msg__)->WriteSentinel(1767069424); |
268 | 0 |
|
269 | 0 |
|
270 | 0 |
|
271 | 0 |
|
272 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
273 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
274 | 0 | } |
275 | 0 | AUTO_PROFILER_LABEL("PUiCompositorController::Msg_DefaultClearColor", OTHER); |
276 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
277 | 0 | mozilla::ipc::LogicError("Transition error"); |
278 | 0 | } |
279 | 0 |
|
280 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
281 | 0 | return sendok__; |
282 | 0 | } |
283 | | |
284 | | auto PUiCompositorControllerChild::SendRequestScreenPixels() -> bool |
285 | 0 | { |
286 | 0 | IPC::Message* msg__ = PUiCompositorController::Msg_RequestScreenPixels(MSG_ROUTING_CONTROL); |
287 | 0 |
|
288 | 0 |
|
289 | 0 |
|
290 | 0 |
|
291 | 0 |
|
292 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
293 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
294 | 0 | } |
295 | 0 | AUTO_PROFILER_LABEL("PUiCompositorController::Msg_RequestScreenPixels", OTHER); |
296 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
297 | 0 | mozilla::ipc::LogicError("Transition error"); |
298 | 0 | } |
299 | 0 |
|
300 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
301 | 0 | return sendok__; |
302 | 0 | } |
303 | | |
304 | | auto PUiCompositorControllerChild::SendEnableLayerUpdateNotifications(const bool& aEnable) -> bool |
305 | 0 | { |
306 | 0 | IPC::Message* msg__ = PUiCompositorController::Msg_EnableLayerUpdateNotifications(MSG_ROUTING_CONTROL); |
307 | 0 |
|
308 | 0 | WriteIPDLParam(msg__, this, aEnable); |
309 | 0 | // Sentinel = 'aEnable' |
310 | 0 | (msg__)->WriteSentinel(163837555); |
311 | 0 |
|
312 | 0 |
|
313 | 0 |
|
314 | 0 |
|
315 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
316 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
317 | 0 | } |
318 | 0 | AUTO_PROFILER_LABEL("PUiCompositorController::Msg_EnableLayerUpdateNotifications", OTHER); |
319 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
320 | 0 | mozilla::ipc::LogicError("Transition error"); |
321 | 0 | } |
322 | 0 |
|
323 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
324 | 0 | return sendok__; |
325 | 0 | } |
326 | | |
327 | | auto PUiCompositorControllerChild::SendToolbarPixelsToCompositor( |
328 | | Shmem& aMem, |
329 | | const ScreenIntSize& aSize) -> bool |
330 | 0 | { |
331 | 0 | IPC::Message* msg__ = PUiCompositorController::Msg_ToolbarPixelsToCompositor(MSG_ROUTING_CONTROL); |
332 | 0 |
|
333 | 0 | WriteIPDLParam(msg__, this, aMem); |
334 | 0 | // Sentinel = 'aMem' |
335 | 0 | (msg__)->WriteSentinel(3574578916); |
336 | 0 | WriteIPDLParam(msg__, this, aSize); |
337 | 0 | // Sentinel = 'aSize' |
338 | 0 | (msg__)->WriteSentinel(2556665555); |
339 | 0 |
|
340 | 0 |
|
341 | 0 |
|
342 | 0 |
|
343 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
344 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
345 | 0 | } |
346 | 0 | AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ToolbarPixelsToCompositor", OTHER); |
347 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
348 | 0 | mozilla::ipc::LogicError("Transition error"); |
349 | 0 | } |
350 | 0 |
|
351 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
352 | 0 | return sendok__; |
353 | 0 | } |
354 | | |
355 | | auto PUiCompositorControllerChild::RemoveManagee( |
356 | | int32_t aProtocolId, |
357 | | IProtocol* aListener) -> void |
358 | 0 | { |
359 | 0 | FatalError("unreached"); |
360 | 0 | return; |
361 | 0 | } |
362 | | |
363 | | auto PUiCompositorControllerChild::OnMessageReceived(const Message& msg__) -> PUiCompositorControllerChild::Result |
364 | 0 | { |
365 | 0 | switch ((msg__).type()) { |
366 | 0 | case PUiCompositorController::Msg_ToolbarAnimatorMessageFromCompositor__ID: |
367 | 0 | { |
368 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
369 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
370 | 0 | } |
371 | 0 | AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ToolbarAnimatorMessageFromCompositor", OTHER); |
372 | 0 |
|
373 | 0 | PickleIterator iter__(msg__); |
374 | 0 | int32_t aMessage; |
375 | 0 |
|
376 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aMessage)))))) { |
377 | 0 | FatalError("Error deserializing 'int32_t'"); |
378 | 0 | return MsgValueError; |
379 | 0 | } |
380 | 0 | // Sentinel = 'aMessage' |
381 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3453110902)))) { |
382 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'"); |
383 | 0 | return MsgValueError; |
384 | 0 | } |
385 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
386 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
387 | 0 | FatalError("Transition error"); |
388 | 0 | return MsgValueError; |
389 | 0 | } |
390 | 0 | if ((!(RecvToolbarAnimatorMessageFromCompositor(aMessage)))) { |
391 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
392 | 0 | // Error handled in mozilla::ipc::IPCResult |
393 | 0 | return MsgProcessingError; |
394 | 0 | } |
395 | 0 | |
396 | 0 | return MsgProcessed; |
397 | 0 | } |
398 | 0 | case PUiCompositorController::Msg_RootFrameMetrics__ID: |
399 | 0 | { |
400 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
401 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
402 | 0 | } |
403 | 0 | AUTO_PROFILER_LABEL("PUiCompositorController::Msg_RootFrameMetrics", OTHER); |
404 | 0 |
|
405 | 0 | PickleIterator iter__(msg__); |
406 | 0 | ScreenPoint aScrollOffset; |
407 | 0 | CSSToScreenScale aZoom; |
408 | 0 |
|
409 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aScrollOffset)))))) { |
410 | 0 | FatalError("Error deserializing 'ScreenPoint'"); |
411 | 0 | return MsgValueError; |
412 | 0 | } |
413 | 0 | // Sentinel = 'aScrollOffset' |
414 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 380967954)))) { |
415 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ScreenPoint'"); |
416 | 0 | return MsgValueError; |
417 | 0 | } |
418 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aZoom)))))) { |
419 | 0 | FatalError("Error deserializing 'CSSToScreenScale'"); |
420 | 0 | return MsgValueError; |
421 | 0 | } |
422 | 0 | // Sentinel = 'aZoom' |
423 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3288940929)))) { |
424 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'CSSToScreenScale'"); |
425 | 0 | return MsgValueError; |
426 | 0 | } |
427 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
428 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
429 | 0 | FatalError("Transition error"); |
430 | 0 | return MsgValueError; |
431 | 0 | } |
432 | 0 | if ((!(RecvRootFrameMetrics(aScrollOffset, aZoom)))) { |
433 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
434 | 0 | // Error handled in mozilla::ipc::IPCResult |
435 | 0 | return MsgProcessingError; |
436 | 0 | } |
437 | 0 | |
438 | 0 | return MsgProcessed; |
439 | 0 | } |
440 | 0 | case PUiCompositorController::Msg_ScreenPixels__ID: |
441 | 0 | { |
442 | 0 | if (mozilla::ipc::LoggingEnabledFor("PUiCompositorControllerChild")) { |
443 | 0 | mozilla::ipc::LogMessageForProtocol("PUiCompositorControllerChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
444 | 0 | } |
445 | 0 | AUTO_PROFILER_LABEL("PUiCompositorController::Msg_ScreenPixels", OTHER); |
446 | 0 |
|
447 | 0 | PickleIterator iter__(msg__); |
448 | 0 | Shmem aMem; |
449 | 0 | ScreenIntSize aSize; |
450 | 0 |
|
451 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aMem)))))) { |
452 | 0 | FatalError("Error deserializing 'Shmem'"); |
453 | 0 | return MsgValueError; |
454 | 0 | } |
455 | 0 | // Sentinel = 'aMem' |
456 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3574578916)))) { |
457 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'Shmem'"); |
458 | 0 | return MsgValueError; |
459 | 0 | } |
460 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aSize)))))) { |
461 | 0 | FatalError("Error deserializing 'ScreenIntSize'"); |
462 | 0 | return MsgValueError; |
463 | 0 | } |
464 | 0 | // Sentinel = 'aSize' |
465 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2556665555)))) { |
466 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'ScreenIntSize'"); |
467 | 0 | return MsgValueError; |
468 | 0 | } |
469 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
470 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
471 | 0 | FatalError("Transition error"); |
472 | 0 | return MsgValueError; |
473 | 0 | } |
474 | 0 | if ((!(RecvScreenPixels(std::move(aMem), aSize)))) { |
475 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
476 | 0 | // Error handled in mozilla::ipc::IPCResult |
477 | 0 | return MsgProcessingError; |
478 | 0 | } |
479 | 0 | |
480 | 0 | return MsgProcessed; |
481 | 0 | } |
482 | 0 | default: |
483 | 0 | { |
484 | 0 | return MsgNotKnown; |
485 | 0 | } |
486 | 0 | case SHMEM_CREATED_MESSAGE_TYPE: |
487 | 0 | { |
488 | 0 | if ((!(ShmemCreated(msg__)))) { |
489 | 0 | return MsgPayloadError; |
490 | 0 | } |
491 | 0 | return MsgProcessed; |
492 | 0 | } |
493 | 0 | case SHMEM_DESTROYED_MESSAGE_TYPE: |
494 | 0 | { |
495 | 0 | if ((!(ShmemDestroyed(msg__)))) { |
496 | 0 | return MsgPayloadError; |
497 | 0 | } |
498 | 0 | return MsgProcessed; |
499 | 0 | } |
500 | 0 | } |
501 | 0 | } |
502 | | |
503 | | auto PUiCompositorControllerChild::OnMessageReceived( |
504 | | const Message& msg__, |
505 | | Message*& reply__) -> PUiCompositorControllerChild::Result |
506 | 0 | { |
507 | 0 | return MsgNotKnown; |
508 | 0 | } |
509 | | |
510 | | auto PUiCompositorControllerChild::OnCallReceived( |
511 | | const Message& msg__, |
512 | | Message*& reply__) -> PUiCompositorControllerChild::Result |
513 | 0 | { |
514 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
515 | 0 | return MsgNotKnown; |
516 | 0 | } |
517 | | |
518 | | auto PUiCompositorControllerChild::GetProtocolTypeId() -> int32_t |
519 | 0 | { |
520 | 0 | return PUiCompositorControllerMsgStart; |
521 | 0 | } |
522 | | |
523 | | auto PUiCompositorControllerChild::OnChannelClose() -> void |
524 | 0 | { |
525 | 0 | DestroySubtree(NormalShutdown); |
526 | 0 | DeallocSubtree(); |
527 | 0 | DeallocShmems(); |
528 | 0 | DeallocPUiCompositorControllerChild(); |
529 | 0 | } |
530 | | |
531 | | auto PUiCompositorControllerChild::OnChannelError() -> void |
532 | 0 | { |
533 | 0 | DestroySubtree(AbnormalShutdown); |
534 | 0 | DeallocSubtree(); |
535 | 0 | DeallocShmems(); |
536 | 0 | DeallocPUiCompositorControllerChild(); |
537 | 0 | } |
538 | | |
539 | | auto PUiCompositorControllerChild::DestroySubtree(ActorDestroyReason why) -> void |
540 | 0 | { |
541 | 0 | // Reject owning pending responses. |
542 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
543 | 0 |
|
544 | 0 | // Finally, destroy "us". |
545 | 0 | ActorDestroy(why); |
546 | 0 | } |
547 | | |
548 | | auto PUiCompositorControllerChild::DeallocSubtree() -> void |
549 | 0 | { |
550 | 0 | } |
551 | | |
552 | | auto PUiCompositorControllerChild::DeallocPUiCompositorControllerChild() -> void |
553 | 0 | { |
554 | 0 | } |
555 | | |
556 | | |
557 | | |
558 | | } // namespace layers |
559 | | } // namespace mozilla |
560 | | namespace mozilla { |
561 | | namespace ipc { |
562 | | auto IPDLParamTraits<mozilla::layers::PUiCompositorControllerChild>::Write( |
563 | | IPC::Message* aMsg, |
564 | | mozilla::ipc::IProtocol* aActor, |
565 | | const paramType& aVar) -> void |
566 | 0 | { |
567 | 0 | int32_t id; |
568 | 0 | if ((!(aVar))) { |
569 | 0 | id = 0; |
570 | 0 | } |
571 | 0 | else { |
572 | 0 | id = (aVar)->Id(); |
573 | 0 | if ((1) == (id)) { |
574 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
575 | 0 | } |
576 | 0 | } |
577 | 0 | WriteIPDLParam(aMsg, aActor, id); |
578 | 0 | } |
579 | | |
580 | | auto IPDLParamTraits<mozilla::layers::PUiCompositorControllerChild>::Read( |
581 | | const IPC::Message* aMsg, |
582 | | PickleIterator* aIter, |
583 | | mozilla::ipc::IProtocol* aActor, |
584 | | paramType* aVar) -> bool |
585 | 0 | { |
586 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PUiCompositorController", PUiCompositorControllerMsgStart); |
587 | 0 | if ((actor).isNothing()) { |
588 | 0 | return false; |
589 | 0 | } |
590 | 0 | |
591 | 0 | (*(aVar)) = static_cast<mozilla::layers::PUiCompositorControllerChild*>((actor).value()); |
592 | 0 | return true; |
593 | 0 | } |
594 | | |
595 | | } // namespace ipc |
596 | | } // namespace mozilla |