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