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