LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - PQuotaParent.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 717 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 63 0.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.13