Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/indexedDB/PBackgroundIDBFactoryChild.h"
8 : #include "ipc/IPCMessageUtils.h"
9 :
10 : #include "mozilla/ipc/PBackgroundChild.h"
11 : #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseChild.h"
12 : #include "mozilla/dom/indexedDB/PBackgroundIDBFactoryRequestChild.h"
13 :
14 : #include "nsIFile.h"
15 : #include "GeckoProfiler.h"
16 :
17 : namespace mozilla {
18 : namespace dom {
19 : namespace indexedDB {
20 :
21 :
22 0 : auto PBackgroundIDBFactoryChild::Recv__delete__() -> mozilla::ipc::IPCResult
23 : {
24 0 : return IPC_OK();
25 : }
26 :
27 0 : auto PBackgroundIDBFactoryChild::RecvPBackgroundIDBDatabaseConstructor(
28 : PBackgroundIDBDatabaseChild* actor,
29 : const DatabaseSpec& spec,
30 : PBackgroundIDBFactoryRequestChild* request) -> mozilla::ipc::IPCResult
31 : {
32 0 : return IPC_OK();
33 : }
34 :
35 0 : auto PBackgroundIDBFactoryChild::ActorDestroy(ActorDestroyReason aWhy) -> void
36 : {
37 0 : }
38 :
39 0 : MOZ_IMPLICIT PBackgroundIDBFactoryChild::PBackgroundIDBFactoryChild() :
40 : mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
41 0 : mState(PBackgroundIDBFactory::__Dead)
42 : {
43 0 : MOZ_COUNT_CTOR(PBackgroundIDBFactoryChild);
44 0 : }
45 :
46 0 : PBackgroundIDBFactoryChild::~PBackgroundIDBFactoryChild()
47 : {
48 0 : MOZ_COUNT_DTOR(PBackgroundIDBFactoryChild);
49 0 : }
50 :
51 0 : auto PBackgroundIDBFactoryChild::Manager() const -> PBackgroundChild*
52 : {
53 0 : return static_cast<PBackgroundChild*>(IProtocol::Manager());
54 : }
55 :
56 0 : auto PBackgroundIDBFactoryChild::ManagedPBackgroundIDBDatabaseChild(nsTArray<PBackgroundIDBDatabaseChild*>& aArr) const -> void
57 : {
58 0 : (mManagedPBackgroundIDBDatabaseChild).ToArray(aArr);
59 0 : }
60 :
61 0 : auto PBackgroundIDBFactoryChild::ManagedPBackgroundIDBDatabaseChild() const -> const ManagedContainer<PBackgroundIDBDatabaseChild>&
62 : {
63 0 : return mManagedPBackgroundIDBDatabaseChild;
64 : }
65 :
66 0 : auto PBackgroundIDBFactoryChild::ManagedPBackgroundIDBFactoryRequestChild(nsTArray<PBackgroundIDBFactoryRequestChild*>& aArr) const -> void
67 : {
68 0 : (mManagedPBackgroundIDBFactoryRequestChild).ToArray(aArr);
69 0 : }
70 :
71 0 : auto PBackgroundIDBFactoryChild::ManagedPBackgroundIDBFactoryRequestChild() const -> const ManagedContainer<PBackgroundIDBFactoryRequestChild>&
72 : {
73 0 : return mManagedPBackgroundIDBFactoryRequestChild;
74 : }
75 :
76 0 : auto PBackgroundIDBFactoryChild::SendDeleteMe() -> bool
77 : {
78 0 : IPC::Message* msg__ = PBackgroundIDBFactory::Msg_DeleteMe(Id());
79 :
80 :
81 :
82 :
83 :
84 0 : if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBFactoryChild")) {
85 0 : mozilla::ipc::LogMessageForProtocol("PBackgroundIDBFactoryChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
86 : }
87 0 : AUTO_PROFILER_LABEL("PBackgroundIDBFactory::Msg_DeleteMe", OTHER);
88 0 : PBackgroundIDBFactory::Transition(PBackgroundIDBFactory::Msg_DeleteMe__ID, (&(mState)));
89 :
90 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
91 0 : return sendok__;
92 : }
93 :
94 0 : auto PBackgroundIDBFactoryChild::SendPBackgroundIDBFactoryRequestConstructor(const FactoryRequestParams& params) -> PBackgroundIDBFactoryRequestChild*
95 : {
96 0 : return SendPBackgroundIDBFactoryRequestConstructor(AllocPBackgroundIDBFactoryRequestChild(params), params);
97 : }
98 :
99 0 : auto PBackgroundIDBFactoryChild::SendPBackgroundIDBFactoryRequestConstructor(
100 : PBackgroundIDBFactoryRequestChild* actor,
101 : const FactoryRequestParams& params) -> PBackgroundIDBFactoryRequestChild*
102 : {
103 0 : if ((!(actor))) {
104 0 : NS_WARNING("Error constructing actor PBackgroundIDBFactoryRequestChild");
105 0 : return nullptr;
106 : }
107 0 : (actor)->SetManager(this);
108 0 : Register(actor);
109 0 : (actor)->SetIPCChannel(GetIPCChannel());
110 0 : (mManagedPBackgroundIDBFactoryRequestChild).PutEntry(actor);
111 0 : (actor)->mState = mozilla::dom::indexedDB::PBackgroundIDBFactoryRequest::__Start;
112 :
113 0 : IPC::Message* msg__ = PBackgroundIDBFactory::Msg_PBackgroundIDBFactoryRequestConstructor(Id());
114 :
115 0 : Write(actor, msg__, false);
116 : // Sentinel = 'actor'
117 0 : (msg__)->WriteSentinel(875202478);
118 0 : Write(params, msg__);
119 : // Sentinel = 'params'
120 0 : (msg__)->WriteSentinel(1677790004);
121 :
122 0 : (msg__)->set_constructor();
123 :
124 :
125 0 : if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBFactoryChild")) {
126 0 : mozilla::ipc::LogMessageForProtocol("PBackgroundIDBFactoryChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
127 : }
128 0 : AUTO_PROFILER_LABEL("PBackgroundIDBFactory::Msg_PBackgroundIDBFactoryRequestConstructor", OTHER);
129 0 : PBackgroundIDBFactory::Transition(PBackgroundIDBFactory::Msg_PBackgroundIDBFactoryRequestConstructor__ID, (&(mState)));
130 :
131 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
132 0 : if ((!(sendok__))) {
133 0 : FatalError("constructor for actor failed");
134 0 : return nullptr;
135 : }
136 0 : return actor;
137 : }
138 :
139 0 : auto PBackgroundIDBFactoryChild::SendIncrementLoggingRequestSerialNumber() -> bool
140 : {
141 0 : IPC::Message* msg__ = PBackgroundIDBFactory::Msg_IncrementLoggingRequestSerialNumber(Id());
142 :
143 :
144 :
145 :
146 :
147 0 : if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBFactoryChild")) {
148 0 : mozilla::ipc::LogMessageForProtocol("PBackgroundIDBFactoryChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
149 : }
150 0 : AUTO_PROFILER_LABEL("PBackgroundIDBFactory::Msg_IncrementLoggingRequestSerialNumber", OTHER);
151 0 : PBackgroundIDBFactory::Transition(PBackgroundIDBFactory::Msg_IncrementLoggingRequestSerialNumber__ID, (&(mState)));
152 :
153 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
154 0 : return sendok__;
155 : }
156 :
157 0 : auto PBackgroundIDBFactoryChild::RemoveManagee(
158 : int32_t aProtocolId,
159 : ProtocolBase* aListener) -> void
160 : {
161 0 : switch (aProtocolId) {
162 : case PBackgroundIDBDatabaseMsgStart:
163 : {
164 0 : PBackgroundIDBDatabaseChild* actor = static_cast<PBackgroundIDBDatabaseChild*>(aListener);
165 0 : auto& container = mManagedPBackgroundIDBDatabaseChild;
166 0 : MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
167 :
168 0 : (container).RemoveEntry(actor);
169 0 : DeallocPBackgroundIDBDatabaseChild(actor);
170 0 : return;
171 : }
172 : case PBackgroundIDBFactoryRequestMsgStart:
173 : {
174 0 : PBackgroundIDBFactoryRequestChild* actor = static_cast<PBackgroundIDBFactoryRequestChild*>(aListener);
175 0 : auto& container = mManagedPBackgroundIDBFactoryRequestChild;
176 0 : MOZ_RELEASE_ASSERT((container).Contains(actor), "actor not managed by this!");
177 :
178 0 : (container).RemoveEntry(actor);
179 0 : DeallocPBackgroundIDBFactoryRequestChild(actor);
180 0 : return;
181 : }
182 : default:
183 : {
184 0 : FatalError("unreached");
185 0 : return;
186 : }
187 : }
188 : }
189 :
190 0 : auto PBackgroundIDBFactoryChild::OnMessageReceived(const Message& msg__) -> PBackgroundIDBFactoryChild::Result
191 : {
192 0 : switch ((msg__).type()) {
193 : case PBackgroundIDBFactory::Reply_PBackgroundIDBFactoryRequestConstructor__ID:
194 : {
195 0 : return MsgProcessed;
196 : }
197 : case PBackgroundIDBFactory::Msg___delete____ID:
198 : {
199 0 : if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBFactoryChild")) {
200 0 : mozilla::ipc::LogMessageForProtocol("PBackgroundIDBFactoryChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
201 : }
202 0 : AUTO_PROFILER_LABEL("PBackgroundIDBFactory::Msg___delete__", OTHER);
203 :
204 0 : PickleIterator iter__(msg__);
205 : PBackgroundIDBFactoryChild* actor;
206 :
207 0 : if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
208 0 : FatalError("Error deserializing 'PBackgroundIDBFactoryChild'");
209 0 : return MsgValueError;
210 : }
211 : // Sentinel = 'actor'
212 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
213 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PBackgroundIDBFactoryChild'");
214 0 : return MsgValueError;
215 : }
216 0 : (msg__).EndRead(iter__, (msg__).type());
217 0 : PBackgroundIDBFactory::Transition(PBackgroundIDBFactory::Msg___delete____ID, (&(mState)));
218 0 : if ((!(Recv__delete__()))) {
219 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
220 : // Error handled in mozilla::ipc::IPCResult
221 0 : return MsgProcessingError;
222 : }
223 :
224 :
225 0 : IProtocol* mgr = (actor)->Manager();
226 0 : (actor)->DestroySubtree(Deletion);
227 0 : (actor)->DeallocSubtree();
228 0 : (mgr)->RemoveManagee(PBackgroundIDBFactoryMsgStart, actor);
229 :
230 0 : return MsgProcessed;
231 : }
232 : case PBackgroundIDBFactory::Msg_PBackgroundIDBDatabaseConstructor__ID:
233 : {
234 0 : if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBFactoryChild")) {
235 0 : mozilla::ipc::LogMessageForProtocol("PBackgroundIDBFactoryChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
236 : }
237 0 : AUTO_PROFILER_LABEL("PBackgroundIDBFactory::Msg_PBackgroundIDBDatabaseConstructor", OTHER);
238 :
239 0 : PickleIterator iter__(msg__);
240 : ActorHandle handle__;
241 : PBackgroundIDBDatabaseChild* actor;
242 0 : DatabaseSpec spec;
243 : PBackgroundIDBFactoryRequestChild* request;
244 :
245 0 : if ((!(Read((&(handle__)), (&(msg__)), (&(iter__)))))) {
246 0 : FatalError("Error deserializing 'ActorHandle'");
247 0 : return MsgValueError;
248 : }
249 : // Sentinel = 'actor'
250 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
251 0 : mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'");
252 0 : return MsgValueError;
253 : }
254 0 : if ((!(Read((&(spec)), (&(msg__)), (&(iter__)))))) {
255 0 : FatalError("Error deserializing 'DatabaseSpec'");
256 0 : return MsgValueError;
257 : }
258 : // Sentinel = 'spec'
259 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1630740541)))) {
260 0 : mozilla::ipc::SentinelReadError("Error deserializing 'DatabaseSpec'");
261 0 : return MsgValueError;
262 : }
263 0 : if ((!(Read((&(request)), (&(msg__)), (&(iter__)), false)))) {
264 0 : FatalError("Error deserializing 'PBackgroundIDBFactoryRequestChild'");
265 0 : return MsgValueError;
266 : }
267 : // Sentinel = 'request'
268 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2366856172)))) {
269 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PBackgroundIDBFactoryRequestChild'");
270 0 : return MsgValueError;
271 : }
272 0 : (msg__).EndRead(iter__, (msg__).type());
273 0 : PBackgroundIDBFactory::Transition(PBackgroundIDBFactory::Msg_PBackgroundIDBDatabaseConstructor__ID, (&(mState)));
274 0 : actor = AllocPBackgroundIDBDatabaseChild(spec, request);
275 0 : if ((!(actor))) {
276 0 : NS_WARNING("Error constructing actor PBackgroundIDBDatabaseChild");
277 0 : return MsgValueError;
278 : }
279 0 : (actor)->SetManager(this);
280 0 : RegisterID(actor, (handle__).mId);
281 0 : (actor)->SetIPCChannel(GetIPCChannel());
282 0 : (mManagedPBackgroundIDBDatabaseChild).PutEntry(actor);
283 0 : (actor)->mState = mozilla::dom::indexedDB::PBackgroundIDBDatabase::__Start;
284 :
285 0 : if ((!(RecvPBackgroundIDBDatabaseConstructor(mozilla::Move(actor), mozilla::Move(spec), mozilla::Move(request))))) {
286 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
287 : // Error handled in mozilla::ipc::IPCResult
288 0 : return MsgProcessingError;
289 : }
290 :
291 0 : return MsgProcessed;
292 : }
293 : default:
294 : {
295 0 : return MsgNotKnown;
296 : }
297 : }
298 : }
299 :
300 0 : auto PBackgroundIDBFactoryChild::OnMessageReceived(
301 : const Message& msg__,
302 : Message*& reply__) -> PBackgroundIDBFactoryChild::Result
303 : {
304 0 : return MsgNotKnown;
305 : }
306 :
307 0 : auto PBackgroundIDBFactoryChild::OnCallReceived(
308 : const Message& msg__,
309 : Message*& reply__) -> PBackgroundIDBFactoryChild::Result
310 : {
311 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
312 : return MsgNotKnown;
313 : }
314 :
315 0 : auto PBackgroundIDBFactoryChild::GetProtocolTypeId() -> int32_t
316 : {
317 0 : return PBackgroundIDBFactoryMsgStart;
318 : }
319 :
320 0 : auto PBackgroundIDBFactoryChild::ProtocolName() const -> const char*
321 : {
322 0 : return "PBackgroundIDBFactoryChild";
323 : }
324 :
325 0 : auto PBackgroundIDBFactoryChild::DestroySubtree(ActorDestroyReason why) -> void
326 : {
327 : // Unregister from our manager.
328 0 : Unregister(Id());
329 :
330 0 : ActorDestroyReason subtreewhy = (((why) == (Deletion)) || ((why) == (FailedConstructor)) ? AncestorDeletion : why);
331 :
332 : {
333 : // Recursively shutting down PBackgroundIDBDatabase kids
334 0 : nsTArray<PBackgroundIDBDatabaseChild*> kids;
335 : // Accumulate kids into a stable structure to iterate over
336 0 : ManagedPBackgroundIDBDatabaseChild(kids);
337 0 : for (auto& kid : kids) {
338 : // Guarding against a child removing a sibling from the list during the iteration.
339 0 : if ((mManagedPBackgroundIDBDatabaseChild).Contains(kid)) {
340 0 : (kid)->DestroySubtree(subtreewhy);
341 : }
342 : }
343 : }
344 : {
345 : // Recursively shutting down PBackgroundIDBFactoryRequest kids
346 0 : nsTArray<PBackgroundIDBFactoryRequestChild*> kids;
347 : // Accumulate kids into a stable structure to iterate over
348 0 : ManagedPBackgroundIDBFactoryRequestChild(kids);
349 0 : for (auto& kid : kids) {
350 : // Guarding against a child removing a sibling from the list during the iteration.
351 0 : if ((mManagedPBackgroundIDBFactoryRequestChild).Contains(kid)) {
352 0 : (kid)->DestroySubtree(subtreewhy);
353 : }
354 : }
355 : }
356 :
357 : // Reject owning pending promises.
358 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
359 :
360 : // Finally, destroy "us".
361 0 : ActorDestroy(why);
362 0 : }
363 :
364 0 : auto PBackgroundIDBFactoryChild::DeallocSubtree() -> void
365 : {
366 : {
367 : // Recursively deleting PBackgroundIDBDatabase kids
368 0 : for (auto iter = (mManagedPBackgroundIDBDatabaseChild).Iter(); (!((iter).Done())); (iter).Next()) {
369 0 : (((iter).Get())->GetKey())->DeallocSubtree();
370 : }
371 :
372 0 : for (auto iter = (mManagedPBackgroundIDBDatabaseChild).Iter(); (!((iter).Done())); (iter).Next()) {
373 0 : DeallocPBackgroundIDBDatabaseChild(((iter).Get())->GetKey());
374 : }
375 0 : (mManagedPBackgroundIDBDatabaseChild).Clear();
376 : }
377 : {
378 : // Recursively deleting PBackgroundIDBFactoryRequest kids
379 0 : for (auto iter = (mManagedPBackgroundIDBFactoryRequestChild).Iter(); (!((iter).Done())); (iter).Next()) {
380 0 : (((iter).Get())->GetKey())->DeallocSubtree();
381 : }
382 :
383 0 : for (auto iter = (mManagedPBackgroundIDBFactoryRequestChild).Iter(); (!((iter).Done())); (iter).Next()) {
384 0 : DeallocPBackgroundIDBFactoryRequestChild(((iter).Get())->GetKey());
385 : }
386 0 : (mManagedPBackgroundIDBFactoryRequestChild).Clear();
387 : }
388 0 : }
389 :
390 0 : auto PBackgroundIDBFactoryChild::Write(
391 : const SystemPrincipalInfo& v__,
392 : Message* msg__) -> void
393 : {
394 0 : }
395 :
396 0 : auto PBackgroundIDBFactoryChild::Read(
397 : SystemPrincipalInfo* v__,
398 : const Message* msg__,
399 : PickleIterator* iter__) -> bool
400 : {
401 0 : return true;
402 : }
403 :
404 0 : auto PBackgroundIDBFactoryChild::Write(
405 : const nsTArray<PrincipalInfo>& v__,
406 : Message* msg__) -> void
407 : {
408 0 : uint32_t length = (v__).Length();
409 0 : Write(length, msg__);
410 : // Sentinel = ('length', 'PrincipalInfo[]')
411 0 : (msg__)->WriteSentinel(1032188126);
412 :
413 0 : for (auto& elem : v__) {
414 0 : Write(elem, msg__);
415 : // Sentinel = 'PrincipalInfo[]'
416 0 : (msg__)->WriteSentinel(413380193);
417 : }
418 0 : }
419 :
420 0 : auto PBackgroundIDBFactoryChild::Read(
421 : nsTArray<PrincipalInfo>* v__,
422 : const Message* msg__,
423 : PickleIterator* iter__) -> bool
424 : {
425 0 : nsTArray<PrincipalInfo> fa;
426 : uint32_t length;
427 0 : if ((!(Read((&(length)), msg__, iter__)))) {
428 0 : mozilla::ipc::ArrayLengthReadError("PrincipalInfo[]");
429 0 : return false;
430 : }
431 : // Sentinel = ('length', 'PrincipalInfo[]')
432 0 : if ((!((msg__)->ReadSentinel(iter__, 1032188126)))) {
433 0 : mozilla::ipc::SentinelReadError("PrincipalInfo[]");
434 0 : return false;
435 : }
436 :
437 0 : PrincipalInfo* elems = (fa).AppendElements(length);
438 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
439 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
440 0 : FatalError("Error deserializing 'PrincipalInfo[i]'");
441 0 : return false;
442 : }
443 : // Sentinel = 'PrincipalInfo[]'
444 0 : if ((!((msg__)->ReadSentinel(iter__, 413380193)))) {
445 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PrincipalInfo[i]'");
446 0 : return false;
447 : }
448 : }
449 0 : (v__)->SwapElements(fa);
450 0 : return true;
451 : }
452 :
453 0 : auto PBackgroundIDBFactoryChild::Write(
454 : const PBackgroundIDBFactoryRequestChild* v__,
455 : Message* msg__,
456 : bool nullable__) -> void
457 : {
458 : int32_t id;
459 0 : if ((!(v__))) {
460 0 : if ((!(nullable__))) {
461 0 : FatalError("NULL actor value passed to non-nullable param");
462 : }
463 0 : id = 0;
464 : }
465 : else {
466 0 : id = (v__)->Id();
467 0 : if ((1) == (id)) {
468 0 : FatalError("actor has been |delete|d");
469 : }
470 : }
471 :
472 0 : Write(id, msg__);
473 0 : }
474 :
475 0 : auto PBackgroundIDBFactoryChild::Read(
476 : PBackgroundIDBFactoryRequestChild** v__,
477 : const Message* msg__,
478 : PickleIterator* iter__,
479 : bool nullable__) -> bool
480 : {
481 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PBackgroundIDBFactoryRequest", PBackgroundIDBFactoryRequestMsgStart);
482 0 : if ((actor).isNothing()) {
483 0 : return false;
484 : }
485 :
486 0 : (*(v__)) = static_cast<PBackgroundIDBFactoryRequestChild*>((actor).value());
487 0 : return true;
488 : }
489 :
490 0 : auto PBackgroundIDBFactoryChild::Write(
491 : const ExpandedPrincipalInfo& v__,
492 : Message* msg__) -> void
493 : {
494 0 : Write((v__).attrs(), msg__);
495 : // Sentinel = 'attrs'
496 0 : (msg__)->WriteSentinel(3014987797);
497 0 : Write((v__).whitelist(), msg__);
498 : // Sentinel = 'whitelist'
499 0 : (msg__)->WriteSentinel(3731637258);
500 0 : }
501 :
502 0 : auto PBackgroundIDBFactoryChild::Read(
503 : ExpandedPrincipalInfo* v__,
504 : const Message* msg__,
505 : PickleIterator* iter__) -> bool
506 : {
507 0 : if ((!(Read((&((v__)->attrs())), msg__, iter__)))) {
508 0 : FatalError("Error deserializing 'attrs' (OriginAttributes) member of 'ExpandedPrincipalInfo'");
509 0 : return false;
510 : }
511 : // Sentinel = 'attrs'
512 0 : if ((!((msg__)->ReadSentinel(iter__, 3014987797)))) {
513 0 : mozilla::ipc::SentinelReadError("Error deserializing 'attrs' (OriginAttributes) member of 'ExpandedPrincipalInfo'");
514 0 : return false;
515 : }
516 0 : if ((!(Read((&((v__)->whitelist())), msg__, iter__)))) {
517 0 : FatalError("Error deserializing 'whitelist' (PrincipalInfo[]) member of 'ExpandedPrincipalInfo'");
518 0 : return false;
519 : }
520 : // Sentinel = 'whitelist'
521 0 : if ((!((msg__)->ReadSentinel(iter__, 3731637258)))) {
522 0 : mozilla::ipc::SentinelReadError("Error deserializing 'whitelist' (PrincipalInfo[]) member of 'ExpandedPrincipalInfo'");
523 0 : return false;
524 : }
525 0 : return true;
526 : }
527 :
528 0 : auto PBackgroundIDBFactoryChild::Write(
529 : const IndexMetadata& v__,
530 : Message* msg__) -> void
531 : {
532 0 : Write((v__).id(), msg__);
533 : // Sentinel = 'id'
534 0 : (msg__)->WriteSentinel(2794505629);
535 0 : Write((v__).name(), msg__);
536 : // Sentinel = 'name'
537 0 : (msg__)->WriteSentinel(15034981);
538 0 : Write((v__).keyPath(), msg__);
539 : // Sentinel = 'keyPath'
540 0 : (msg__)->WriteSentinel(1014825087);
541 0 : Write((v__).locale(), msg__);
542 : // Sentinel = 'locale'
543 0 : (msg__)->WriteSentinel(779891848);
544 0 : Write((v__).unique(), msg__);
545 : // Sentinel = 'unique'
546 0 : (msg__)->WriteSentinel(4039542363);
547 0 : Write((v__).multiEntry(), msg__);
548 : // Sentinel = 'multiEntry'
549 0 : (msg__)->WriteSentinel(1069215611);
550 0 : Write((v__).autoLocale(), msg__);
551 : // Sentinel = 'autoLocale'
552 0 : (msg__)->WriteSentinel(2816072777);
553 0 : }
554 :
555 0 : auto PBackgroundIDBFactoryChild::Read(
556 : IndexMetadata* v__,
557 : const Message* msg__,
558 : PickleIterator* iter__) -> bool
559 : {
560 0 : if ((!(Read((&((v__)->id())), msg__, iter__)))) {
561 0 : FatalError("Error deserializing 'id' (int64_t) member of 'IndexMetadata'");
562 0 : return false;
563 : }
564 : // Sentinel = 'id'
565 0 : if ((!((msg__)->ReadSentinel(iter__, 2794505629)))) {
566 0 : mozilla::ipc::SentinelReadError("Error deserializing 'id' (int64_t) member of 'IndexMetadata'");
567 0 : return false;
568 : }
569 0 : if ((!(Read((&((v__)->name())), msg__, iter__)))) {
570 0 : FatalError("Error deserializing 'name' (nsString) member of 'IndexMetadata'");
571 0 : return false;
572 : }
573 : // Sentinel = 'name'
574 0 : if ((!((msg__)->ReadSentinel(iter__, 15034981)))) {
575 0 : mozilla::ipc::SentinelReadError("Error deserializing 'name' (nsString) member of 'IndexMetadata'");
576 0 : return false;
577 : }
578 0 : if ((!(Read((&((v__)->keyPath())), msg__, iter__)))) {
579 0 : FatalError("Error deserializing 'keyPath' (KeyPath) member of 'IndexMetadata'");
580 0 : return false;
581 : }
582 : // Sentinel = 'keyPath'
583 0 : if ((!((msg__)->ReadSentinel(iter__, 1014825087)))) {
584 0 : mozilla::ipc::SentinelReadError("Error deserializing 'keyPath' (KeyPath) member of 'IndexMetadata'");
585 0 : return false;
586 : }
587 0 : if ((!(Read((&((v__)->locale())), msg__, iter__)))) {
588 0 : FatalError("Error deserializing 'locale' (nsCString) member of 'IndexMetadata'");
589 0 : return false;
590 : }
591 : // Sentinel = 'locale'
592 0 : if ((!((msg__)->ReadSentinel(iter__, 779891848)))) {
593 0 : mozilla::ipc::SentinelReadError("Error deserializing 'locale' (nsCString) member of 'IndexMetadata'");
594 0 : return false;
595 : }
596 0 : if ((!(Read((&((v__)->unique())), msg__, iter__)))) {
597 0 : FatalError("Error deserializing 'unique' (bool) member of 'IndexMetadata'");
598 0 : return false;
599 : }
600 : // Sentinel = 'unique'
601 0 : if ((!((msg__)->ReadSentinel(iter__, 4039542363)))) {
602 0 : mozilla::ipc::SentinelReadError("Error deserializing 'unique' (bool) member of 'IndexMetadata'");
603 0 : return false;
604 : }
605 0 : if ((!(Read((&((v__)->multiEntry())), msg__, iter__)))) {
606 0 : FatalError("Error deserializing 'multiEntry' (bool) member of 'IndexMetadata'");
607 0 : return false;
608 : }
609 : // Sentinel = 'multiEntry'
610 0 : if ((!((msg__)->ReadSentinel(iter__, 1069215611)))) {
611 0 : mozilla::ipc::SentinelReadError("Error deserializing 'multiEntry' (bool) member of 'IndexMetadata'");
612 0 : return false;
613 : }
614 0 : if ((!(Read((&((v__)->autoLocale())), msg__, iter__)))) {
615 0 : FatalError("Error deserializing 'autoLocale' (bool) member of 'IndexMetadata'");
616 0 : return false;
617 : }
618 : // Sentinel = 'autoLocale'
619 0 : if ((!((msg__)->ReadSentinel(iter__, 2816072777)))) {
620 0 : mozilla::ipc::SentinelReadError("Error deserializing 'autoLocale' (bool) member of 'IndexMetadata'");
621 0 : return false;
622 : }
623 0 : return true;
624 : }
625 :
626 0 : auto PBackgroundIDBFactoryChild::Write(
627 : const DatabaseMetadata& v__,
628 : Message* msg__) -> void
629 : {
630 0 : Write((v__).name(), msg__);
631 : // Sentinel = 'name'
632 0 : (msg__)->WriteSentinel(15034981);
633 0 : Write((v__).version(), msg__);
634 : // Sentinel = 'version'
635 0 : (msg__)->WriteSentinel(4003360947);
636 0 : Write((v__).persistenceType(), msg__);
637 : // Sentinel = 'persistenceType'
638 0 : (msg__)->WriteSentinel(3316493122);
639 0 : }
640 :
641 0 : auto PBackgroundIDBFactoryChild::Read(
642 : DatabaseMetadata* v__,
643 : const Message* msg__,
644 : PickleIterator* iter__) -> bool
645 : {
646 0 : if ((!(Read((&((v__)->name())), msg__, iter__)))) {
647 0 : FatalError("Error deserializing 'name' (nsString) member of 'DatabaseMetadata'");
648 0 : return false;
649 : }
650 : // Sentinel = 'name'
651 0 : if ((!((msg__)->ReadSentinel(iter__, 15034981)))) {
652 0 : mozilla::ipc::SentinelReadError("Error deserializing 'name' (nsString) member of 'DatabaseMetadata'");
653 0 : return false;
654 : }
655 0 : if ((!(Read((&((v__)->version())), msg__, iter__)))) {
656 0 : FatalError("Error deserializing 'version' (uint64_t) member of 'DatabaseMetadata'");
657 0 : return false;
658 : }
659 : // Sentinel = 'version'
660 0 : if ((!((msg__)->ReadSentinel(iter__, 4003360947)))) {
661 0 : mozilla::ipc::SentinelReadError("Error deserializing 'version' (uint64_t) member of 'DatabaseMetadata'");
662 0 : return false;
663 : }
664 0 : if ((!(Read((&((v__)->persistenceType())), msg__, iter__)))) {
665 0 : FatalError("Error deserializing 'persistenceType' (PersistenceType) member of 'DatabaseMetadata'");
666 0 : return false;
667 : }
668 : // Sentinel = 'persistenceType'
669 0 : if ((!((msg__)->ReadSentinel(iter__, 3316493122)))) {
670 0 : mozilla::ipc::SentinelReadError("Error deserializing 'persistenceType' (PersistenceType) member of 'DatabaseMetadata'");
671 0 : return false;
672 : }
673 0 : return true;
674 : }
675 :
676 0 : auto PBackgroundIDBFactoryChild::Write(
677 : const PrincipalInfo& v__,
678 : Message* msg__) -> void
679 : {
680 : typedef PrincipalInfo type__;
681 0 : Write(int((v__).type()), msg__);
682 : // Sentinel = 'PrincipalInfo'
683 0 : (msg__)->WriteSentinel(4194518819);
684 :
685 0 : switch ((v__).type()) {
686 : case type__::TContentPrincipalInfo:
687 : {
688 0 : Write((v__).get_ContentPrincipalInfo(), msg__);
689 : // Sentinel = 'TContentPrincipalInfo'
690 0 : (msg__)->WriteSentinel(3677342258);
691 0 : return;
692 : }
693 : case type__::TSystemPrincipalInfo:
694 : {
695 0 : Write((v__).get_SystemPrincipalInfo(), msg__);
696 : // Sentinel = 'TSystemPrincipalInfo'
697 0 : (msg__)->WriteSentinel(3590603679);
698 0 : return;
699 : }
700 : case type__::TNullPrincipalInfo:
701 : {
702 0 : Write((v__).get_NullPrincipalInfo(), msg__);
703 : // Sentinel = 'TNullPrincipalInfo'
704 0 : (msg__)->WriteSentinel(3477774965);
705 0 : return;
706 : }
707 : case type__::TExpandedPrincipalInfo:
708 : {
709 0 : Write((v__).get_ExpandedPrincipalInfo(), msg__);
710 : // Sentinel = 'TExpandedPrincipalInfo'
711 0 : (msg__)->WriteSentinel(589324917);
712 0 : return;
713 : }
714 : default:
715 : {
716 0 : FatalError("unknown union type");
717 0 : return;
718 : }
719 : }
720 : }
721 :
722 0 : auto PBackgroundIDBFactoryChild::Read(
723 : PrincipalInfo* v__,
724 : const Message* msg__,
725 : PickleIterator* iter__) -> bool
726 : {
727 : typedef PrincipalInfo type__;
728 : int type;
729 0 : if ((!(Read((&(type)), msg__, iter__)))) {
730 0 : mozilla::ipc::UnionTypeReadError("PrincipalInfo");
731 0 : return false;
732 : }
733 : // Sentinel = 'PrincipalInfo'
734 0 : if ((!((msg__)->ReadSentinel(iter__, 4194518819)))) {
735 0 : mozilla::ipc::SentinelReadError("PrincipalInfo");
736 0 : return false;
737 : }
738 :
739 0 : switch (type) {
740 : case type__::TContentPrincipalInfo:
741 : {
742 0 : ContentPrincipalInfo tmp = ContentPrincipalInfo();
743 0 : (*(v__)) = tmp;
744 0 : if ((!(Read((&((v__)->get_ContentPrincipalInfo())), msg__, iter__)))) {
745 0 : FatalError("Error deserializing Union type");
746 0 : return false;
747 : }
748 : // Sentinel = 'TContentPrincipalInfo'
749 0 : if ((!((msg__)->ReadSentinel(iter__, 3677342258)))) {
750 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
751 0 : return false;
752 : }
753 0 : return true;
754 : }
755 : case type__::TSystemPrincipalInfo:
756 : {
757 0 : SystemPrincipalInfo tmp = SystemPrincipalInfo();
758 0 : (*(v__)) = tmp;
759 0 : if ((!(Read((&((v__)->get_SystemPrincipalInfo())), msg__, iter__)))) {
760 0 : FatalError("Error deserializing Union type");
761 0 : return false;
762 : }
763 : // Sentinel = 'TSystemPrincipalInfo'
764 0 : if ((!((msg__)->ReadSentinel(iter__, 3590603679)))) {
765 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
766 0 : return false;
767 : }
768 0 : return true;
769 : }
770 : case type__::TNullPrincipalInfo:
771 : {
772 0 : NullPrincipalInfo tmp = NullPrincipalInfo();
773 0 : (*(v__)) = tmp;
774 0 : if ((!(Read((&((v__)->get_NullPrincipalInfo())), msg__, iter__)))) {
775 0 : FatalError("Error deserializing Union type");
776 0 : return false;
777 : }
778 : // Sentinel = 'TNullPrincipalInfo'
779 0 : if ((!((msg__)->ReadSentinel(iter__, 3477774965)))) {
780 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
781 0 : return false;
782 : }
783 0 : return true;
784 : }
785 : case type__::TExpandedPrincipalInfo:
786 : {
787 0 : ExpandedPrincipalInfo tmp = ExpandedPrincipalInfo();
788 0 : (*(v__)) = tmp;
789 0 : if ((!(Read((&((v__)->get_ExpandedPrincipalInfo())), msg__, iter__)))) {
790 0 : FatalError("Error deserializing Union type");
791 0 : return false;
792 : }
793 : // Sentinel = 'TExpandedPrincipalInfo'
794 0 : if ((!((msg__)->ReadSentinel(iter__, 589324917)))) {
795 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
796 0 : return false;
797 : }
798 0 : return true;
799 : }
800 : default:
801 : {
802 0 : FatalError("unknown union type");
803 0 : return false;
804 : }
805 : }
806 : }
807 :
808 0 : auto PBackgroundIDBFactoryChild::Write(
809 : const ContentPrincipalInfoOriginNoSuffix& v__,
810 : Message* msg__) -> void
811 : {
812 : typedef ContentPrincipalInfoOriginNoSuffix type__;
813 0 : Write(int((v__).type()), msg__);
814 : // Sentinel = 'ContentPrincipalInfoOriginNoSuffix'
815 0 : (msg__)->WriteSentinel(2442066713);
816 :
817 0 : switch ((v__).type()) {
818 : case type__::TnsCString:
819 : {
820 0 : Write((v__).get_nsCString(), msg__);
821 : // Sentinel = 'TnsCString'
822 0 : (msg__)->WriteSentinel(2427411293);
823 0 : return;
824 : }
825 : case type__::Tvoid_t:
826 : {
827 0 : Write((v__).get_void_t(), msg__);
828 : // Sentinel = 'Tvoid_t'
829 0 : (msg__)->WriteSentinel(3041273328);
830 0 : return;
831 : }
832 : default:
833 : {
834 0 : FatalError("unknown union type");
835 0 : return;
836 : }
837 : }
838 : }
839 :
840 0 : auto PBackgroundIDBFactoryChild::Read(
841 : ContentPrincipalInfoOriginNoSuffix* v__,
842 : const Message* msg__,
843 : PickleIterator* iter__) -> bool
844 : {
845 : typedef ContentPrincipalInfoOriginNoSuffix type__;
846 : int type;
847 0 : if ((!(Read((&(type)), msg__, iter__)))) {
848 0 : mozilla::ipc::UnionTypeReadError("ContentPrincipalInfoOriginNoSuffix");
849 0 : return false;
850 : }
851 : // Sentinel = 'ContentPrincipalInfoOriginNoSuffix'
852 0 : if ((!((msg__)->ReadSentinel(iter__, 2442066713)))) {
853 0 : mozilla::ipc::SentinelReadError("ContentPrincipalInfoOriginNoSuffix");
854 0 : return false;
855 : }
856 :
857 0 : switch (type) {
858 : case type__::TnsCString:
859 : {
860 0 : nsCString tmp = nsCString();
861 0 : (*(v__)) = tmp;
862 0 : if ((!(Read((&((v__)->get_nsCString())), msg__, iter__)))) {
863 0 : FatalError("Error deserializing Union type");
864 0 : return false;
865 : }
866 : // Sentinel = 'TnsCString'
867 0 : if ((!((msg__)->ReadSentinel(iter__, 2427411293)))) {
868 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
869 0 : return false;
870 : }
871 0 : return true;
872 : }
873 : case type__::Tvoid_t:
874 : {
875 : void_t tmp = void_t();
876 0 : (*(v__)) = tmp;
877 0 : if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
878 0 : FatalError("Error deserializing Union type");
879 0 : return false;
880 : }
881 : // Sentinel = 'Tvoid_t'
882 0 : if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
883 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
884 0 : return false;
885 : }
886 0 : return true;
887 : }
888 : default:
889 : {
890 0 : FatalError("unknown union type");
891 0 : return false;
892 : }
893 : }
894 : }
895 :
896 0 : auto PBackgroundIDBFactoryChild::Write(
897 : const FactoryRequestParams& v__,
898 : Message* msg__) -> void
899 : {
900 : typedef FactoryRequestParams type__;
901 0 : Write(int((v__).type()), msg__);
902 : // Sentinel = 'FactoryRequestParams'
903 0 : (msg__)->WriteSentinel(1444753303);
904 :
905 0 : switch ((v__).type()) {
906 : case type__::TOpenDatabaseRequestParams:
907 : {
908 0 : Write((v__).get_OpenDatabaseRequestParams(), msg__);
909 : // Sentinel = 'TOpenDatabaseRequestParams'
910 0 : (msg__)->WriteSentinel(4137782958);
911 0 : return;
912 : }
913 : case type__::TDeleteDatabaseRequestParams:
914 : {
915 0 : Write((v__).get_DeleteDatabaseRequestParams(), msg__);
916 : // Sentinel = 'TDeleteDatabaseRequestParams'
917 0 : (msg__)->WriteSentinel(3237276035);
918 0 : return;
919 : }
920 : default:
921 : {
922 0 : FatalError("unknown union type");
923 0 : return;
924 : }
925 : }
926 : }
927 :
928 0 : auto PBackgroundIDBFactoryChild::Read(
929 : FactoryRequestParams* v__,
930 : const Message* msg__,
931 : PickleIterator* iter__) -> bool
932 : {
933 : typedef FactoryRequestParams type__;
934 : int type;
935 0 : if ((!(Read((&(type)), msg__, iter__)))) {
936 0 : mozilla::ipc::UnionTypeReadError("FactoryRequestParams");
937 0 : return false;
938 : }
939 : // Sentinel = 'FactoryRequestParams'
940 0 : if ((!((msg__)->ReadSentinel(iter__, 1444753303)))) {
941 0 : mozilla::ipc::SentinelReadError("FactoryRequestParams");
942 0 : return false;
943 : }
944 :
945 0 : switch (type) {
946 : case type__::TOpenDatabaseRequestParams:
947 : {
948 0 : OpenDatabaseRequestParams tmp = OpenDatabaseRequestParams();
949 0 : (*(v__)) = tmp;
950 0 : if ((!(Read((&((v__)->get_OpenDatabaseRequestParams())), msg__, iter__)))) {
951 0 : FatalError("Error deserializing Union type");
952 0 : return false;
953 : }
954 : // Sentinel = 'TOpenDatabaseRequestParams'
955 0 : if ((!((msg__)->ReadSentinel(iter__, 4137782958)))) {
956 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
957 0 : return false;
958 : }
959 0 : return true;
960 : }
961 : case type__::TDeleteDatabaseRequestParams:
962 : {
963 0 : DeleteDatabaseRequestParams tmp = DeleteDatabaseRequestParams();
964 0 : (*(v__)) = tmp;
965 0 : if ((!(Read((&((v__)->get_DeleteDatabaseRequestParams())), msg__, iter__)))) {
966 0 : FatalError("Error deserializing Union type");
967 0 : return false;
968 : }
969 : // Sentinel = 'TDeleteDatabaseRequestParams'
970 0 : if ((!((msg__)->ReadSentinel(iter__, 3237276035)))) {
971 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
972 0 : return false;
973 : }
974 0 : return true;
975 : }
976 : default:
977 : {
978 0 : FatalError("unknown union type");
979 0 : return false;
980 : }
981 : }
982 : }
983 :
984 0 : auto PBackgroundIDBFactoryChild::Write(
985 : const nsTArray<IndexMetadata>& v__,
986 : Message* msg__) -> void
987 : {
988 0 : uint32_t length = (v__).Length();
989 0 : Write(length, msg__);
990 : // Sentinel = ('length', 'IndexMetadata[]')
991 0 : (msg__)->WriteSentinel(3191133965);
992 :
993 0 : for (auto& elem : v__) {
994 0 : Write(elem, msg__);
995 : // Sentinel = 'IndexMetadata[]'
996 0 : (msg__)->WriteSentinel(653302948);
997 : }
998 0 : }
999 :
1000 0 : auto PBackgroundIDBFactoryChild::Read(
1001 : nsTArray<IndexMetadata>* v__,
1002 : const Message* msg__,
1003 : PickleIterator* iter__) -> bool
1004 : {
1005 0 : nsTArray<IndexMetadata> fa;
1006 : uint32_t length;
1007 0 : if ((!(Read((&(length)), msg__, iter__)))) {
1008 0 : mozilla::ipc::ArrayLengthReadError("IndexMetadata[]");
1009 0 : return false;
1010 : }
1011 : // Sentinel = ('length', 'IndexMetadata[]')
1012 0 : if ((!((msg__)->ReadSentinel(iter__, 3191133965)))) {
1013 0 : mozilla::ipc::SentinelReadError("IndexMetadata[]");
1014 0 : return false;
1015 : }
1016 :
1017 0 : IndexMetadata* elems = (fa).AppendElements(length);
1018 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
1019 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
1020 0 : FatalError("Error deserializing 'IndexMetadata[i]'");
1021 0 : return false;
1022 : }
1023 : // Sentinel = 'IndexMetadata[]'
1024 0 : if ((!((msg__)->ReadSentinel(iter__, 653302948)))) {
1025 0 : mozilla::ipc::SentinelReadError("Error deserializing 'IndexMetadata[i]'");
1026 0 : return false;
1027 : }
1028 : }
1029 0 : (v__)->SwapElements(fa);
1030 0 : return true;
1031 : }
1032 :
1033 0 : auto PBackgroundIDBFactoryChild::Write(
1034 : const ObjectStoreMetadata& v__,
1035 : Message* msg__) -> void
1036 : {
1037 0 : Write((v__).id(), msg__);
1038 : // Sentinel = 'id'
1039 0 : (msg__)->WriteSentinel(2794505629);
1040 0 : Write((v__).name(), msg__);
1041 : // Sentinel = 'name'
1042 0 : (msg__)->WriteSentinel(15034981);
1043 0 : Write((v__).keyPath(), msg__);
1044 : // Sentinel = 'keyPath'
1045 0 : (msg__)->WriteSentinel(1014825087);
1046 0 : Write((v__).autoIncrement(), msg__);
1047 : // Sentinel = 'autoIncrement'
1048 0 : (msg__)->WriteSentinel(2122955977);
1049 0 : }
1050 :
1051 0 : auto PBackgroundIDBFactoryChild::Read(
1052 : ObjectStoreMetadata* v__,
1053 : const Message* msg__,
1054 : PickleIterator* iter__) -> bool
1055 : {
1056 0 : if ((!(Read((&((v__)->id())), msg__, iter__)))) {
1057 0 : FatalError("Error deserializing 'id' (int64_t) member of 'ObjectStoreMetadata'");
1058 0 : return false;
1059 : }
1060 : // Sentinel = 'id'
1061 0 : if ((!((msg__)->ReadSentinel(iter__, 2794505629)))) {
1062 0 : mozilla::ipc::SentinelReadError("Error deserializing 'id' (int64_t) member of 'ObjectStoreMetadata'");
1063 0 : return false;
1064 : }
1065 0 : if ((!(Read((&((v__)->name())), msg__, iter__)))) {
1066 0 : FatalError("Error deserializing 'name' (nsString) member of 'ObjectStoreMetadata'");
1067 0 : return false;
1068 : }
1069 : // Sentinel = 'name'
1070 0 : if ((!((msg__)->ReadSentinel(iter__, 15034981)))) {
1071 0 : mozilla::ipc::SentinelReadError("Error deserializing 'name' (nsString) member of 'ObjectStoreMetadata'");
1072 0 : return false;
1073 : }
1074 0 : if ((!(Read((&((v__)->keyPath())), msg__, iter__)))) {
1075 0 : FatalError("Error deserializing 'keyPath' (KeyPath) member of 'ObjectStoreMetadata'");
1076 0 : return false;
1077 : }
1078 : // Sentinel = 'keyPath'
1079 0 : if ((!((msg__)->ReadSentinel(iter__, 1014825087)))) {
1080 0 : mozilla::ipc::SentinelReadError("Error deserializing 'keyPath' (KeyPath) member of 'ObjectStoreMetadata'");
1081 0 : return false;
1082 : }
1083 0 : if ((!(Read((&((v__)->autoIncrement())), msg__, iter__)))) {
1084 0 : FatalError("Error deserializing 'autoIncrement' (bool) member of 'ObjectStoreMetadata'");
1085 0 : return false;
1086 : }
1087 : // Sentinel = 'autoIncrement'
1088 0 : if ((!((msg__)->ReadSentinel(iter__, 2122955977)))) {
1089 0 : mozilla::ipc::SentinelReadError("Error deserializing 'autoIncrement' (bool) member of 'ObjectStoreMetadata'");
1090 0 : return false;
1091 : }
1092 0 : return true;
1093 : }
1094 :
1095 0 : auto PBackgroundIDBFactoryChild::Write(
1096 : const PBackgroundIDBDatabaseChild* v__,
1097 : Message* msg__,
1098 : bool nullable__) -> void
1099 : {
1100 : int32_t id;
1101 0 : if ((!(v__))) {
1102 0 : if ((!(nullable__))) {
1103 0 : FatalError("NULL actor value passed to non-nullable param");
1104 : }
1105 0 : id = 0;
1106 : }
1107 : else {
1108 0 : id = (v__)->Id();
1109 0 : if ((1) == (id)) {
1110 0 : FatalError("actor has been |delete|d");
1111 : }
1112 : }
1113 :
1114 0 : Write(id, msg__);
1115 0 : }
1116 :
1117 0 : auto PBackgroundIDBFactoryChild::Read(
1118 : PBackgroundIDBDatabaseChild** v__,
1119 : const Message* msg__,
1120 : PickleIterator* iter__,
1121 : bool nullable__) -> bool
1122 : {
1123 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PBackgroundIDBDatabase", PBackgroundIDBDatabaseMsgStart);
1124 0 : if ((actor).isNothing()) {
1125 0 : return false;
1126 : }
1127 :
1128 0 : (*(v__)) = static_cast<PBackgroundIDBDatabaseChild*>((actor).value());
1129 0 : return true;
1130 : }
1131 :
1132 0 : auto PBackgroundIDBFactoryChild::Write(
1133 : const ContentPrincipalInfo& v__,
1134 : Message* msg__) -> void
1135 : {
1136 0 : Write((v__).attrs(), msg__);
1137 : // Sentinel = 'attrs'
1138 0 : (msg__)->WriteSentinel(3014987797);
1139 0 : Write((v__).originNoSuffix(), msg__);
1140 : // Sentinel = 'originNoSuffix'
1141 0 : (msg__)->WriteSentinel(2833071422);
1142 0 : Write((v__).spec(), msg__);
1143 : // Sentinel = 'spec'
1144 0 : (msg__)->WriteSentinel(1630740541);
1145 0 : }
1146 :
1147 0 : auto PBackgroundIDBFactoryChild::Read(
1148 : ContentPrincipalInfo* v__,
1149 : const Message* msg__,
1150 : PickleIterator* iter__) -> bool
1151 : {
1152 0 : if ((!(Read((&((v__)->attrs())), msg__, iter__)))) {
1153 0 : FatalError("Error deserializing 'attrs' (OriginAttributes) member of 'ContentPrincipalInfo'");
1154 0 : return false;
1155 : }
1156 : // Sentinel = 'attrs'
1157 0 : if ((!((msg__)->ReadSentinel(iter__, 3014987797)))) {
1158 0 : mozilla::ipc::SentinelReadError("Error deserializing 'attrs' (OriginAttributes) member of 'ContentPrincipalInfo'");
1159 0 : return false;
1160 : }
1161 0 : if ((!(Read((&((v__)->originNoSuffix())), msg__, iter__)))) {
1162 0 : FatalError("Error deserializing 'originNoSuffix' (ContentPrincipalInfoOriginNoSuffix) member of 'ContentPrincipalInfo'");
1163 0 : return false;
1164 : }
1165 : // Sentinel = 'originNoSuffix'
1166 0 : if ((!((msg__)->ReadSentinel(iter__, 2833071422)))) {
1167 0 : mozilla::ipc::SentinelReadError("Error deserializing 'originNoSuffix' (ContentPrincipalInfoOriginNoSuffix) member of 'ContentPrincipalInfo'");
1168 0 : return false;
1169 : }
1170 0 : if ((!(Read((&((v__)->spec())), msg__, iter__)))) {
1171 0 : FatalError("Error deserializing 'spec' (nsCString) member of 'ContentPrincipalInfo'");
1172 0 : return false;
1173 : }
1174 : // Sentinel = 'spec'
1175 0 : if ((!((msg__)->ReadSentinel(iter__, 1630740541)))) {
1176 0 : mozilla::ipc::SentinelReadError("Error deserializing 'spec' (nsCString) member of 'ContentPrincipalInfo'");
1177 0 : return false;
1178 : }
1179 0 : return true;
1180 : }
1181 :
1182 0 : auto PBackgroundIDBFactoryChild::Write(
1183 : const nsTArray<ObjectStoreSpec>& v__,
1184 : Message* msg__) -> void
1185 : {
1186 0 : uint32_t length = (v__).Length();
1187 0 : Write(length, msg__);
1188 : // Sentinel = ('length', 'ObjectStoreSpec[]')
1189 0 : (msg__)->WriteSentinel(3924467189);
1190 :
1191 0 : for (auto& elem : v__) {
1192 0 : Write(elem, msg__);
1193 : // Sentinel = 'ObjectStoreSpec[]'
1194 0 : (msg__)->WriteSentinel(1928795868);
1195 : }
1196 0 : }
1197 :
1198 0 : auto PBackgroundIDBFactoryChild::Read(
1199 : nsTArray<ObjectStoreSpec>* v__,
1200 : const Message* msg__,
1201 : PickleIterator* iter__) -> bool
1202 : {
1203 0 : nsTArray<ObjectStoreSpec> fa;
1204 : uint32_t length;
1205 0 : if ((!(Read((&(length)), msg__, iter__)))) {
1206 0 : mozilla::ipc::ArrayLengthReadError("ObjectStoreSpec[]");
1207 0 : return false;
1208 : }
1209 : // Sentinel = ('length', 'ObjectStoreSpec[]')
1210 0 : if ((!((msg__)->ReadSentinel(iter__, 3924467189)))) {
1211 0 : mozilla::ipc::SentinelReadError("ObjectStoreSpec[]");
1212 0 : return false;
1213 : }
1214 :
1215 0 : ObjectStoreSpec* elems = (fa).AppendElements(length);
1216 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
1217 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
1218 0 : FatalError("Error deserializing 'ObjectStoreSpec[i]'");
1219 0 : return false;
1220 : }
1221 : // Sentinel = 'ObjectStoreSpec[]'
1222 0 : if ((!((msg__)->ReadSentinel(iter__, 1928795868)))) {
1223 0 : mozilla::ipc::SentinelReadError("Error deserializing 'ObjectStoreSpec[i]'");
1224 0 : return false;
1225 : }
1226 : }
1227 0 : (v__)->SwapElements(fa);
1228 0 : return true;
1229 : }
1230 :
1231 0 : auto PBackgroundIDBFactoryChild::Write(
1232 : const OpenDatabaseRequestParams& v__,
1233 : Message* msg__) -> void
1234 : {
1235 0 : Write((v__).commonParams(), msg__);
1236 : // Sentinel = 'commonParams'
1237 0 : (msg__)->WriteSentinel(3132658281);
1238 0 : }
1239 :
1240 0 : auto PBackgroundIDBFactoryChild::Read(
1241 : OpenDatabaseRequestParams* v__,
1242 : const Message* msg__,
1243 : PickleIterator* iter__) -> bool
1244 : {
1245 0 : if ((!(Read((&((v__)->commonParams())), msg__, iter__)))) {
1246 0 : FatalError("Error deserializing 'commonParams' (CommonFactoryRequestParams) member of 'OpenDatabaseRequestParams'");
1247 0 : return false;
1248 : }
1249 : // Sentinel = 'commonParams'
1250 0 : if ((!((msg__)->ReadSentinel(iter__, 3132658281)))) {
1251 0 : mozilla::ipc::SentinelReadError("Error deserializing 'commonParams' (CommonFactoryRequestParams) member of 'OpenDatabaseRequestParams'");
1252 0 : return false;
1253 : }
1254 0 : return true;
1255 : }
1256 :
1257 0 : auto PBackgroundIDBFactoryChild::Write(
1258 : const NullPrincipalInfo& v__,
1259 : Message* msg__) -> void
1260 : {
1261 0 : Write((v__).attrs(), msg__);
1262 : // Sentinel = 'attrs'
1263 0 : (msg__)->WriteSentinel(3014987797);
1264 0 : Write((v__).spec(), msg__);
1265 : // Sentinel = 'spec'
1266 0 : (msg__)->WriteSentinel(1630740541);
1267 0 : }
1268 :
1269 0 : auto PBackgroundIDBFactoryChild::Read(
1270 : NullPrincipalInfo* v__,
1271 : const Message* msg__,
1272 : PickleIterator* iter__) -> bool
1273 : {
1274 0 : if ((!(Read((&((v__)->attrs())), msg__, iter__)))) {
1275 0 : FatalError("Error deserializing 'attrs' (OriginAttributes) member of 'NullPrincipalInfo'");
1276 0 : return false;
1277 : }
1278 : // Sentinel = 'attrs'
1279 0 : if ((!((msg__)->ReadSentinel(iter__, 3014987797)))) {
1280 0 : mozilla::ipc::SentinelReadError("Error deserializing 'attrs' (OriginAttributes) member of 'NullPrincipalInfo'");
1281 0 : return false;
1282 : }
1283 0 : if ((!(Read((&((v__)->spec())), msg__, iter__)))) {
1284 0 : FatalError("Error deserializing 'spec' (nsCString) member of 'NullPrincipalInfo'");
1285 0 : return false;
1286 : }
1287 : // Sentinel = 'spec'
1288 0 : if ((!((msg__)->ReadSentinel(iter__, 1630740541)))) {
1289 0 : mozilla::ipc::SentinelReadError("Error deserializing 'spec' (nsCString) member of 'NullPrincipalInfo'");
1290 0 : return false;
1291 : }
1292 0 : return true;
1293 : }
1294 :
1295 0 : auto PBackgroundIDBFactoryChild::Write(
1296 : const ObjectStoreSpec& v__,
1297 : Message* msg__) -> void
1298 : {
1299 0 : Write((v__).metadata(), msg__);
1300 : // Sentinel = 'metadata'
1301 0 : (msg__)->WriteSentinel(541737151);
1302 0 : Write((v__).indexes(), msg__);
1303 : // Sentinel = 'indexes'
1304 0 : (msg__)->WriteSentinel(2296882095);
1305 0 : }
1306 :
1307 0 : auto PBackgroundIDBFactoryChild::Read(
1308 : ObjectStoreSpec* v__,
1309 : const Message* msg__,
1310 : PickleIterator* iter__) -> bool
1311 : {
1312 0 : if ((!(Read((&((v__)->metadata())), msg__, iter__)))) {
1313 0 : FatalError("Error deserializing 'metadata' (ObjectStoreMetadata) member of 'ObjectStoreSpec'");
1314 0 : return false;
1315 : }
1316 : // Sentinel = 'metadata'
1317 0 : if ((!((msg__)->ReadSentinel(iter__, 541737151)))) {
1318 0 : mozilla::ipc::SentinelReadError("Error deserializing 'metadata' (ObjectStoreMetadata) member of 'ObjectStoreSpec'");
1319 0 : return false;
1320 : }
1321 0 : if ((!(Read((&((v__)->indexes())), msg__, iter__)))) {
1322 0 : FatalError("Error deserializing 'indexes' (IndexMetadata[]) member of 'ObjectStoreSpec'");
1323 0 : return false;
1324 : }
1325 : // Sentinel = 'indexes'
1326 0 : if ((!((msg__)->ReadSentinel(iter__, 2296882095)))) {
1327 0 : mozilla::ipc::SentinelReadError("Error deserializing 'indexes' (IndexMetadata[]) member of 'ObjectStoreSpec'");
1328 0 : return false;
1329 : }
1330 0 : return true;
1331 : }
1332 :
1333 0 : auto PBackgroundIDBFactoryChild::Write(
1334 : const CommonFactoryRequestParams& v__,
1335 : Message* msg__) -> void
1336 : {
1337 0 : Write((v__).metadata(), msg__);
1338 : // Sentinel = 'metadata'
1339 0 : (msg__)->WriteSentinel(541737151);
1340 0 : Write((v__).principalInfo(), msg__);
1341 : // Sentinel = 'principalInfo'
1342 0 : (msg__)->WriteSentinel(3386633731);
1343 0 : Write((v__).privateBrowsingMode(), msg__);
1344 : // Sentinel = 'privateBrowsingMode'
1345 0 : (msg__)->WriteSentinel(3760549000);
1346 0 : }
1347 :
1348 0 : auto PBackgroundIDBFactoryChild::Read(
1349 : CommonFactoryRequestParams* v__,
1350 : const Message* msg__,
1351 : PickleIterator* iter__) -> bool
1352 : {
1353 0 : if ((!(Read((&((v__)->metadata())), msg__, iter__)))) {
1354 0 : FatalError("Error deserializing 'metadata' (DatabaseMetadata) member of 'CommonFactoryRequestParams'");
1355 0 : return false;
1356 : }
1357 : // Sentinel = 'metadata'
1358 0 : if ((!((msg__)->ReadSentinel(iter__, 541737151)))) {
1359 0 : mozilla::ipc::SentinelReadError("Error deserializing 'metadata' (DatabaseMetadata) member of 'CommonFactoryRequestParams'");
1360 0 : return false;
1361 : }
1362 0 : if ((!(Read((&((v__)->principalInfo())), msg__, iter__)))) {
1363 0 : FatalError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'CommonFactoryRequestParams'");
1364 0 : return false;
1365 : }
1366 : // Sentinel = 'principalInfo'
1367 0 : if ((!((msg__)->ReadSentinel(iter__, 3386633731)))) {
1368 0 : mozilla::ipc::SentinelReadError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'CommonFactoryRequestParams'");
1369 0 : return false;
1370 : }
1371 0 : if ((!(Read((&((v__)->privateBrowsingMode())), msg__, iter__)))) {
1372 0 : FatalError("Error deserializing 'privateBrowsingMode' (bool) member of 'CommonFactoryRequestParams'");
1373 0 : return false;
1374 : }
1375 : // Sentinel = 'privateBrowsingMode'
1376 0 : if ((!((msg__)->ReadSentinel(iter__, 3760549000)))) {
1377 0 : mozilla::ipc::SentinelReadError("Error deserializing 'privateBrowsingMode' (bool) member of 'CommonFactoryRequestParams'");
1378 0 : return false;
1379 : }
1380 0 : return true;
1381 : }
1382 :
1383 0 : auto PBackgroundIDBFactoryChild::Write(
1384 : const DeleteDatabaseRequestParams& v__,
1385 : Message* msg__) -> void
1386 : {
1387 0 : Write((v__).commonParams(), msg__);
1388 : // Sentinel = 'commonParams'
1389 0 : (msg__)->WriteSentinel(3132658281);
1390 0 : }
1391 :
1392 0 : auto PBackgroundIDBFactoryChild::Read(
1393 : DeleteDatabaseRequestParams* v__,
1394 : const Message* msg__,
1395 : PickleIterator* iter__) -> bool
1396 : {
1397 0 : if ((!(Read((&((v__)->commonParams())), msg__, iter__)))) {
1398 0 : FatalError("Error deserializing 'commonParams' (CommonFactoryRequestParams) member of 'DeleteDatabaseRequestParams'");
1399 0 : return false;
1400 : }
1401 : // Sentinel = 'commonParams'
1402 0 : if ((!((msg__)->ReadSentinel(iter__, 3132658281)))) {
1403 0 : mozilla::ipc::SentinelReadError("Error deserializing 'commonParams' (CommonFactoryRequestParams) member of 'DeleteDatabaseRequestParams'");
1404 0 : return false;
1405 : }
1406 0 : return true;
1407 : }
1408 :
1409 0 : auto PBackgroundIDBFactoryChild::Write(
1410 : const PBackgroundIDBFactoryChild* v__,
1411 : Message* msg__,
1412 : bool nullable__) -> void
1413 : {
1414 : int32_t id;
1415 0 : if ((!(v__))) {
1416 0 : if ((!(nullable__))) {
1417 0 : FatalError("NULL actor value passed to non-nullable param");
1418 : }
1419 0 : id = 0;
1420 : }
1421 : else {
1422 0 : id = (v__)->Id();
1423 0 : if ((1) == (id)) {
1424 0 : FatalError("actor has been |delete|d");
1425 : }
1426 : }
1427 :
1428 0 : Write(id, msg__);
1429 0 : }
1430 :
1431 0 : auto PBackgroundIDBFactoryChild::Read(
1432 : PBackgroundIDBFactoryChild** v__,
1433 : const Message* msg__,
1434 : PickleIterator* iter__,
1435 : bool nullable__) -> bool
1436 : {
1437 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PBackgroundIDBFactory", PBackgroundIDBFactoryMsgStart);
1438 0 : if ((actor).isNothing()) {
1439 0 : return false;
1440 : }
1441 :
1442 0 : (*(v__)) = static_cast<PBackgroundIDBFactoryChild*>((actor).value());
1443 0 : return true;
1444 : }
1445 :
1446 0 : auto PBackgroundIDBFactoryChild::Write(
1447 : const DatabaseSpec& v__,
1448 : Message* msg__) -> void
1449 : {
1450 0 : Write((v__).metadata(), msg__);
1451 : // Sentinel = 'metadata'
1452 0 : (msg__)->WriteSentinel(541737151);
1453 0 : Write((v__).objectStores(), msg__);
1454 : // Sentinel = 'objectStores'
1455 0 : (msg__)->WriteSentinel(255152447);
1456 0 : }
1457 :
1458 0 : auto PBackgroundIDBFactoryChild::Read(
1459 : DatabaseSpec* v__,
1460 : const Message* msg__,
1461 : PickleIterator* iter__) -> bool
1462 : {
1463 0 : if ((!(Read((&((v__)->metadata())), msg__, iter__)))) {
1464 0 : FatalError("Error deserializing 'metadata' (DatabaseMetadata) member of 'DatabaseSpec'");
1465 0 : return false;
1466 : }
1467 : // Sentinel = 'metadata'
1468 0 : if ((!((msg__)->ReadSentinel(iter__, 541737151)))) {
1469 0 : mozilla::ipc::SentinelReadError("Error deserializing 'metadata' (DatabaseMetadata) member of 'DatabaseSpec'");
1470 0 : return false;
1471 : }
1472 0 : if ((!(Read((&((v__)->objectStores())), msg__, iter__)))) {
1473 0 : FatalError("Error deserializing 'objectStores' (ObjectStoreSpec[]) member of 'DatabaseSpec'");
1474 0 : return false;
1475 : }
1476 : // Sentinel = 'objectStores'
1477 0 : if ((!((msg__)->ReadSentinel(iter__, 255152447)))) {
1478 0 : mozilla::ipc::SentinelReadError("Error deserializing 'objectStores' (ObjectStoreSpec[]) member of 'DatabaseSpec'");
1479 0 : return false;
1480 : }
1481 0 : return true;
1482 : }
1483 :
1484 :
1485 :
1486 : } // namespace indexedDB
1487 : } // namespace dom
1488 : } // namespace mozilla
|