/work/obj-fuzz/ipc/ipdl/PBackgroundStorageChild.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // |
2 | | // Automatically generated by ipdlc. |
3 | | // Edit at your own risk |
4 | | // |
5 | | |
6 | | |
7 | | #include "mozilla/dom/PBackgroundStorageChild.h" |
8 | | |
9 | | #include "mozilla/ipc/PBackgroundChild.h" |
10 | | |
11 | | #include "nsIFile.h" |
12 | | #include "GeckoProfiler.h" |
13 | | |
14 | | namespace mozilla { |
15 | | namespace dom { |
16 | | |
17 | | |
18 | | auto PBackgroundStorageChild::Recv__delete__() -> mozilla::ipc::IPCResult |
19 | 0 | { |
20 | 0 | return IPC_OK(); |
21 | 0 | } |
22 | | |
23 | | auto PBackgroundStorageChild::ActorDestroy(ActorDestroyReason aWhy) -> void |
24 | 0 | { |
25 | 0 | } |
26 | | |
27 | | MOZ_IMPLICIT PBackgroundStorageChild::PBackgroundStorageChild() : |
28 | | mozilla::ipc::IProtocol(mozilla::ipc::ChildSide), |
29 | | mLivenessState(mozilla::ipc::LivenessState::Dead) |
30 | 0 | { |
31 | 0 | MOZ_COUNT_CTOR(PBackgroundStorageChild); |
32 | 0 | } |
33 | | |
34 | | PBackgroundStorageChild::~PBackgroundStorageChild() |
35 | 0 | { |
36 | 0 | MOZ_COUNT_DTOR(PBackgroundStorageChild); |
37 | 0 | } |
38 | | |
39 | | auto PBackgroundStorageChild::Manager() const -> PBackgroundChild* |
40 | 0 | { |
41 | 0 | return static_cast<PBackgroundChild*>(IProtocol::Manager()); |
42 | 0 | } |
43 | | |
44 | | auto PBackgroundStorageChild::SendDeleteMe() -> bool |
45 | 0 | { |
46 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_DeleteMe(Id()); |
47 | 0 |
|
48 | 0 |
|
49 | 0 |
|
50 | 0 |
|
51 | 0 |
|
52 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
53 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
54 | 0 | } |
55 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_DeleteMe", OTHER); |
56 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
57 | 0 | mozilla::ipc::LogicError("Transition error"); |
58 | 0 | } |
59 | 0 |
|
60 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
61 | 0 | return sendok__; |
62 | 0 | } |
63 | | |
64 | | auto PBackgroundStorageChild::SendPreload( |
65 | | const nsCString& originSuffix, |
66 | | const nsCString& originNoSuffix, |
67 | | const uint32_t& alreadyLoadedCount, |
68 | | nsTArray<nsString>* keys, |
69 | | nsTArray<nsString>* values, |
70 | | nsresult* rv) -> bool |
71 | 0 | { |
72 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_Preload(Id()); |
73 | 0 |
|
74 | 0 | WriteIPDLParam(msg__, this, originSuffix); |
75 | 0 | // Sentinel = 'originSuffix' |
76 | 0 | (msg__)->WriteSentinel(4013336113); |
77 | 0 | WriteIPDLParam(msg__, this, originNoSuffix); |
78 | 0 | // Sentinel = 'originNoSuffix' |
79 | 0 | (msg__)->WriteSentinel(2833071422); |
80 | 0 | WriteIPDLParam(msg__, this, alreadyLoadedCount); |
81 | 0 | // Sentinel = 'alreadyLoadedCount' |
82 | 0 | (msg__)->WriteSentinel(1974303722); |
83 | 0 |
|
84 | 0 |
|
85 | 0 |
|
86 | 0 | Message reply__; |
87 | 0 |
|
88 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
89 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
90 | 0 | } |
91 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_Preload", OTHER); |
92 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
93 | 0 | mozilla::ipc::LogicError("Transition error"); |
94 | 0 | } |
95 | 0 |
|
96 | 0 | bool sendok__; |
97 | 0 | { |
98 | 0 | AUTO_PROFILER_TRACING("IPC", "PBackgroundStorage::Msg_Preload"); |
99 | 0 | sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__))); |
100 | 0 | } |
101 | 0 | if ((!(sendok__))) { |
102 | 0 | return false; |
103 | 0 | } |
104 | 0 | |
105 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
106 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
107 | 0 | } |
108 | 0 |
|
109 | 0 | PickleIterator iter__(reply__); |
110 | 0 |
|
111 | 0 | if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, keys)))) { |
112 | 0 | FatalError("Error deserializing 'nsTArray'"); |
113 | 0 | return false; |
114 | 0 | } |
115 | 0 | // Sentinel = 'keys' |
116 | 0 | if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 1552012744)))) { |
117 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'"); |
118 | 0 | return false; |
119 | 0 | } |
120 | 0 | if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, values)))) { |
121 | 0 | FatalError("Error deserializing 'nsTArray'"); |
122 | 0 | return false; |
123 | 0 | } |
124 | 0 | // Sentinel = 'values' |
125 | 0 | if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3006433652)))) { |
126 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'"); |
127 | 0 | return false; |
128 | 0 | } |
129 | 0 | if ((!(ReadIPDLParam((&(reply__)), (&(iter__)), this, rv)))) { |
130 | 0 | FatalError("Error deserializing 'nsresult'"); |
131 | 0 | return false; |
132 | 0 | } |
133 | 0 | // Sentinel = 'rv' |
134 | 0 | if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 702481058)))) { |
135 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'"); |
136 | 0 | return false; |
137 | 0 | } |
138 | 0 | (reply__).EndRead(iter__, (reply__).type()); |
139 | 0 |
|
140 | 0 | return true; |
141 | 0 | } |
142 | | |
143 | | auto PBackgroundStorageChild::SendAsyncPreload( |
144 | | const nsCString& originSuffix, |
145 | | const nsCString& originNoSuffix, |
146 | | const bool& priority) -> bool |
147 | 0 | { |
148 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_AsyncPreload(Id()); |
149 | 0 |
|
150 | 0 | WriteIPDLParam(msg__, this, originSuffix); |
151 | 0 | // Sentinel = 'originSuffix' |
152 | 0 | (msg__)->WriteSentinel(4013336113); |
153 | 0 | WriteIPDLParam(msg__, this, originNoSuffix); |
154 | 0 | // Sentinel = 'originNoSuffix' |
155 | 0 | (msg__)->WriteSentinel(2833071422); |
156 | 0 | WriteIPDLParam(msg__, this, priority); |
157 | 0 | // Sentinel = 'priority' |
158 | 0 | (msg__)->WriteSentinel(558136112); |
159 | 0 |
|
160 | 0 |
|
161 | 0 |
|
162 | 0 |
|
163 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
164 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
165 | 0 | } |
166 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_AsyncPreload", OTHER); |
167 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
168 | 0 | mozilla::ipc::LogicError("Transition error"); |
169 | 0 | } |
170 | 0 |
|
171 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
172 | 0 | return sendok__; |
173 | 0 | } |
174 | | |
175 | | auto PBackgroundStorageChild::SendAsyncGetUsage(const nsCString& scope) -> bool |
176 | 0 | { |
177 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_AsyncGetUsage(Id()); |
178 | 0 |
|
179 | 0 | WriteIPDLParam(msg__, this, scope); |
180 | 0 | // Sentinel = 'scope' |
181 | 0 | (msg__)->WriteSentinel(2191984953); |
182 | 0 |
|
183 | 0 |
|
184 | 0 |
|
185 | 0 |
|
186 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
187 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
188 | 0 | } |
189 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_AsyncGetUsage", OTHER); |
190 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
191 | 0 | mozilla::ipc::LogicError("Transition error"); |
192 | 0 | } |
193 | 0 |
|
194 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
195 | 0 | return sendok__; |
196 | 0 | } |
197 | | |
198 | | auto PBackgroundStorageChild::SendAsyncAddItem( |
199 | | const nsCString& originSuffix, |
200 | | const nsCString& originNoSuffix, |
201 | | const nsString& key, |
202 | | const nsString& value) -> bool |
203 | 0 | { |
204 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_AsyncAddItem(Id()); |
205 | 0 |
|
206 | 0 | WriteIPDLParam(msg__, this, originSuffix); |
207 | 0 | // Sentinel = 'originSuffix' |
208 | 0 | (msg__)->WriteSentinel(4013336113); |
209 | 0 | WriteIPDLParam(msg__, this, originNoSuffix); |
210 | 0 | // Sentinel = 'originNoSuffix' |
211 | 0 | (msg__)->WriteSentinel(2833071422); |
212 | 0 | WriteIPDLParam(msg__, this, key); |
213 | 0 | // Sentinel = 'key' |
214 | 0 | (msg__)->WriteSentinel(35142870); |
215 | 0 | WriteIPDLParam(msg__, this, value); |
216 | 0 | // Sentinel = 'value' |
217 | 0 | (msg__)->WriteSentinel(3456818542); |
218 | 0 |
|
219 | 0 |
|
220 | 0 |
|
221 | 0 |
|
222 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
223 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
224 | 0 | } |
225 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_AsyncAddItem", OTHER); |
226 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
227 | 0 | mozilla::ipc::LogicError("Transition error"); |
228 | 0 | } |
229 | 0 |
|
230 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
231 | 0 | return sendok__; |
232 | 0 | } |
233 | | |
234 | | auto PBackgroundStorageChild::SendAsyncUpdateItem( |
235 | | const nsCString& originSuffix, |
236 | | const nsCString& originNoSuffix, |
237 | | const nsString& key, |
238 | | const nsString& value) -> bool |
239 | 0 | { |
240 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_AsyncUpdateItem(Id()); |
241 | 0 |
|
242 | 0 | WriteIPDLParam(msg__, this, originSuffix); |
243 | 0 | // Sentinel = 'originSuffix' |
244 | 0 | (msg__)->WriteSentinel(4013336113); |
245 | 0 | WriteIPDLParam(msg__, this, originNoSuffix); |
246 | 0 | // Sentinel = 'originNoSuffix' |
247 | 0 | (msg__)->WriteSentinel(2833071422); |
248 | 0 | WriteIPDLParam(msg__, this, key); |
249 | 0 | // Sentinel = 'key' |
250 | 0 | (msg__)->WriteSentinel(35142870); |
251 | 0 | WriteIPDLParam(msg__, this, value); |
252 | 0 | // Sentinel = 'value' |
253 | 0 | (msg__)->WriteSentinel(3456818542); |
254 | 0 |
|
255 | 0 |
|
256 | 0 |
|
257 | 0 |
|
258 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
259 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
260 | 0 | } |
261 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_AsyncUpdateItem", OTHER); |
262 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
263 | 0 | mozilla::ipc::LogicError("Transition error"); |
264 | 0 | } |
265 | 0 |
|
266 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
267 | 0 | return sendok__; |
268 | 0 | } |
269 | | |
270 | | auto PBackgroundStorageChild::SendAsyncRemoveItem( |
271 | | const nsCString& originSuffix, |
272 | | const nsCString& originNoSuffix, |
273 | | const nsString& key) -> bool |
274 | 0 | { |
275 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_AsyncRemoveItem(Id()); |
276 | 0 |
|
277 | 0 | WriteIPDLParam(msg__, this, originSuffix); |
278 | 0 | // Sentinel = 'originSuffix' |
279 | 0 | (msg__)->WriteSentinel(4013336113); |
280 | 0 | WriteIPDLParam(msg__, this, originNoSuffix); |
281 | 0 | // Sentinel = 'originNoSuffix' |
282 | 0 | (msg__)->WriteSentinel(2833071422); |
283 | 0 | WriteIPDLParam(msg__, this, key); |
284 | 0 | // Sentinel = 'key' |
285 | 0 | (msg__)->WriteSentinel(35142870); |
286 | 0 |
|
287 | 0 |
|
288 | 0 |
|
289 | 0 |
|
290 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
291 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
292 | 0 | } |
293 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_AsyncRemoveItem", OTHER); |
294 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
295 | 0 | mozilla::ipc::LogicError("Transition error"); |
296 | 0 | } |
297 | 0 |
|
298 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
299 | 0 | return sendok__; |
300 | 0 | } |
301 | | |
302 | | auto PBackgroundStorageChild::SendAsyncClear( |
303 | | const nsCString& originSuffix, |
304 | | const nsCString& originNoSuffix) -> bool |
305 | 0 | { |
306 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_AsyncClear(Id()); |
307 | 0 |
|
308 | 0 | WriteIPDLParam(msg__, this, originSuffix); |
309 | 0 | // Sentinel = 'originSuffix' |
310 | 0 | (msg__)->WriteSentinel(4013336113); |
311 | 0 | WriteIPDLParam(msg__, this, originNoSuffix); |
312 | 0 | // Sentinel = 'originNoSuffix' |
313 | 0 | (msg__)->WriteSentinel(2833071422); |
314 | 0 |
|
315 | 0 |
|
316 | 0 |
|
317 | 0 |
|
318 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
319 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
320 | 0 | } |
321 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_AsyncClear", OTHER); |
322 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
323 | 0 | mozilla::ipc::LogicError("Transition error"); |
324 | 0 | } |
325 | 0 |
|
326 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
327 | 0 | return sendok__; |
328 | 0 | } |
329 | | |
330 | | auto PBackgroundStorageChild::SendAsyncFlush() -> bool |
331 | 0 | { |
332 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_AsyncFlush(Id()); |
333 | 0 |
|
334 | 0 |
|
335 | 0 |
|
336 | 0 |
|
337 | 0 |
|
338 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
339 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
340 | 0 | } |
341 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_AsyncFlush", OTHER); |
342 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
343 | 0 | mozilla::ipc::LogicError("Transition error"); |
344 | 0 | } |
345 | 0 |
|
346 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
347 | 0 | return sendok__; |
348 | 0 | } |
349 | | |
350 | | auto PBackgroundStorageChild::SendStartup() -> bool |
351 | 0 | { |
352 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_Startup(Id()); |
353 | 0 |
|
354 | 0 |
|
355 | 0 |
|
356 | 0 |
|
357 | 0 |
|
358 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
359 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
360 | 0 | } |
361 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_Startup", OTHER); |
362 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
363 | 0 | mozilla::ipc::LogicError("Transition error"); |
364 | 0 | } |
365 | 0 |
|
366 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
367 | 0 | return sendok__; |
368 | 0 | } |
369 | | |
370 | | auto PBackgroundStorageChild::SendClearAll() -> bool |
371 | 0 | { |
372 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_ClearAll(Id()); |
373 | 0 |
|
374 | 0 |
|
375 | 0 |
|
376 | 0 |
|
377 | 0 |
|
378 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
379 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
380 | 0 | } |
381 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_ClearAll", OTHER); |
382 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
383 | 0 | mozilla::ipc::LogicError("Transition error"); |
384 | 0 | } |
385 | 0 |
|
386 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
387 | 0 | return sendok__; |
388 | 0 | } |
389 | | |
390 | | auto PBackgroundStorageChild::SendClearMatchingOrigin(const nsCString& originNoSuffix) -> bool |
391 | 0 | { |
392 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_ClearMatchingOrigin(Id()); |
393 | 0 |
|
394 | 0 | WriteIPDLParam(msg__, this, originNoSuffix); |
395 | 0 | // Sentinel = 'originNoSuffix' |
396 | 0 | (msg__)->WriteSentinel(2833071422); |
397 | 0 |
|
398 | 0 |
|
399 | 0 |
|
400 | 0 |
|
401 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
402 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
403 | 0 | } |
404 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_ClearMatchingOrigin", OTHER); |
405 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
406 | 0 | mozilla::ipc::LogicError("Transition error"); |
407 | 0 | } |
408 | 0 |
|
409 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
410 | 0 | return sendok__; |
411 | 0 | } |
412 | | |
413 | | auto PBackgroundStorageChild::SendClearMatchingOriginAttributes(const OriginAttributesPattern& pattern) -> bool |
414 | 0 | { |
415 | 0 | IPC::Message* msg__ = PBackgroundStorage::Msg_ClearMatchingOriginAttributes(Id()); |
416 | 0 |
|
417 | 0 | WriteIPDLParam(msg__, this, pattern); |
418 | 0 | // Sentinel = 'pattern' |
419 | 0 | (msg__)->WriteSentinel(2105892009); |
420 | 0 |
|
421 | 0 |
|
422 | 0 |
|
423 | 0 |
|
424 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
425 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending); |
426 | 0 | } |
427 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_ClearMatchingOriginAttributes", OTHER); |
428 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
429 | 0 | mozilla::ipc::LogicError("Transition error"); |
430 | 0 | } |
431 | 0 |
|
432 | 0 | bool sendok__ = (GetIPCChannel())->Send(msg__); |
433 | 0 | return sendok__; |
434 | 0 | } |
435 | | |
436 | | auto PBackgroundStorageChild::RemoveManagee( |
437 | | int32_t aProtocolId, |
438 | | IProtocol* aListener) -> void |
439 | 0 | { |
440 | 0 | FatalError("unreached"); |
441 | 0 | return; |
442 | 0 | } |
443 | | |
444 | | auto PBackgroundStorageChild::OnMessageReceived(const Message& msg__) -> PBackgroundStorageChild::Result |
445 | 0 | { |
446 | 0 | switch ((msg__).type()) { |
447 | 0 | case PBackgroundStorage::Msg___delete____ID: |
448 | 0 | { |
449 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
450 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
451 | 0 | } |
452 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg___delete__", OTHER); |
453 | 0 |
|
454 | 0 | PickleIterator iter__(msg__); |
455 | 0 | PBackgroundStorageChild* actor; |
456 | 0 |
|
457 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) { |
458 | 0 | FatalError("Error deserializing 'PBackgroundStorageChild'"); |
459 | 0 | return MsgValueError; |
460 | 0 | } |
461 | 0 | if ((!((*((&(actor))))))) { |
462 | 0 | FatalError("Error deserializing 'PBackgroundStorageChild'"); |
463 | 0 | return MsgValueError; |
464 | 0 | } |
465 | 0 | // Sentinel = 'actor' |
466 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) { |
467 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'PBackgroundStorageChild'"); |
468 | 0 | return MsgValueError; |
469 | 0 | } |
470 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
471 | 0 | if ((!(StateTransition(true, (&(mLivenessState)))))) { |
472 | 0 | FatalError("Transition error"); |
473 | 0 | return MsgValueError; |
474 | 0 | } |
475 | 0 | if ((!(Recv__delete__()))) { |
476 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
477 | 0 | // Error handled in mozilla::ipc::IPCResult |
478 | 0 | return MsgProcessingError; |
479 | 0 | } |
480 | 0 | |
481 | 0 | |
482 | 0 | IProtocol* mgr = (actor)->Manager(); |
483 | 0 | (actor)->DestroySubtree(Deletion); |
484 | 0 | (actor)->DeallocSubtree(); |
485 | 0 | (mgr)->RemoveManagee(PBackgroundStorageMsgStart, actor); |
486 | 0 |
|
487 | 0 | return MsgProcessed; |
488 | 0 | } |
489 | 0 | case PBackgroundStorage::Msg_Observe__ID: |
490 | 0 | { |
491 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
492 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
493 | 0 | } |
494 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_Observe", OTHER); |
495 | 0 |
|
496 | 0 | PickleIterator iter__(msg__); |
497 | 0 | nsCString topic; |
498 | 0 | nsString originAttributesPattern; |
499 | 0 | nsCString originScope; |
500 | 0 |
|
501 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(topic)))))) { |
502 | 0 | FatalError("Error deserializing 'nsCString'"); |
503 | 0 | return MsgValueError; |
504 | 0 | } |
505 | 0 | // Sentinel = 'topic' |
506 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 261826960)))) { |
507 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
508 | 0 | return MsgValueError; |
509 | 0 | } |
510 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originAttributesPattern)))))) { |
511 | 0 | FatalError("Error deserializing 'nsString'"); |
512 | 0 | return MsgValueError; |
513 | 0 | } |
514 | 0 | // Sentinel = 'originAttributesPattern' |
515 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1130778426)))) { |
516 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsString'"); |
517 | 0 | return MsgValueError; |
518 | 0 | } |
519 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originScope)))))) { |
520 | 0 | FatalError("Error deserializing 'nsCString'"); |
521 | 0 | return MsgValueError; |
522 | 0 | } |
523 | 0 | // Sentinel = 'originScope' |
524 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1301332537)))) { |
525 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
526 | 0 | return MsgValueError; |
527 | 0 | } |
528 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
529 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
530 | 0 | FatalError("Transition error"); |
531 | 0 | return MsgValueError; |
532 | 0 | } |
533 | 0 | if ((!(RecvObserve(topic, originAttributesPattern, originScope)))) { |
534 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
535 | 0 | // Error handled in mozilla::ipc::IPCResult |
536 | 0 | return MsgProcessingError; |
537 | 0 | } |
538 | 0 | |
539 | 0 | return MsgProcessed; |
540 | 0 | } |
541 | 0 | case PBackgroundStorage::Msg_OriginsHavingData__ID: |
542 | 0 | { |
543 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
544 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
545 | 0 | } |
546 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_OriginsHavingData", OTHER); |
547 | 0 |
|
548 | 0 | PickleIterator iter__(msg__); |
549 | 0 | nsTArray<nsCString> origins; |
550 | 0 |
|
551 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(origins)))))) { |
552 | 0 | FatalError("Error deserializing 'nsTArray'"); |
553 | 0 | return MsgValueError; |
554 | 0 | } |
555 | 0 | // Sentinel = 'origins' |
556 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1146949350)))) { |
557 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'"); |
558 | 0 | return MsgValueError; |
559 | 0 | } |
560 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
561 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
562 | 0 | FatalError("Transition error"); |
563 | 0 | return MsgValueError; |
564 | 0 | } |
565 | 0 | if ((!(RecvOriginsHavingData(std::move(origins))))) { |
566 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
567 | 0 | // Error handled in mozilla::ipc::IPCResult |
568 | 0 | return MsgProcessingError; |
569 | 0 | } |
570 | 0 | |
571 | 0 | return MsgProcessed; |
572 | 0 | } |
573 | 0 | case PBackgroundStorage::Msg_LoadItem__ID: |
574 | 0 | { |
575 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
576 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
577 | 0 | } |
578 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_LoadItem", OTHER); |
579 | 0 |
|
580 | 0 | PickleIterator iter__(msg__); |
581 | 0 | nsCString originSuffix; |
582 | 0 | nsCString originNoSuffix; |
583 | 0 | nsString key; |
584 | 0 | nsString value; |
585 | 0 |
|
586 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originSuffix)))))) { |
587 | 0 | FatalError("Error deserializing 'nsCString'"); |
588 | 0 | return MsgValueError; |
589 | 0 | } |
590 | 0 | // Sentinel = 'originSuffix' |
591 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4013336113)))) { |
592 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
593 | 0 | return MsgValueError; |
594 | 0 | } |
595 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originNoSuffix)))))) { |
596 | 0 | FatalError("Error deserializing 'nsCString'"); |
597 | 0 | return MsgValueError; |
598 | 0 | } |
599 | 0 | // Sentinel = 'originNoSuffix' |
600 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2833071422)))) { |
601 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
602 | 0 | return MsgValueError; |
603 | 0 | } |
604 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(key)))))) { |
605 | 0 | FatalError("Error deserializing 'nsString'"); |
606 | 0 | return MsgValueError; |
607 | 0 | } |
608 | 0 | // Sentinel = 'key' |
609 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 35142870)))) { |
610 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsString'"); |
611 | 0 | return MsgValueError; |
612 | 0 | } |
613 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(value)))))) { |
614 | 0 | FatalError("Error deserializing 'nsString'"); |
615 | 0 | return MsgValueError; |
616 | 0 | } |
617 | 0 | // Sentinel = 'value' |
618 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3456818542)))) { |
619 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsString'"); |
620 | 0 | return MsgValueError; |
621 | 0 | } |
622 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
623 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
624 | 0 | FatalError("Transition error"); |
625 | 0 | return MsgValueError; |
626 | 0 | } |
627 | 0 | if ((!(RecvLoadItem(originSuffix, originNoSuffix, key, value)))) { |
628 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
629 | 0 | // Error handled in mozilla::ipc::IPCResult |
630 | 0 | return MsgProcessingError; |
631 | 0 | } |
632 | 0 | |
633 | 0 | return MsgProcessed; |
634 | 0 | } |
635 | 0 | case PBackgroundStorage::Msg_LoadDone__ID: |
636 | 0 | { |
637 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
638 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
639 | 0 | } |
640 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_LoadDone", OTHER); |
641 | 0 |
|
642 | 0 | PickleIterator iter__(msg__); |
643 | 0 | nsCString originSuffix; |
644 | 0 | nsCString originNoSuffix; |
645 | 0 | nsresult rv; |
646 | 0 |
|
647 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originSuffix)))))) { |
648 | 0 | FatalError("Error deserializing 'nsCString'"); |
649 | 0 | return MsgValueError; |
650 | 0 | } |
651 | 0 | // Sentinel = 'originSuffix' |
652 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4013336113)))) { |
653 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
654 | 0 | return MsgValueError; |
655 | 0 | } |
656 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(originNoSuffix)))))) { |
657 | 0 | FatalError("Error deserializing 'nsCString'"); |
658 | 0 | return MsgValueError; |
659 | 0 | } |
660 | 0 | // Sentinel = 'originNoSuffix' |
661 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2833071422)))) { |
662 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
663 | 0 | return MsgValueError; |
664 | 0 | } |
665 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(rv)))))) { |
666 | 0 | FatalError("Error deserializing 'nsresult'"); |
667 | 0 | return MsgValueError; |
668 | 0 | } |
669 | 0 | // Sentinel = 'rv' |
670 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 702481058)))) { |
671 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'"); |
672 | 0 | return MsgValueError; |
673 | 0 | } |
674 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
675 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
676 | 0 | FatalError("Transition error"); |
677 | 0 | return MsgValueError; |
678 | 0 | } |
679 | 0 | if ((!(RecvLoadDone(originSuffix, originNoSuffix, rv)))) { |
680 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
681 | 0 | // Error handled in mozilla::ipc::IPCResult |
682 | 0 | return MsgProcessingError; |
683 | 0 | } |
684 | 0 | |
685 | 0 | return MsgProcessed; |
686 | 0 | } |
687 | 0 | case PBackgroundStorage::Msg_LoadUsage__ID: |
688 | 0 | { |
689 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
690 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
691 | 0 | } |
692 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_LoadUsage", OTHER); |
693 | 0 |
|
694 | 0 | PickleIterator iter__(msg__); |
695 | 0 | nsCString scope; |
696 | 0 | int64_t usage; |
697 | 0 |
|
698 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(scope)))))) { |
699 | 0 | FatalError("Error deserializing 'nsCString'"); |
700 | 0 | return MsgValueError; |
701 | 0 | } |
702 | 0 | // Sentinel = 'scope' |
703 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2191984953)))) { |
704 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); |
705 | 0 | return MsgValueError; |
706 | 0 | } |
707 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(usage)))))) { |
708 | 0 | FatalError("Error deserializing 'int64_t'"); |
709 | 0 | return MsgValueError; |
710 | 0 | } |
711 | 0 | // Sentinel = 'usage' |
712 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3419176504)))) { |
713 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'int64_t'"); |
714 | 0 | return MsgValueError; |
715 | 0 | } |
716 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
717 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
718 | 0 | FatalError("Transition error"); |
719 | 0 | return MsgValueError; |
720 | 0 | } |
721 | 0 | if ((!(RecvLoadUsage(scope, usage)))) { |
722 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
723 | 0 | // Error handled in mozilla::ipc::IPCResult |
724 | 0 | return MsgProcessingError; |
725 | 0 | } |
726 | 0 | |
727 | 0 | return MsgProcessed; |
728 | 0 | } |
729 | 0 | case PBackgroundStorage::Msg_Error__ID: |
730 | 0 | { |
731 | 0 | if (mozilla::ipc::LoggingEnabledFor("PBackgroundStorageChild")) { |
732 | 0 | mozilla::ipc::LogMessageForProtocol("PBackgroundStorageChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving); |
733 | 0 | } |
734 | 0 | AUTO_PROFILER_LABEL("PBackgroundStorage::Msg_Error", OTHER); |
735 | 0 |
|
736 | 0 | PickleIterator iter__(msg__); |
737 | 0 | nsresult rv; |
738 | 0 |
|
739 | 0 | if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(rv)))))) { |
740 | 0 | FatalError("Error deserializing 'nsresult'"); |
741 | 0 | return MsgValueError; |
742 | 0 | } |
743 | 0 | // Sentinel = 'rv' |
744 | 0 | if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 702481058)))) { |
745 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'"); |
746 | 0 | return MsgValueError; |
747 | 0 | } |
748 | 0 | (msg__).EndRead(iter__, (msg__).type()); |
749 | 0 | if ((!(StateTransition(false, (&(mLivenessState)))))) { |
750 | 0 | FatalError("Transition error"); |
751 | 0 | return MsgValueError; |
752 | 0 | } |
753 | 0 | if ((!(RecvError(rv)))) { |
754 | 0 | mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); |
755 | 0 | // Error handled in mozilla::ipc::IPCResult |
756 | 0 | return MsgProcessingError; |
757 | 0 | } |
758 | 0 | |
759 | 0 | return MsgProcessed; |
760 | 0 | } |
761 | 0 | default: |
762 | 0 | { |
763 | 0 | return MsgNotKnown; |
764 | 0 | } |
765 | 0 | } |
766 | 0 | } |
767 | | |
768 | | auto PBackgroundStorageChild::OnMessageReceived( |
769 | | const Message& msg__, |
770 | | Message*& reply__) -> PBackgroundStorageChild::Result |
771 | 0 | { |
772 | 0 | return MsgNotKnown; |
773 | 0 | } |
774 | | |
775 | | auto PBackgroundStorageChild::OnCallReceived( |
776 | | const Message& msg__, |
777 | | Message*& reply__) -> PBackgroundStorageChild::Result |
778 | 0 | { |
779 | 0 | MOZ_ASSERT_UNREACHABLE("message protocol not supported"); |
780 | 0 | return MsgNotKnown; |
781 | 0 | } |
782 | | |
783 | | auto PBackgroundStorageChild::GetProtocolTypeId() -> int32_t |
784 | 0 | { |
785 | 0 | return PBackgroundStorageMsgStart; |
786 | 0 | } |
787 | | |
788 | | auto PBackgroundStorageChild::DestroySubtree(ActorDestroyReason why) -> void |
789 | 0 | { |
790 | 0 | // Unregister from our manager. |
791 | 0 | Unregister(Id()); |
792 | 0 |
|
793 | 0 | // Reject owning pending responses. |
794 | 0 | (GetIPCChannel())->RejectPendingResponsesForActor(this); |
795 | 0 |
|
796 | 0 | // Finally, destroy "us". |
797 | 0 | ActorDestroy(why); |
798 | 0 | } |
799 | | |
800 | | auto PBackgroundStorageChild::DeallocSubtree() -> void |
801 | 0 | { |
802 | 0 | } |
803 | | |
804 | | |
805 | | |
806 | | } // namespace dom |
807 | | } // namespace mozilla |
808 | | namespace mozilla { |
809 | | namespace ipc { |
810 | | auto IPDLParamTraits<mozilla::dom::PBackgroundStorageChild>::Write( |
811 | | IPC::Message* aMsg, |
812 | | mozilla::ipc::IProtocol* aActor, |
813 | | const paramType& aVar) -> void |
814 | 0 | { |
815 | 0 | int32_t id; |
816 | 0 | if ((!(aVar))) { |
817 | 0 | id = 0; |
818 | 0 | } |
819 | 0 | else { |
820 | 0 | id = (aVar)->Id(); |
821 | 0 | if ((1) == (id)) { |
822 | 0 | (aActor)->FatalError("actor has been |delete|d"); |
823 | 0 | } |
824 | 0 | } |
825 | 0 | WriteIPDLParam(aMsg, aActor, id); |
826 | 0 | } |
827 | | |
828 | | auto IPDLParamTraits<mozilla::dom::PBackgroundStorageChild>::Read( |
829 | | const IPC::Message* aMsg, |
830 | | PickleIterator* aIter, |
831 | | mozilla::ipc::IProtocol* aActor, |
832 | | paramType* aVar) -> bool |
833 | 0 | { |
834 | 0 | mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PBackgroundStorage", PBackgroundStorageMsgStart); |
835 | 0 | if ((actor).isNothing()) { |
836 | 0 | return false; |
837 | 0 | } |
838 | 0 | |
839 | 0 | (*(aVar)) = static_cast<mozilla::dom::PBackgroundStorageChild*>((actor).value()); |
840 | 0 | return true; |
841 | 0 | } |
842 | | |
843 | | } // namespace ipc |
844 | | } // namespace mozilla |