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

Generated by: LCOV version 1.13