/work/obj-fuzz/ipc/ipdl/PCookieServiceParent.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/PCookieServiceParent.h" |
8 | | |
9 | | #include "mozilla/net/PNeckoParent.h" |
10 | | |
11 | | #include "nsIFile.h" |
12 | | #include "GeckoProfiler.h" |
13 | | |
14 | | namespace mozilla { |
15 | | namespace net { |
16 | | |
17 | | |
18 | | auto PCookieServiceParent::Recv__delete__() -> mozilla::ipc::IPCResult |
19 | 0 | { |
20 | 0 | return IPC_OK(); |
21 | 0 | } |
22 | | |
23 | | auto PCookieServiceParent::ActorDestroy(ActorDestroyReason aWhy) -> void |
24 | 0 | { |
25 | 0 | } |
26 | | |
27 | | MOZ_IMPLICIT PCookieServiceParent::PCookieServiceParent() : |
28 | | mozilla::ipc::IProtocol(mozilla::ipc::ParentSide), |
29 | | mLivenessState(mozilla::ipc::LivenessState::Dead) |
30 | 0 | { |
31 | 0 | MOZ_COUNT_CTOR(PCookieServiceParent); |
32 | 0 | } |
33 | | |
34 | | PCookieServiceParent::~PCookieServiceParent() |
35 | 0 | { |
36 | 0 | MOZ_COUNT_DTOR(PCookieServiceParent); |
37 | 0 | } |
38 | | |
39 | | auto PCookieServiceParent::Manager() const -> PNeckoParent* |
40 | 0 | { |
41 | 0 | return static_cast<PNeckoParent*>(IProtocol::Manager()); |
42 | 0 | } |
43 | | |
44 | | auto PCookieServiceParent::SendTrackCookiesLoad( |
45 | | const nsTArray<CookieStruct>& cookiesList, |
46 | | const OriginAttributes& attrs) -> bool |
47 | 0 | { |
48 | 0 | IPC::Message* msg__ = PCookieService::Msg_TrackCookiesLoad(Id()); |
49 | 0 |
|
50 | 0 | WriteIPDLParam(msg__, this, cookiesList); |
51 | 0 | // Sentinel = 'cookiesList' |
52 | 0 | (msg__)->WriteSentinel(6061702); |
53 | 0 | WriteIPDLParam(msg__, this, attrs); |
54 | 0 | // Sentinel = 'attrs' |
55 | 0 | (msg__)->WriteSentinel(3014987797); |
56 | 0 |
|
57 | 0 |
|
58 | 0 |
|
59 | 0 |
|
60 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCookieServiceParent")) { |
61 | 0 | mozilla::ipc::LogMessageForProtocol("PCookieServiceParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
62 | 0 | } |
63 | 0 | AUTO_PROFILER_LABEL("PCookieService::Msg_TrackCookiesLoad", OTHER); |
64 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
65 | 0 | mozilla::ipc::LogicError("Transition error"); |
66 | 0 | } |
67 | 0 |
|
68 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
69 | 0 | return sendok__; |
70 | 0 | } |
71 | | |
72 | | auto PCookieServiceParent::SendRemoveCookie( |
73 | | const CookieStruct& cookie, |
74 | | const OriginAttributes& attrs) -> bool |
75 | 0 | { |
76 | 0 | IPC::Message* msg__ = PCookieService::Msg_RemoveCookie(Id()); |
77 | 0 |
|
78 | 0 | WriteIPDLParam(msg__, this, cookie); |
79 | 0 | // Sentinel = 'cookie' |
80 | 0 | (msg__)->WriteSentinel(1377792724); |
81 | 0 | WriteIPDLParam(msg__, this, attrs); |
82 | 0 | // Sentinel = 'attrs' |
83 | 0 | (msg__)->WriteSentinel(3014987797); |
84 | 0 |
|
85 | 0 |
|
86 | 0 |
|
87 | 0 |
|
88 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCookieServiceParent")) { |
89 | 0 | mozilla::ipc::LogMessageForProtocol("PCookieServiceParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
90 | 0 | } |
91 | 0 | AUTO_PROFILER_LABEL("PCookieService::Msg_RemoveCookie", OTHER); |
92 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
93 | 0 | mozilla::ipc::LogicError("Transition error"); |
94 | 0 | } |
95 | 0 |
|
96 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
97 | 0 | return sendok__; |
98 | 0 | } |
99 | | |
100 | | auto PCookieServiceParent::SendRemoveBatchDeletedCookies( |
101 | | const nsTArray<CookieStruct>& cookiesList, |
102 | | const nsTArray<OriginAttributes>& attrsList) -> bool |
103 | 0 | { |
104 | 0 | IPC::Message* msg__ = PCookieService::Msg_RemoveBatchDeletedCookies(Id()); |
105 | 0 |
|
106 | 0 | WriteIPDLParam(msg__, this, cookiesList); |
107 | 0 | // Sentinel = 'cookiesList' |
108 | 0 | (msg__)->WriteSentinel(6061702); |
109 | 0 | WriteIPDLParam(msg__, this, attrsList); |
110 | 0 | // Sentinel = 'attrsList' |
111 | 0 | (msg__)->WriteSentinel(1173781201); |
112 | 0 |
|
113 | 0 |
|
114 | 0 |
|
115 | 0 |
|
116 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCookieServiceParent")) { |
117 | 0 | mozilla::ipc::LogMessageForProtocol("PCookieServiceParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
118 | 0 | } |
119 | 0 | AUTO_PROFILER_LABEL("PCookieService::Msg_RemoveBatchDeletedCookies", OTHER); |
120 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
121 | 0 | mozilla::ipc::LogicError("Transition error"); |
122 | 0 | } |
123 | 0 |
|
124 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
125 | 0 | return sendok__; |
126 | 0 | } |
127 | | |
128 | | auto PCookieServiceParent::SendRemoveAll() -> bool |
129 | 0 | { |
130 | 0 | IPC::Message* msg__ = PCookieService::Msg_RemoveAll(Id()); |
131 | 0 |
|
132 | 0 |
|
133 | 0 |
|
134 | 0 |
|
135 | 0 |
|
136 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCookieServiceParent")) { |
137 | 0 | mozilla::ipc::LogMessageForProtocol("PCookieServiceParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
138 | 0 | } |
139 | 0 | AUTO_PROFILER_LABEL("PCookieService::Msg_RemoveAll", OTHER); |
140 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
141 | 0 | mozilla::ipc::LogicError("Transition error"); |
142 | 0 | } |
143 | 0 |
|
144 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
145 | 0 | return sendok__; |
146 | 0 | } |
147 | | |
148 | | auto PCookieServiceParent::SendAddCookie( |
149 | | const CookieStruct& cookie, |
150 | | const OriginAttributes& attrs) -> bool |
151 | 0 | { |
152 | 0 | IPC::Message* msg__ = PCookieService::Msg_AddCookie(Id()); |
153 | 0 |
|
154 | 0 | WriteIPDLParam(msg__, this, cookie); |
155 | 0 | // Sentinel = 'cookie' |
156 | 0 | (msg__)->WriteSentinel(1377792724); |
157 | 0 | WriteIPDLParam(msg__, this, attrs); |
158 | 0 | // Sentinel = 'attrs' |
159 | 0 | (msg__)->WriteSentinel(3014987797); |
160 | 0 |
|
161 | 0 |
|
162 | 0 |
|
163 | 0 |
|
164 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCookieServiceParent")) { |
165 | 0 | mozilla::ipc::LogMessageForProtocol("PCookieServiceParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
166 | 0 | } |
167 | 0 | AUTO_PROFILER_LABEL("PCookieService::Msg_AddCookie", OTHER); |
168 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
169 | 0 | mozilla::ipc::LogicError("Transition error"); |
170 | 0 | } |
171 | 0 |
|
172 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
173 | 0 | return sendok__; |
174 | 0 | } |
175 | | |
176 | | auto PCookieServiceParent::RemoveManagee( |
177 | | int32_t aProtocolId, |
178 | | IProtocol* aListener) -> void |
179 | 0 | { |
180 | 0 | FatalError("unreached"); |
181 | 0 | return; |
182 | 0 | } |
183 | | |
184 | | auto PCookieServiceParent::OnMessageReceived(const Message& msg__) -> PCookieServiceParent::Result |
185 | 0 | { |
186 | 0 | switch ((msg__).type()) { |
187 | 0 | case PCookieService::Msg_SetCookieString__ID: |
188 | 0 | { |
189 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCookieServiceParent")) { |
190 | 0 | mozilla::ipc::LogMessageForProtocol("PCookieServiceParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
191 | 0 | } |
192 | 0 | AUTO_PROFILER_LABEL("PCookieService::Msg_SetCookieString", OTHER); |
193 | 0 |
|
194 | 0 | PickleIterator iter__(msg__); |
195 | 0 | URIParams host; |
196 | 0 | OptionalURIParams channelURI; |
197 | 0 | bool isForeign; |
198 | 0 | bool isTrackingResource; |
199 | 0 | bool firstPartyStorageAccessGranted; |
200 | 0 | nsCString cookieString; |
201 | 0 | nsCString serverTime; |
202 | 0 | OriginAttributes attrs; |
203 | 0 | bool aFromHttp; |
204 | 0 |
|
205 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(host)))))) { |
206 | 0 | FatalError("Error deserializing 'URIParams'"); |
207 | 0 | return MsgValueError; |
208 | 0 | } |
209 | 0 | // Sentinel = 'host' |
210 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4070301394)))) { |
211 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'URIParams'"); |
212 | 0 | return MsgValueError; |
213 | 0 | } |
214 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(channelURI)))))) { |
215 | 0 | FatalError("Error deserializing 'OptionalURIParams'"); |
216 | 0 | return MsgValueError; |
217 | 0 | } |
218 | 0 | // Sentinel = 'channelURI' |
219 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 692955771)))) { |
220 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'OptionalURIParams'"); |
221 | 0 | return MsgValueError; |
222 | 0 | } |
223 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(isForeign)))))) { |
224 | 0 | FatalError("Error deserializing 'bool'"); |
225 | 0 | return MsgValueError; |
226 | 0 | } |
227 | 0 | // Sentinel = 'isForeign' |
228 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1880140857)))) { |
229 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); |
230 | 0 | return MsgValueError; |
231 | 0 | } |
232 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(isTrackingResource)))))) { |
233 | 0 | FatalError("Error deserializing 'bool'"); |
234 | 0 | return MsgValueError; |
235 | 0 | } |
236 | 0 | // Sentinel = 'isTrackingResource' |
237 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4226279281)))) { |
238 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); |
239 | 0 | return MsgValueError; |
240 | 0 | } |
241 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(firstPartyStorageAccessGranted)))))) { |
242 | 0 | FatalError("Error deserializing 'bool'"); |
243 | 0 | return MsgValueError; |
244 | 0 | } |
245 | 0 | // Sentinel = 'firstPartyStorageAccessGranted' |
246 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2622166554)))) { |
247 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); |
248 | 0 | return MsgValueError; |
249 | 0 | } |
250 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(cookieString)))))) { |
251 | 0 | FatalError("Error deserializing 'nsCString'"); |
252 | 0 | return MsgValueError; |
253 | 0 | } |
254 | 0 | // Sentinel = 'cookieString' |
255 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1411687009)))) { |
256 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
257 | 0 | return MsgValueError; |
258 | 0 | } |
259 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(serverTime)))))) { |
260 | 0 | FatalError("Error deserializing 'nsCString'"); |
261 | 0 | return MsgValueError; |
262 | 0 | } |
263 | 0 | // Sentinel = 'serverTime' |
264 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2435914796)))) { |
265 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
266 | 0 | return MsgValueError; |
267 | 0 | } |
268 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(attrs)))))) { |
269 | 0 | FatalError("Error deserializing 'OriginAttributes'"); |
270 | 0 | return MsgValueError; |
271 | 0 | } |
272 | 0 | // Sentinel = 'attrs' |
273 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3014987797)))) { |
274 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'OriginAttributes'"); |
275 | 0 | return MsgValueError; |
276 | 0 | } |
277 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aFromHttp)))))) { |
278 | 0 | FatalError("Error deserializing 'bool'"); |
279 | 0 | return MsgValueError; |
280 | 0 | } |
281 | 0 | // Sentinel = 'aFromHttp' |
282 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1692552316)))) { |
283 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); |
284 | 0 | return MsgValueError; |
285 | 0 | } |
286 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
287 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
288 | 0 | FatalError("Transition error"); |
289 | 0 | return MsgValueError; |
290 | 0 | } |
291 | 0 | if ((!(RecvSetCookieString(host, channelURI, isForeign, isTrackingResource, firstPartyStorageAccessGranted, cookieString, serverTime, attrs, aFromHttp)))) { |
292 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
293 | 0 | // Error handled in mozilla::ipc::IPCResult |
294 | 0 | return MsgProcessingError; |
295 | 0 | } |
296 | 0 | |
297 | 0 | return MsgProcessed; |
298 | 0 | } |
299 | 0 | case PCookieService::Msg_PrepareCookieList__ID: |
300 | 0 | { |
301 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCookieServiceParent")) { |
302 | 0 | mozilla::ipc::LogMessageForProtocol("PCookieServiceParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
303 | 0 | } |
304 | 0 | AUTO_PROFILER_LABEL("PCookieService::Msg_PrepareCookieList", OTHER); |
305 | 0 |
|
306 | 0 | PickleIterator iter__(msg__); |
307 | 0 | URIParams host; |
308 | 0 | bool isForeign; |
309 | 0 | bool isTrackingResource; |
310 | 0 | bool firstPartyStorageAccessGranted; |
311 | 0 | bool isSafeTopLevelNav; |
312 | 0 | bool isSameSiteForeign; |
313 | 0 | OriginAttributes attrs; |
314 | 0 |
|
315 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(host)))))) { |
316 | 0 | FatalError("Error deserializing 'URIParams'"); |
317 | 0 | return MsgValueError; |
318 | 0 | } |
319 | 0 | // Sentinel = 'host' |
320 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4070301394)))) { |
321 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'URIParams'"); |
322 | 0 | return MsgValueError; |
323 | 0 | } |
324 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(isForeign)))))) { |
325 | 0 | FatalError("Error deserializing 'bool'"); |
326 | 0 | return MsgValueError; |
327 | 0 | } |
328 | 0 | // Sentinel = 'isForeign' |
329 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1880140857)))) { |
330 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); |
331 | 0 | return MsgValueError; |
332 | 0 | } |
333 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(isTrackingResource)))))) { |
334 | 0 | FatalError("Error deserializing 'bool'"); |
335 | 0 | return MsgValueError; |
336 | 0 | } |
337 | 0 | // Sentinel = 'isTrackingResource' |
338 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4226279281)))) { |
339 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); |
340 | 0 | return MsgValueError; |
341 | 0 | } |
342 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(firstPartyStorageAccessGranted)))))) { |
343 | 0 | FatalError("Error deserializing 'bool'"); |
344 | 0 | return MsgValueError; |
345 | 0 | } |
346 | 0 | // Sentinel = 'firstPartyStorageAccessGranted' |
347 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2622166554)))) { |
348 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); |
349 | 0 | return MsgValueError; |
350 | 0 | } |
351 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(isSafeTopLevelNav)))))) { |
352 | 0 | FatalError("Error deserializing 'bool'"); |
353 | 0 | return MsgValueError; |
354 | 0 | } |
355 | 0 | // Sentinel = 'isSafeTopLevelNav' |
356 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1719103480)))) { |
357 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); |
358 | 0 | return MsgValueError; |
359 | 0 | } |
360 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(isSameSiteForeign)))))) { |
361 | 0 | FatalError("Error deserializing 'bool'"); |
362 | 0 | return MsgValueError; |
363 | 0 | } |
364 | 0 | // Sentinel = 'isSameSiteForeign' |
365 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 834350288)))) { |
366 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); |
367 | 0 | return MsgValueError; |
368 | 0 | } |
369 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(attrs)))))) { |
370 | 0 | FatalError("Error deserializing 'OriginAttributes'"); |
371 | 0 | return MsgValueError; |
372 | 0 | } |
373 | 0 | // Sentinel = 'attrs' |
374 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3014987797)))) { |
375 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'OriginAttributes'"); |
376 | 0 | return MsgValueError; |
377 | 0 | } |
378 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
379 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
380 | 0 | FatalError("Transition error"); |
381 | 0 | return MsgValueError; |
382 | 0 | } |
383 | 0 | if ((!(RecvPrepareCookieList(host, isForeign, isTrackingResource, firstPartyStorageAccessGranted, isSafeTopLevelNav, isSameSiteForeign, attrs)))) { |
384 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
385 | 0 | // Error handled in mozilla::ipc::IPCResult |
386 | 0 | return MsgProcessingError; |
387 | 0 | } |
388 | 0 | |
389 | 0 | return MsgProcessed; |
390 | 0 | } |
391 | 0 | case PCookieService::Msg___delete____ID: |
392 | 0 | { |
393 | 0 | if (mozilla::ipc::LoggingEnabledFor("PCookieServiceParent")) { |
394 | 0 | mozilla::ipc::LogMessageForProtocol("PCookieServiceParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
395 | 0 | } |
396 | 0 | AUTO_PROFILER_LABEL("PCookieService::Msg___delete__", OTHER); |
397 | 0 |
|
398 | 0 | PickleIterator iter__(msg__); |
399 | 0 | PCookieServiceParent* actor; |
400 | 0 |
|
401 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) { |
402 | 0 | FatalError("Error deserializing 'PCookieServiceParent'"); |
403 | 0 | return MsgValueError; |
404 | 0 | } |
405 | 0 | if ((!((*((&(actor))))))) { |
406 | 0 | FatalError("Error deserializing 'PCookieServiceParent'"); |
407 | 0 | return MsgValueError; |
408 | 0 | } |
409 | 0 | // Sentinel = 'actor' |
410 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
411 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PCookieServiceParent'"); |
412 | 0 | return MsgValueError; |
413 | 0 | } |
414 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
415 | 0 | if ((!(StateTransition(true, (&(mLivenessState)))))) { |
416 | 0 | FatalError("Transition error"); |
417 | 0 | return MsgValueError; |
418 | 0 | } |
419 | 0 | if ((!(Recv__delete__()))) { |
420 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
421 | 0 | // Error handled in mozilla::ipc::IPCResult |
422 | 0 | return MsgProcessingError; |
423 | 0 | } |
424 | 0 | |
425 | 0 | |
426 | 0 | IProtocol* mgr = (actor)->Manager(); |
427 | 0 | (actor)->DestroySubtree(Deletion); |
428 | 0 | (actor)->DeallocSubtree(); |
429 | 0 | (mgr)->RemoveManagee(PCookieServiceMsgStart, actor); |
430 | 0 |
|
431 | 0 | return MsgProcessed; |
432 | 0 | } |
433 | 0 | default: |
434 | 0 | { |
435 | 0 | return MsgNotKnown; |
436 | 0 | } |
437 | 0 | } |
438 | 0 | } |
439 | | |
440 | | auto PCookieServiceParent::OnMessageReceived( |
441 | | const Message& msg__, |
442 | | Message*& reply__) -> PCookieServiceParent::Result |
443 | 0 | { |
444 | 0 | return MsgNotKnown; |
445 | 0 | } |
446 | | |
447 | | auto PCookieServiceParent::OnCallReceived( |
448 | | const Message& msg__, |
449 | | Message*& reply__) -> PCookieServiceParent::Result |
450 | 0 | { |
451 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
452 | 0 | return MsgNotKnown; |
453 | 0 | } |
454 | | |
455 | | auto PCookieServiceParent::GetProtocolTypeId() -> int32_t |
456 | 0 | { |
457 | 0 | return PCookieServiceMsgStart; |
458 | 0 | } |
459 | | |
460 | | auto PCookieServiceParent::DestroySubtree(ActorDestroyReason why) -> void |
461 | 0 | { |
462 | 0 | // Unregister from our manager. |
463 | 0 | Unregister(Id()); |
464 | 0 |
|
465 | 0 | // Reject owning pending responses. |
466 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
467 | 0 |
|
468 | 0 | // Finally, destroy "us". |
469 | 0 | ActorDestroy(why); |
470 | 0 | } |
471 | | |
472 | | auto PCookieServiceParent::DeallocSubtree() -> void |
473 | 0 | { |
474 | 0 | } |
475 | | |
476 | | |
477 | | |
478 | | } // namespace net |
479 | | } // namespace mozilla |
480 | | namespace mozilla { |
481 | | namespace ipc { |
482 | | auto IPDLParamTraits<mozilla::net::PCookieServiceParent>::Write( |
483 | | IPC::Message* aMsg, |
484 | | mozilla::ipc::IProtocol* aActor, |
485 | | const paramType& aVar) -> void |
486 | 0 | { |
487 | 0 | int32_t id; |
488 | 0 | if ((!(aVar))) { |
489 | 0 | id = 0; |
490 | 0 | } |
491 | 0 | else { |
492 | 0 | id = (aVar)->Id(); |
493 | 0 | if ((1) == (id)) { |
494 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
495 | 0 | } |
496 | 0 | } |
497 | 0 | WriteIPDLParam(aMsg, aActor, id); |
498 | 0 | } |
499 | | |
500 | | auto IPDLParamTraits<mozilla::net::PCookieServiceParent>::Read( |
501 | | const IPC::Message* aMsg, |
502 | | PickleIterator* aIter, |
503 | | mozilla::ipc::IProtocol* aActor, |
504 | | paramType* aVar) -> bool |
505 | 0 | { |
506 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PCookieService", PCookieServiceMsgStart); |
507 | 0 | if ((actor).isNothing()) { |
508 | 0 | return false; |
509 | 0 | } |
510 | 0 | |
511 | 0 | (*(aVar)) = static_cast<mozilla::net::PCookieServiceParent*>((actor).value()); |
512 | 0 | return true; |
513 | 0 | } |
514 | | |
515 | | } // namespace ipc |
516 | | } // namespace mozilla |