/work/obj-fuzz/ipc/ipdl/PWyciwygChannelParent.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/net/PWyciwygChannelParent.h" |
8 | | #include "SerializedLoadContext.h" |
9 | | |
10 | | #include "mozilla/net/PNeckoParent.h" |
11 | | #include "mozilla/dom/PBrowserParent.h" |
12 | | |
13 | | #include "nsIFile.h" |
14 | | #include "GeckoProfiler.h" |
15 | | |
16 | | namespace mozilla { |
17 | | namespace net { |
18 | | |
19 | | |
20 | | auto PWyciwygChannelParent::Recv__delete__() -> mozilla::ipc::IPCResult |
21 | 0 | { |
22 | 0 | return IPC_OK(); |
23 | 0 | } |
24 | | |
25 | | auto PWyciwygChannelParent::ActorDestroy(ActorDestroyReason aWhy) -> void |
26 | 0 | { |
27 | 0 | } |
28 | | |
29 | | MOZ_IMPLICIT PWyciwygChannelParent::PWyciwygChannelParent() : |
30 | | mozilla::ipc::IProtocol(mozilla::ipc::ParentSide), |
31 | | mLivenessState(mozilla::ipc::LivenessState::Dead) |
32 | 0 | { |
33 | 0 | MOZ_COUNT_CTOR(PWyciwygChannelParent); |
34 | 0 | } |
35 | | |
36 | | PWyciwygChannelParent::~PWyciwygChannelParent() |
37 | 0 | { |
38 | 0 | MOZ_COUNT_DTOR(PWyciwygChannelParent); |
39 | 0 | } |
40 | | |
41 | | auto PWyciwygChannelParent::Manager() const -> PNeckoParent* |
42 | 0 | { |
43 | 0 | return static_cast<PNeckoParent*>(IProtocol::Manager()); |
44 | 0 | } |
45 | | |
46 | | auto PWyciwygChannelParent::SendOnStartRequest( |
47 | | const nsresult& statusCode, |
48 | | const int64_t& contentLength, |
49 | | const int32_t& source, |
50 | | const nsCString& charset, |
51 | | const nsCString& securityInfo) -> bool |
52 | 0 | { |
53 | 0 | IPC::Message* msg__ = PWyciwygChannel::Msg_OnStartRequest(Id()); |
54 | 0 |
|
55 | 0 | WriteIPDLParam(msg__, this, statusCode); |
56 | 0 | // Sentinel = 'statusCode' |
57 | 0 | (msg__)->WriteSentinel(2709278591); |
58 | 0 | WriteIPDLParam(msg__, this, contentLength); |
59 | 0 | // Sentinel = 'contentLength' |
60 | 0 | (msg__)->WriteSentinel(2619011242); |
61 | 0 | WriteIPDLParam(msg__, this, source); |
62 | 0 | // Sentinel = 'source' |
63 | 0 | (msg__)->WriteSentinel(774264369); |
64 | 0 | WriteIPDLParam(msg__, this, charset); |
65 | 0 | // Sentinel = 'charset' |
66 | 0 | (msg__)->WriteSentinel(1551550891); |
67 | 0 | WriteIPDLParam(msg__, this, securityInfo); |
68 | 0 | // Sentinel = 'securityInfo' |
69 | 0 | (msg__)->WriteSentinel(158838750); |
70 | 0 |
|
71 | 0 |
|
72 | 0 |
|
73 | 0 |
|
74 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelParent")) { |
75 | 0 | mozilla::ipc::LogMessageForProtocol("PWyciwygChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
76 | 0 | } |
77 | 0 | AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_OnStartRequest", OTHER); |
78 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
79 | 0 | mozilla::ipc::LogicError("Transition error"); |
80 | 0 | } |
81 | 0 |
|
82 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
83 | 0 | return sendok__; |
84 | 0 | } |
85 | | |
86 | | auto PWyciwygChannelParent::SendOnDataAvailable( |
87 | | const nsCString& data, |
88 | | const uint64_t& offset) -> bool |
89 | 0 | { |
90 | 0 | IPC::Message* msg__ = PWyciwygChannel::Msg_OnDataAvailable(Id()); |
91 | 0 |
|
92 | 0 | WriteIPDLParam(msg__, this, data); |
93 | 0 | // Sentinel = 'data' |
94 | 0 | (msg__)->WriteSentinel(843352540); |
95 | 0 | WriteIPDLParam(msg__, this, offset); |
96 | 0 | // Sentinel = 'offset' |
97 | 0 | (msg__)->WriteSentinel(1369947863); |
98 | 0 |
|
99 | 0 |
|
100 | 0 |
|
101 | 0 |
|
102 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelParent")) { |
103 | 0 | mozilla::ipc::LogMessageForProtocol("PWyciwygChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
104 | 0 | } |
105 | 0 | AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_OnDataAvailable", OTHER); |
106 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
107 | 0 | mozilla::ipc::LogicError("Transition error"); |
108 | 0 | } |
109 | 0 |
|
110 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
111 | 0 | return sendok__; |
112 | 0 | } |
113 | | |
114 | | auto PWyciwygChannelParent::SendOnStopRequest(const nsresult& statusCode) -> bool |
115 | 0 | { |
116 | 0 | IPC::Message* msg__ = PWyciwygChannel::Msg_OnStopRequest(Id()); |
117 | 0 |
|
118 | 0 | WriteIPDLParam(msg__, this, statusCode); |
119 | 0 | // Sentinel = 'statusCode' |
120 | 0 | (msg__)->WriteSentinel(2709278591); |
121 | 0 |
|
122 | 0 |
|
123 | 0 |
|
124 | 0 |
|
125 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelParent")) { |
126 | 0 | mozilla::ipc::LogMessageForProtocol("PWyciwygChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
127 | 0 | } |
128 | 0 | AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_OnStopRequest", OTHER); |
129 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
130 | 0 | mozilla::ipc::LogicError("Transition error"); |
131 | 0 | } |
132 | 0 |
|
133 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
134 | 0 | return sendok__; |
135 | 0 | } |
136 | | |
137 | | auto PWyciwygChannelParent::SendCancelEarly(const nsresult& statusCode) -> bool |
138 | 0 | { |
139 | 0 | IPC::Message* msg__ = PWyciwygChannel::Msg_CancelEarly(Id()); |
140 | 0 |
|
141 | 0 | WriteIPDLParam(msg__, this, statusCode); |
142 | 0 | // Sentinel = 'statusCode' |
143 | 0 | (msg__)->WriteSentinel(2709278591); |
144 | 0 |
|
145 | 0 |
|
146 | 0 |
|
147 | 0 |
|
148 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelParent")) { |
149 | 0 | mozilla::ipc::LogMessageForProtocol("PWyciwygChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
150 | 0 | } |
151 | 0 | AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_CancelEarly", OTHER); |
152 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
153 | 0 | mozilla::ipc::LogicError("Transition error"); |
154 | 0 | } |
155 | 0 |
|
156 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
157 | 0 | return sendok__; |
158 | 0 | } |
159 | | |
160 | | auto PWyciwygChannelParent::RemoveManagee( |
161 | | int32_t aProtocolId, |
162 | | IProtocol* aListener) -> void |
163 | 0 | { |
164 | 0 | FatalError("unreached"); |
165 | 0 | return; |
166 | 0 | } |
167 | | |
168 | | auto PWyciwygChannelParent::OnMessageReceived(const Message& msg__) -> PWyciwygChannelParent::Result |
169 | 0 | { |
170 | 0 | switch ((msg__).type()) { |
171 | 0 | case PWyciwygChannel::Msg___delete____ID: |
172 | 0 | { |
173 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelParent")) { |
174 | 0 | mozilla::ipc::LogMessageForProtocol("PWyciwygChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
175 | 0 | } |
176 | 0 | AUTO_PROFILER_LABEL("PWyciwygChannel::Msg___delete__", OTHER); |
177 | 0 |
|
178 | 0 | PickleIterator iter__(msg__); |
179 | 0 | PWyciwygChannelParent* actor; |
180 | 0 |
|
181 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) { |
182 | 0 | FatalError("Error deserializing 'PWyciwygChannelParent'"); |
183 | 0 | return MsgValueError; |
184 | 0 | } |
185 | 0 | if ((!((*((&(actor))))))) { |
186 | 0 | FatalError("Error deserializing 'PWyciwygChannelParent'"); |
187 | 0 | return MsgValueError; |
188 | 0 | } |
189 | 0 | // Sentinel = 'actor' |
190 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
191 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PWyciwygChannelParent'"); |
192 | 0 | return MsgValueError; |
193 | 0 | } |
194 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
195 | 0 | if ((!(StateTransition(true, (&(mLivenessState)))))) { |
196 | 0 | FatalError("Transition error"); |
197 | 0 | return MsgValueError; |
198 | 0 | } |
199 | 0 | if ((!(Recv__delete__()))) { |
200 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
201 | 0 | // Error handled in mozilla::ipc::IPCResult |
202 | 0 | return MsgProcessingError; |
203 | 0 | } |
204 | 0 | |
205 | 0 | |
206 | 0 | IProtocol* mgr = (actor)->Manager(); |
207 | 0 | (actor)->DestroySubtree(Deletion); |
208 | 0 | (actor)->DeallocSubtree(); |
209 | 0 | (mgr)->RemoveManagee(PWyciwygChannelMsgStart, actor); |
210 | 0 |
|
211 | 0 | return MsgProcessed; |
212 | 0 | } |
213 | 0 | case PWyciwygChannel::Msg_Init__ID: |
214 | 0 | { |
215 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelParent")) { |
216 | 0 | mozilla::ipc::LogMessageForProtocol("PWyciwygChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
217 | 0 | } |
218 | 0 | AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_Init", OTHER); |
219 | 0 |
|
220 | 0 | PickleIterator iter__(msg__); |
221 | 0 | URIParams uri; |
222 | 0 | PrincipalInfo requestingPrincipalInfo; |
223 | 0 | PrincipalInfo triggeringPrincipalInfo; |
224 | 0 | PrincipalInfo principalToInheritInfo; |
225 | 0 | uint32_t securityFlags; |
226 | 0 | uint32_t contentPolicyType; |
227 | 0 |
|
228 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(uri)))))) { |
229 | 0 | FatalError("Error deserializing 'URIParams'"); |
230 | 0 | return MsgValueError; |
231 | 0 | } |
232 | 0 | // Sentinel = 'uri' |
233 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1453210605)))) { |
234 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'URIParams'"); |
235 | 0 | return MsgValueError; |
236 | 0 | } |
237 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(requestingPrincipalInfo)))))) { |
238 | 0 | FatalError("Error deserializing 'PrincipalInfo'"); |
239 | 0 | return MsgValueError; |
240 | 0 | } |
241 | 0 | // Sentinel = 'requestingPrincipalInfo' |
242 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3181737698)))) { |
243 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PrincipalInfo'"); |
244 | 0 | return MsgValueError; |
245 | 0 | } |
246 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(triggeringPrincipalInfo)))))) { |
247 | 0 | FatalError("Error deserializing 'PrincipalInfo'"); |
248 | 0 | return MsgValueError; |
249 | 0 | } |
250 | 0 | // Sentinel = 'triggeringPrincipalInfo' |
251 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4145483429)))) { |
252 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PrincipalInfo'"); |
253 | 0 | return MsgValueError; |
254 | 0 | } |
255 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(principalToInheritInfo)))))) { |
256 | 0 | FatalError("Error deserializing 'PrincipalInfo'"); |
257 | 0 | return MsgValueError; |
258 | 0 | } |
259 | 0 | // Sentinel = 'principalToInheritInfo' |
260 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3087636212)))) { |
261 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PrincipalInfo'"); |
262 | 0 | return MsgValueError; |
263 | 0 | } |
264 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(securityFlags)))))) { |
265 | 0 | FatalError("Error deserializing 'uint32_t'"); |
266 | 0 | return MsgValueError; |
267 | 0 | } |
268 | 0 | // Sentinel = 'securityFlags' |
269 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1948430358)))) { |
270 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'"); |
271 | 0 | return MsgValueError; |
272 | 0 | } |
273 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(contentPolicyType)))))) { |
274 | 0 | FatalError("Error deserializing 'uint32_t'"); |
275 | 0 | return MsgValueError; |
276 | 0 | } |
277 | 0 | // Sentinel = 'contentPolicyType' |
278 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3089607692)))) { |
279 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'"); |
280 | 0 | return MsgValueError; |
281 | 0 | } |
282 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
283 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
284 | 0 | FatalError("Transition error"); |
285 | 0 | return MsgValueError; |
286 | 0 | } |
287 | 0 | if ((!(RecvInit(uri, requestingPrincipalInfo, triggeringPrincipalInfo, principalToInheritInfo, securityFlags, contentPolicyType)))) { |
288 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
289 | 0 | // Error handled in mozilla::ipc::IPCResult |
290 | 0 | return MsgProcessingError; |
291 | 0 | } |
292 | 0 | |
293 | 0 | return MsgProcessed; |
294 | 0 | } |
295 | 0 | case PWyciwygChannel::Msg_AsyncOpen__ID: |
296 | 0 | { |
297 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelParent")) { |
298 | 0 | mozilla::ipc::LogMessageForProtocol("PWyciwygChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
299 | 0 | } |
300 | 0 | AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_AsyncOpen", OTHER); |
301 | 0 |
|
302 | 0 | PickleIterator iter__(msg__); |
303 | 0 | URIParams originalURI; |
304 | 0 | uint32_t loadFlags; |
305 | 0 | SerializedLoadContext loadContext; |
306 | 0 | PBrowserOrId browser; |
307 | 0 |
|
308 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originalURI)))))) { |
309 | 0 | FatalError("Error deserializing 'URIParams'"); |
310 | 0 | return MsgValueError; |
311 | 0 | } |
312 | 0 | // Sentinel = 'originalURI' |
313 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2451791718)))) { |
314 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'URIParams'"); |
315 | 0 | return MsgValueError; |
316 | 0 | } |
317 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(loadFlags)))))) { |
318 | 0 | FatalError("Error deserializing 'uint32_t'"); |
319 | 0 | return MsgValueError; |
320 | 0 | } |
321 | 0 | // Sentinel = 'loadFlags' |
322 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2391120444)))) { |
323 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'"); |
324 | 0 | return MsgValueError; |
325 | 0 | } |
326 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(loadContext)))))) { |
327 | 0 | FatalError("Error deserializing 'SerializedLoadContext'"); |
328 | 0 | return MsgValueError; |
329 | 0 | } |
330 | 0 | // Sentinel = 'loadContext' |
331 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2917317838)))) { |
332 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'SerializedLoadContext'"); |
333 | 0 | return MsgValueError; |
334 | 0 | } |
335 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(browser)))))) { |
336 | 0 | FatalError("Error deserializing 'PBrowserOrId'"); |
337 | 0 | return MsgValueError; |
338 | 0 | } |
339 | 0 | // Sentinel = 'browser' |
340 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2836343679)))) { |
341 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PBrowserOrId'"); |
342 | 0 | return MsgValueError; |
343 | 0 | } |
344 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
345 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
346 | 0 | FatalError("Transition error"); |
347 | 0 | return MsgValueError; |
348 | 0 | } |
349 | 0 | if ((!(RecvAsyncOpen(originalURI, loadFlags, loadContext, browser)))) { |
350 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
351 | 0 | // Error handled in mozilla::ipc::IPCResult |
352 | 0 | return MsgProcessingError; |
353 | 0 | } |
354 | 0 | |
355 | 0 | return MsgProcessed; |
356 | 0 | } |
357 | 0 | case PWyciwygChannel::Msg_AppData__ID: |
358 | 0 | { |
359 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelParent")) { |
360 | 0 | mozilla::ipc::LogMessageForProtocol("PWyciwygChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
361 | 0 | } |
362 | 0 | AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_AppData", OTHER); |
363 | 0 |
|
364 | 0 | PickleIterator iter__(msg__); |
365 | 0 | SerializedLoadContext loadContext; |
366 | 0 | PBrowserOrId browser; |
367 | 0 |
|
368 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(loadContext)))))) { |
369 | 0 | FatalError("Error deserializing 'SerializedLoadContext'"); |
370 | 0 | return MsgValueError; |
371 | 0 | } |
372 | 0 | // Sentinel = 'loadContext' |
373 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2917317838)))) { |
374 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'SerializedLoadContext'"); |
375 | 0 | return MsgValueError; |
376 | 0 | } |
377 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(browser)))))) { |
378 | 0 | FatalError("Error deserializing 'PBrowserOrId'"); |
379 | 0 | return MsgValueError; |
380 | 0 | } |
381 | 0 | // Sentinel = 'browser' |
382 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2836343679)))) { |
383 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PBrowserOrId'"); |
384 | 0 | return MsgValueError; |
385 | 0 | } |
386 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
387 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
388 | 0 | FatalError("Transition error"); |
389 | 0 | return MsgValueError; |
390 | 0 | } |
391 | 0 | if ((!(RecvAppData(loadContext, browser)))) { |
392 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
393 | 0 | // Error handled in mozilla::ipc::IPCResult |
394 | 0 | return MsgProcessingError; |
395 | 0 | } |
396 | 0 | |
397 | 0 | return MsgProcessed; |
398 | 0 | } |
399 | 0 | case PWyciwygChannel::Msg_WriteToCacheEntry__ID: |
400 | 0 | { |
401 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelParent")) { |
402 | 0 | mozilla::ipc::LogMessageForProtocol("PWyciwygChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
403 | 0 | } |
404 | 0 | AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_WriteToCacheEntry", OTHER); |
405 | 0 |
|
406 | 0 | PickleIterator iter__(msg__); |
407 | 0 | nsDependentSubstring data; |
408 | 0 |
|
409 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(data)))))) { |
410 | 0 | FatalError("Error deserializing 'nsDependentSubstring'"); |
411 | 0 | return MsgValueError; |
412 | 0 | } |
413 | 0 | // Sentinel = 'data' |
414 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 843352540)))) { |
415 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsDependentSubstring'"); |
416 | 0 | return MsgValueError; |
417 | 0 | } |
418 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
419 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
420 | 0 | FatalError("Transition error"); |
421 | 0 | return MsgValueError; |
422 | 0 | } |
423 | 0 | if ((!(RecvWriteToCacheEntry(data)))) { |
424 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
425 | 0 | // Error handled in mozilla::ipc::IPCResult |
426 | 0 | return MsgProcessingError; |
427 | 0 | } |
428 | 0 | |
429 | 0 | return MsgProcessed; |
430 | 0 | } |
431 | 0 | case PWyciwygChannel::Msg_CloseCacheEntry__ID: |
432 | 0 | { |
433 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelParent")) { |
434 | 0 | mozilla::ipc::LogMessageForProtocol("PWyciwygChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
435 | 0 | } |
436 | 0 | AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_CloseCacheEntry", OTHER); |
437 | 0 |
|
438 | 0 | PickleIterator iter__(msg__); |
439 | 0 | nsresult reason; |
440 | 0 |
|
441 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(reason)))))) { |
442 | 0 | FatalError("Error deserializing 'nsresult'"); |
443 | 0 | return MsgValueError; |
444 | 0 | } |
445 | 0 | // Sentinel = 'reason' |
446 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4151390930)))) { |
447 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'"); |
448 | 0 | return MsgValueError; |
449 | 0 | } |
450 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
451 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
452 | 0 | FatalError("Transition error"); |
453 | 0 | return MsgValueError; |
454 | 0 | } |
455 | 0 | if ((!(RecvCloseCacheEntry(reason)))) { |
456 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
457 | 0 | // Error handled in mozilla::ipc::IPCResult |
458 | 0 | return MsgProcessingError; |
459 | 0 | } |
460 | 0 | |
461 | 0 | return MsgProcessed; |
462 | 0 | } |
463 | 0 | case PWyciwygChannel::Msg_SetCharsetAndSource__ID: |
464 | 0 | { |
465 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelParent")) { |
466 | 0 | mozilla::ipc::LogMessageForProtocol("PWyciwygChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
467 | 0 | } |
468 | 0 | AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_SetCharsetAndSource", OTHER); |
469 | 0 |
|
470 | 0 | PickleIterator iter__(msg__); |
471 | 0 | int32_t source; |
472 | 0 | nsCString charset; |
473 | 0 |
|
474 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(source)))))) { |
475 | 0 | FatalError("Error deserializing 'int32_t'"); |
476 | 0 | return MsgValueError; |
477 | 0 | } |
478 | 0 | // Sentinel = 'source' |
479 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 774264369)))) { |
480 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'"); |
481 | 0 | return MsgValueError; |
482 | 0 | } |
483 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(charset)))))) { |
484 | 0 | FatalError("Error deserializing 'nsCString'"); |
485 | 0 | return MsgValueError; |
486 | 0 | } |
487 | 0 | // Sentinel = 'charset' |
488 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1551550891)))) { |
489 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
490 | 0 | return MsgValueError; |
491 | 0 | } |
492 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
493 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
494 | 0 | FatalError("Transition error"); |
495 | 0 | return MsgValueError; |
496 | 0 | } |
497 | 0 | if ((!(RecvSetCharsetAndSource(source, charset)))) { |
498 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
499 | 0 | // Error handled in mozilla::ipc::IPCResult |
500 | 0 | return MsgProcessingError; |
501 | 0 | } |
502 | 0 | |
503 | 0 | return MsgProcessed; |
504 | 0 | } |
505 | 0 | case PWyciwygChannel::Msg_SetSecurityInfo__ID: |
506 | 0 | { |
507 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelParent")) { |
508 | 0 | mozilla::ipc::LogMessageForProtocol("PWyciwygChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
509 | 0 | } |
510 | 0 | AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_SetSecurityInfo", OTHER); |
511 | 0 |
|
512 | 0 | PickleIterator iter__(msg__); |
513 | 0 | nsCString securityInfo; |
514 | 0 |
|
515 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(securityInfo)))))) { |
516 | 0 | FatalError("Error deserializing 'nsCString'"); |
517 | 0 | return MsgValueError; |
518 | 0 | } |
519 | 0 | // Sentinel = 'securityInfo' |
520 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 158838750)))) { |
521 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
522 | 0 | return MsgValueError; |
523 | 0 | } |
524 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
525 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
526 | 0 | FatalError("Transition error"); |
527 | 0 | return MsgValueError; |
528 | 0 | } |
529 | 0 | if ((!(RecvSetSecurityInfo(securityInfo)))) { |
530 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
531 | 0 | // Error handled in mozilla::ipc::IPCResult |
532 | 0 | return MsgProcessingError; |
533 | 0 | } |
534 | 0 | |
535 | 0 | return MsgProcessed; |
536 | 0 | } |
537 | 0 | case PWyciwygChannel::Msg_Cancel__ID: |
538 | 0 | { |
539 | 0 | if (mozilla::ipc::LoggingEnabledFor("PWyciwygChannelParent")) { |
540 | 0 | mozilla::ipc::LogMessageForProtocol("PWyciwygChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
541 | 0 | } |
542 | 0 | AUTO_PROFILER_LABEL("PWyciwygChannel::Msg_Cancel", OTHER); |
543 | 0 |
|
544 | 0 | PickleIterator iter__(msg__); |
545 | 0 | nsresult status; |
546 | 0 |
|
547 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(status)))))) { |
548 | 0 | FatalError("Error deserializing 'nsresult'"); |
549 | 0 | return MsgValueError; |
550 | 0 | } |
551 | 0 | // Sentinel = 'status' |
552 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3714608576)))) { |
553 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'"); |
554 | 0 | return MsgValueError; |
555 | 0 | } |
556 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
557 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
558 | 0 | FatalError("Transition error"); |
559 | 0 | return MsgValueError; |
560 | 0 | } |
561 | 0 | if ((!(RecvCancel(status)))) { |
562 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
563 | 0 | // Error handled in mozilla::ipc::IPCResult |
564 | 0 | return MsgProcessingError; |
565 | 0 | } |
566 | 0 | |
567 | 0 | return MsgProcessed; |
568 | 0 | } |
569 | 0 | default: |
570 | 0 | { |
571 | 0 | return MsgNotKnown; |
572 | 0 | } |
573 | 0 | } |
574 | 0 | } |
575 | | |
576 | | auto PWyciwygChannelParent::OnMessageReceived( |
577 | | const Message& msg__, |
578 | | Message*& reply__) -> PWyciwygChannelParent::Result |
579 | 0 | { |
580 | 0 | return MsgNotKnown; |
581 | 0 | } |
582 | | |
583 | | auto PWyciwygChannelParent::OnCallReceived( |
584 | | const Message& msg__, |
585 | | Message*& reply__) -> PWyciwygChannelParent::Result |
586 | 0 | { |
587 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
588 | 0 | return MsgNotKnown; |
589 | 0 | } |
590 | | |
591 | | auto PWyciwygChannelParent::GetProtocolTypeId() -> int32_t |
592 | 0 | { |
593 | 0 | return PWyciwygChannelMsgStart; |
594 | 0 | } |
595 | | |
596 | | auto PWyciwygChannelParent::DestroySubtree(ActorDestroyReason why) -> void |
597 | 0 | { |
598 | 0 | // Unregister from our manager. |
599 | 0 | Unregister(Id()); |
600 | 0 |
|
601 | 0 | // Reject owning pending responses. |
602 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
603 | 0 |
|
604 | 0 | // Finally, destroy "us". |
605 | 0 | ActorDestroy(why); |
606 | 0 | } |
607 | | |
608 | | auto PWyciwygChannelParent::DeallocSubtree() -> void |
609 | 0 | { |
610 | 0 | } |
611 | | |
612 | | |
613 | | |
614 | | } // namespace net |
615 | | } // namespace mozilla |
616 | | namespace mozilla { |
617 | | namespace ipc { |
618 | | auto IPDLParamTraits<mozilla::net::PWyciwygChannelParent>::Write( |
619 | | IPC::Message* aMsg, |
620 | | mozilla::ipc::IProtocol* aActor, |
621 | | const paramType& aVar) -> void |
622 | 0 | { |
623 | 0 | int32_t id; |
624 | 0 | if ((!(aVar))) { |
625 | 0 | id = 0; |
626 | 0 | } |
627 | 0 | else { |
628 | 0 | id = (aVar)->Id(); |
629 | 0 | if ((1) == (id)) { |
630 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
631 | 0 | } |
632 | 0 | } |
633 | 0 | WriteIPDLParam(aMsg, aActor, id); |
634 | 0 | } |
635 | | |
636 | | auto IPDLParamTraits<mozilla::net::PWyciwygChannelParent>::Read( |
637 | | const IPC::Message* aMsg, |
638 | | PickleIterator* aIter, |
639 | | mozilla::ipc::IProtocol* aActor, |
640 | | paramType* aVar) -> bool |
641 | 0 | { |
642 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PWyciwygChannel", PWyciwygChannelMsgStart); |
643 | 0 | if ((actor).isNothing()) { |
644 | 0 | return false; |
645 | 0 | } |
646 | 0 | |
647 | 0 | (*(aVar)) = static_cast<mozilla::net::PWyciwygChannelParent*>((actor).value()); |
648 | 0 | return true; |
649 | 0 | } |
650 | | |
651 | | } // namespace ipc |
652 | | } // namespace mozilla |