LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - PTCPSocketParent.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 389 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 25 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/net/PTCPSocketParent.h"
       8             : #include "ipc/IPCMessageUtils.h"
       9             : 
      10             : #include "mozilla/net/PNeckoParent.h"
      11             : 
      12             : #include "nsIFile.h"
      13             : #include "GeckoProfiler.h"
      14             : 
      15             : namespace mozilla {
      16             : namespace net {
      17             : 
      18             : 
      19           0 : auto PTCPSocketParent::Recv__delete__() -> mozilla::ipc::IPCResult
      20             : {
      21           0 :     return IPC_OK();
      22             : }
      23             : 
      24             : 
      25           0 : MOZ_IMPLICIT PTCPSocketParent::PTCPSocketParent() :
      26             :     mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
      27           0 :     mState(PTCPSocket::__Dead)
      28             : {
      29           0 :     MOZ_COUNT_CTOR(PTCPSocketParent);
      30           0 : }
      31             : 
      32           0 : PTCPSocketParent::~PTCPSocketParent()
      33             : {
      34           0 :     MOZ_COUNT_DTOR(PTCPSocketParent);
      35           0 : }
      36             : 
      37           0 : auto PTCPSocketParent::Manager() const -> PNeckoParent*
      38             : {
      39           0 :     return static_cast<PNeckoParent*>(IProtocol::Manager());
      40             : }
      41             : 
      42           0 : auto PTCPSocketParent::SendCallback(
      43             :         const nsString& type,
      44             :         const CallbackData& data,
      45             :         const uint32_t& readyState) -> bool
      46             : {
      47           0 :     IPC::Message* msg__ = PTCPSocket::Msg_Callback(Id());
      48             : 
      49           0 :     Write(type, msg__);
      50             :     // Sentinel = 'type'
      51           0 :     (msg__)->WriteSentinel(2982068540);
      52           0 :     Write(data, msg__);
      53             :     // Sentinel = 'data'
      54           0 :     (msg__)->WriteSentinel(843352540);
      55           0 :     Write(readyState, msg__);
      56             :     // Sentinel = 'readyState'
      57           0 :     (msg__)->WriteSentinel(572411746);
      58             : 
      59             : 
      60             : 
      61             : 
      62           0 :     if (mozilla::ipc::LoggingEnabledFor("PTCPSocketParent")) {
      63           0 :         mozilla::ipc::LogMessageForProtocol("PTCPSocketParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      64             :     }
      65           0 :     AUTO_PROFILER_LABEL("PTCPSocket::Msg_Callback", OTHER);
      66           0 :     PTCPSocket::Transition(PTCPSocket::Msg_Callback__ID, (&(mState)));
      67             : 
      68           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      69           0 :     return sendok__;
      70             : }
      71             : 
      72           0 : auto PTCPSocketParent::SendUpdateBufferedAmount(
      73             :         const uint32_t& bufferedAmount,
      74             :         const uint32_t& trackingNumber) -> bool
      75             : {
      76           0 :     IPC::Message* msg__ = PTCPSocket::Msg_UpdateBufferedAmount(Id());
      77             : 
      78           0 :     Write(bufferedAmount, msg__);
      79             :     // Sentinel = 'bufferedAmount'
      80           0 :     (msg__)->WriteSentinel(580364331);
      81           0 :     Write(trackingNumber, msg__);
      82             :     // Sentinel = 'trackingNumber'
      83           0 :     (msg__)->WriteSentinel(272285434);
      84             : 
      85             : 
      86             : 
      87             : 
      88           0 :     if (mozilla::ipc::LoggingEnabledFor("PTCPSocketParent")) {
      89           0 :         mozilla::ipc::LogMessageForProtocol("PTCPSocketParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      90             :     }
      91           0 :     AUTO_PROFILER_LABEL("PTCPSocket::Msg_UpdateBufferedAmount", OTHER);
      92           0 :     PTCPSocket::Transition(PTCPSocket::Msg_UpdateBufferedAmount__ID, (&(mState)));
      93             : 
      94           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      95           0 :     return sendok__;
      96             : }
      97             : 
      98           0 : auto PTCPSocketParent::SendRequestDelete() -> bool
      99             : {
     100           0 :     IPC::Message* msg__ = PTCPSocket::Msg_RequestDelete(Id());
     101             : 
     102             : 
     103             : 
     104             : 
     105             : 
     106           0 :     if (mozilla::ipc::LoggingEnabledFor("PTCPSocketParent")) {
     107           0 :         mozilla::ipc::LogMessageForProtocol("PTCPSocketParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     108             :     }
     109           0 :     AUTO_PROFILER_LABEL("PTCPSocket::Msg_RequestDelete", OTHER);
     110           0 :     PTCPSocket::Transition(PTCPSocket::Msg_RequestDelete__ID, (&(mState)));
     111             : 
     112           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
     113           0 :     return sendok__;
     114             : }
     115             : 
     116           0 : auto PTCPSocketParent::Send__delete__(PTCPSocketParent* actor) -> bool
     117             : {
     118           0 :     if ((!(actor))) {
     119           0 :         return false;
     120             :     }
     121             : 
     122           0 :     IPC::Message* msg__ = PTCPSocket::Msg___delete__((actor)->Id());
     123             : 
     124           0 :     (actor)->Write(actor, msg__, false);
     125             :     // Sentinel = 'actor'
     126           0 :     (msg__)->WriteSentinel(875202478);
     127             : 
     128             : 
     129             : 
     130           0 :     if (mozilla::ipc::LoggingEnabledFor("PTCPSocketParent")) {
     131           0 :         mozilla::ipc::LogMessageForProtocol("PTCPSocketParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     132             :     }
     133           0 :     AUTO_PROFILER_LABEL("PTCPSocket::Msg___delete__", OTHER);
     134           0 :     PTCPSocket::Transition(PTCPSocket::Msg___delete____ID, (&((actor)->mState)));
     135             : 
     136           0 :     bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
     137             : 
     138           0 :     IProtocol* mgr = (actor)->Manager();
     139           0 :     (actor)->DestroySubtree(Deletion);
     140           0 :     (actor)->DeallocSubtree();
     141           0 :     (mgr)->RemoveManagee(PTCPSocketMsgStart, actor);
     142           0 :     return sendok__;
     143             : }
     144             : 
     145           0 : auto PTCPSocketParent::RemoveManagee(
     146             :         int32_t aProtocolId,
     147             :         ProtocolBase* aListener) -> void
     148             : {
     149           0 :     FatalError("unreached");
     150           0 :     return;
     151             : }
     152             : 
     153           0 : auto PTCPSocketParent::OnMessageReceived(const Message& msg__) -> PTCPSocketParent::Result
     154             : {
     155           0 :     switch ((msg__).type()) {
     156             :     case PTCPSocket::Msg_Open__ID:
     157             :         {
     158           0 :             if (mozilla::ipc::LoggingEnabledFor("PTCPSocketParent")) {
     159           0 :                 mozilla::ipc::LogMessageForProtocol("PTCPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     160             :             }
     161           0 :             AUTO_PROFILER_LABEL("PTCPSocket::Msg_Open", OTHER);
     162             : 
     163           0 :             PickleIterator iter__(msg__);
     164           0 :             nsString host;
     165             :             uint16_t port;
     166             :             bool useSSL;
     167             :             bool useArrayBuffers;
     168             : 
     169           0 :             if ((!(Read((&(host)), (&(msg__)), (&(iter__)))))) {
     170           0 :                 FatalError("Error deserializing 'nsString'");
     171           0 :                 return MsgValueError;
     172             :             }
     173             :             // Sentinel = 'host'
     174           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4070301394)))) {
     175           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
     176           0 :                 return MsgValueError;
     177             :             }
     178           0 :             if ((!(Read((&(port)), (&(msg__)), (&(iter__)))))) {
     179           0 :                 FatalError("Error deserializing 'uint16_t'");
     180           0 :                 return MsgValueError;
     181             :             }
     182             :             // Sentinel = 'port'
     183           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3633211549)))) {
     184           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'uint16_t'");
     185           0 :                 return MsgValueError;
     186             :             }
     187           0 :             if ((!(Read((&(useSSL)), (&(msg__)), (&(iter__)))))) {
     188           0 :                 FatalError("Error deserializing 'bool'");
     189           0 :                 return MsgValueError;
     190             :             }
     191             :             // Sentinel = 'useSSL'
     192           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 714252035)))) {
     193           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
     194           0 :                 return MsgValueError;
     195             :             }
     196           0 :             if ((!(Read((&(useArrayBuffers)), (&(msg__)), (&(iter__)))))) {
     197           0 :                 FatalError("Error deserializing 'bool'");
     198           0 :                 return MsgValueError;
     199             :             }
     200             :             // Sentinel = 'useArrayBuffers'
     201           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1444022734)))) {
     202           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
     203           0 :                 return MsgValueError;
     204             :             }
     205           0 :             (msg__).EndRead(iter__, (msg__).type());
     206           0 :             PTCPSocket::Transition(PTCPSocket::Msg_Open__ID, (&(mState)));
     207           0 :             if ((!(RecvOpen(mozilla::Move(host), mozilla::Move(port), mozilla::Move(useSSL), mozilla::Move(useArrayBuffers))))) {
     208           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     209             :                 // Error handled in mozilla::ipc::IPCResult
     210           0 :                 return MsgProcessingError;
     211             :             }
     212             : 
     213           0 :             return MsgProcessed;
     214             :         }
     215             :     case PTCPSocket::Msg_OpenBind__ID:
     216             :         {
     217           0 :             if (mozilla::ipc::LoggingEnabledFor("PTCPSocketParent")) {
     218           0 :                 mozilla::ipc::LogMessageForProtocol("PTCPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     219             :             }
     220           0 :             AUTO_PROFILER_LABEL("PTCPSocket::Msg_OpenBind", OTHER);
     221             : 
     222           0 :             PickleIterator iter__(msg__);
     223           0 :             nsCString host;
     224             :             uint16_t port;
     225           0 :             nsCString localAddr;
     226             :             uint16_t localPort;
     227             :             bool useSSL;
     228             :             bool reuseAddrPort;
     229             :             bool aUseArrayBuffers;
     230           0 :             nsCString aFilter;
     231             : 
     232           0 :             if ((!(Read((&(host)), (&(msg__)), (&(iter__)))))) {
     233           0 :                 FatalError("Error deserializing 'nsCString'");
     234           0 :                 return MsgValueError;
     235             :             }
     236             :             // Sentinel = 'host'
     237           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4070301394)))) {
     238           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
     239           0 :                 return MsgValueError;
     240             :             }
     241           0 :             if ((!(Read((&(port)), (&(msg__)), (&(iter__)))))) {
     242           0 :                 FatalError("Error deserializing 'uint16_t'");
     243           0 :                 return MsgValueError;
     244             :             }
     245             :             // Sentinel = 'port'
     246           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3633211549)))) {
     247           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'uint16_t'");
     248           0 :                 return MsgValueError;
     249             :             }
     250           0 :             if ((!(Read((&(localAddr)), (&(msg__)), (&(iter__)))))) {
     251           0 :                 FatalError("Error deserializing 'nsCString'");
     252           0 :                 return MsgValueError;
     253             :             }
     254             :             // Sentinel = 'localAddr'
     255           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 986524165)))) {
     256           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
     257           0 :                 return MsgValueError;
     258             :             }
     259           0 :             if ((!(Read((&(localPort)), (&(msg__)), (&(iter__)))))) {
     260           0 :                 FatalError("Error deserializing 'uint16_t'");
     261           0 :                 return MsgValueError;
     262             :             }
     263             :             // Sentinel = 'localPort'
     264           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2930268933)))) {
     265           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'uint16_t'");
     266           0 :                 return MsgValueError;
     267             :             }
     268           0 :             if ((!(Read((&(useSSL)), (&(msg__)), (&(iter__)))))) {
     269           0 :                 FatalError("Error deserializing 'bool'");
     270           0 :                 return MsgValueError;
     271             :             }
     272             :             // Sentinel = 'useSSL'
     273           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 714252035)))) {
     274           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
     275           0 :                 return MsgValueError;
     276             :             }
     277           0 :             if ((!(Read((&(reuseAddrPort)), (&(msg__)), (&(iter__)))))) {
     278           0 :                 FatalError("Error deserializing 'bool'");
     279           0 :                 return MsgValueError;
     280             :             }
     281             :             // Sentinel = 'reuseAddrPort'
     282           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3461003689)))) {
     283           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
     284           0 :                 return MsgValueError;
     285             :             }
     286           0 :             if ((!(Read((&(aUseArrayBuffers)), (&(msg__)), (&(iter__)))))) {
     287           0 :                 FatalError("Error deserializing 'bool'");
     288           0 :                 return MsgValueError;
     289             :             }
     290             :             // Sentinel = 'aUseArrayBuffers'
     291           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1388383946)))) {
     292           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
     293           0 :                 return MsgValueError;
     294             :             }
     295           0 :             if ((!(Read((&(aFilter)), (&(msg__)), (&(iter__)))))) {
     296           0 :                 FatalError("Error deserializing 'nsCString'");
     297           0 :                 return MsgValueError;
     298             :             }
     299             :             // Sentinel = 'aFilter'
     300           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1227311512)))) {
     301           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
     302           0 :                 return MsgValueError;
     303             :             }
     304           0 :             (msg__).EndRead(iter__, (msg__).type());
     305           0 :             PTCPSocket::Transition(PTCPSocket::Msg_OpenBind__ID, (&(mState)));
     306           0 :             if ((!(RecvOpenBind(mozilla::Move(host), mozilla::Move(port), mozilla::Move(localAddr), mozilla::Move(localPort), mozilla::Move(useSSL), mozilla::Move(reuseAddrPort), mozilla::Move(aUseArrayBuffers), mozilla::Move(aFilter))))) {
     307           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     308             :                 // Error handled in mozilla::ipc::IPCResult
     309           0 :                 return MsgProcessingError;
     310             :             }
     311             : 
     312           0 :             return MsgProcessed;
     313             :         }
     314             :     case PTCPSocket::Msg_Data__ID:
     315             :         {
     316           0 :             if (mozilla::ipc::LoggingEnabledFor("PTCPSocketParent")) {
     317           0 :                 mozilla::ipc::LogMessageForProtocol("PTCPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     318             :             }
     319           0 :             AUTO_PROFILER_LABEL("PTCPSocket::Msg_Data", OTHER);
     320             : 
     321           0 :             PickleIterator iter__(msg__);
     322           0 :             SendableData data;
     323             :             uint32_t trackingNumber;
     324             : 
     325           0 :             if ((!(Read((&(data)), (&(msg__)), (&(iter__)))))) {
     326           0 :                 FatalError("Error deserializing 'SendableData'");
     327           0 :                 return MsgValueError;
     328             :             }
     329             :             // Sentinel = 'data'
     330           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 843352540)))) {
     331           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'SendableData'");
     332           0 :                 return MsgValueError;
     333             :             }
     334           0 :             if ((!(Read((&(trackingNumber)), (&(msg__)), (&(iter__)))))) {
     335           0 :                 FatalError("Error deserializing 'uint32_t'");
     336           0 :                 return MsgValueError;
     337             :             }
     338             :             // Sentinel = 'trackingNumber'
     339           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 272285434)))) {
     340           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
     341           0 :                 return MsgValueError;
     342             :             }
     343           0 :             (msg__).EndRead(iter__, (msg__).type());
     344           0 :             PTCPSocket::Transition(PTCPSocket::Msg_Data__ID, (&(mState)));
     345           0 :             if ((!(RecvData(mozilla::Move(data), mozilla::Move(trackingNumber))))) {
     346           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     347             :                 // Error handled in mozilla::ipc::IPCResult
     348           0 :                 return MsgProcessingError;
     349             :             }
     350             : 
     351           0 :             return MsgProcessed;
     352             :         }
     353             :     case PTCPSocket::Msg_StartTLS__ID:
     354             :         {
     355           0 :             if (mozilla::ipc::LoggingEnabledFor("PTCPSocketParent")) {
     356           0 :                 mozilla::ipc::LogMessageForProtocol("PTCPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     357             :             }
     358           0 :             AUTO_PROFILER_LABEL("PTCPSocket::Msg_StartTLS", OTHER);
     359             : 
     360           0 :             PTCPSocket::Transition(PTCPSocket::Msg_StartTLS__ID, (&(mState)));
     361           0 :             if ((!(RecvStartTLS()))) {
     362           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     363             :                 // Error handled in mozilla::ipc::IPCResult
     364           0 :                 return MsgProcessingError;
     365             :             }
     366             : 
     367           0 :             return MsgProcessed;
     368             :         }
     369             :     case PTCPSocket::Msg_Suspend__ID:
     370             :         {
     371           0 :             if (mozilla::ipc::LoggingEnabledFor("PTCPSocketParent")) {
     372           0 :                 mozilla::ipc::LogMessageForProtocol("PTCPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     373             :             }
     374           0 :             AUTO_PROFILER_LABEL("PTCPSocket::Msg_Suspend", OTHER);
     375             : 
     376           0 :             PTCPSocket::Transition(PTCPSocket::Msg_Suspend__ID, (&(mState)));
     377           0 :             if ((!(RecvSuspend()))) {
     378           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     379             :                 // Error handled in mozilla::ipc::IPCResult
     380           0 :                 return MsgProcessingError;
     381             :             }
     382             : 
     383           0 :             return MsgProcessed;
     384             :         }
     385             :     case PTCPSocket::Msg_Resume__ID:
     386             :         {
     387           0 :             if (mozilla::ipc::LoggingEnabledFor("PTCPSocketParent")) {
     388           0 :                 mozilla::ipc::LogMessageForProtocol("PTCPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     389             :             }
     390           0 :             AUTO_PROFILER_LABEL("PTCPSocket::Msg_Resume", OTHER);
     391             : 
     392           0 :             PTCPSocket::Transition(PTCPSocket::Msg_Resume__ID, (&(mState)));
     393           0 :             if ((!(RecvResume()))) {
     394           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     395             :                 // Error handled in mozilla::ipc::IPCResult
     396           0 :                 return MsgProcessingError;
     397             :             }
     398             : 
     399           0 :             return MsgProcessed;
     400             :         }
     401             :     case PTCPSocket::Msg_Close__ID:
     402             :         {
     403           0 :             if (mozilla::ipc::LoggingEnabledFor("PTCPSocketParent")) {
     404           0 :                 mozilla::ipc::LogMessageForProtocol("PTCPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     405             :             }
     406           0 :             AUTO_PROFILER_LABEL("PTCPSocket::Msg_Close", OTHER);
     407             : 
     408           0 :             PTCPSocket::Transition(PTCPSocket::Msg_Close__ID, (&(mState)));
     409           0 :             if ((!(RecvClose()))) {
     410           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     411             :                 // Error handled in mozilla::ipc::IPCResult
     412           0 :                 return MsgProcessingError;
     413             :             }
     414             : 
     415           0 :             return MsgProcessed;
     416             :         }
     417             :     case PTCPSocket::Msg_RequestDelete__ID:
     418             :         {
     419           0 :             if (mozilla::ipc::LoggingEnabledFor("PTCPSocketParent")) {
     420           0 :                 mozilla::ipc::LogMessageForProtocol("PTCPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     421             :             }
     422           0 :             AUTO_PROFILER_LABEL("PTCPSocket::Msg_RequestDelete", OTHER);
     423             : 
     424           0 :             PTCPSocket::Transition(PTCPSocket::Msg_RequestDelete__ID, (&(mState)));
     425           0 :             if ((!(RecvRequestDelete()))) {
     426           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     427             :                 // Error handled in mozilla::ipc::IPCResult
     428           0 :                 return MsgProcessingError;
     429             :             }
     430             : 
     431           0 :             return MsgProcessed;
     432             :         }
     433             :     case PTCPSocket::Reply___delete____ID:
     434             :         {
     435           0 :             return MsgProcessed;
     436             :         }
     437             :     case PTCPSocket::Msg___delete____ID:
     438             :         {
     439           0 :             if (mozilla::ipc::LoggingEnabledFor("PTCPSocketParent")) {
     440           0 :                 mozilla::ipc::LogMessageForProtocol("PTCPSocketParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     441             :             }
     442           0 :             AUTO_PROFILER_LABEL("PTCPSocket::Msg___delete__", OTHER);
     443             : 
     444           0 :             PickleIterator iter__(msg__);
     445             :             PTCPSocketParent* actor;
     446             : 
     447           0 :             if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
     448           0 :                 FatalError("Error deserializing 'PTCPSocketParent'");
     449           0 :                 return MsgValueError;
     450             :             }
     451             :             // Sentinel = 'actor'
     452           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
     453           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'PTCPSocketParent'");
     454           0 :                 return MsgValueError;
     455             :             }
     456           0 :             (msg__).EndRead(iter__, (msg__).type());
     457           0 :             PTCPSocket::Transition(PTCPSocket::Msg___delete____ID, (&(mState)));
     458           0 :             if ((!(Recv__delete__()))) {
     459           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     460             :                 // Error handled in mozilla::ipc::IPCResult
     461           0 :                 return MsgProcessingError;
     462             :             }
     463             : 
     464             : 
     465           0 :             IProtocol* mgr = (actor)->Manager();
     466           0 :             (actor)->DestroySubtree(Deletion);
     467           0 :             (actor)->DeallocSubtree();
     468           0 :             (mgr)->RemoveManagee(PTCPSocketMsgStart, actor);
     469             : 
     470           0 :             return MsgProcessed;
     471             :         }
     472             :     default:
     473             :         {
     474           0 :             return MsgNotKnown;
     475             :         }
     476             :     }
     477             : }
     478             : 
     479           0 : auto PTCPSocketParent::OnMessageReceived(
     480             :         const Message& msg__,
     481             :         Message*& reply__) -> PTCPSocketParent::Result
     482             : {
     483           0 :     return MsgNotKnown;
     484             : }
     485             : 
     486           0 : auto PTCPSocketParent::OnCallReceived(
     487             :         const Message& msg__,
     488             :         Message*& reply__) -> PTCPSocketParent::Result
     489             : {
     490           0 :     MOZ_ASSERT_UNREACHABLE("message protocol not supported");
     491             :     return MsgNotKnown;
     492             : }
     493             : 
     494           0 : auto PTCPSocketParent::GetProtocolTypeId() -> int32_t
     495             : {
     496           0 :     return PTCPSocketMsgStart;
     497             : }
     498             : 
     499           0 : auto PTCPSocketParent::ProtocolName() const -> const char*
     500             : {
     501           0 :     return "PTCPSocketParent";
     502             : }
     503             : 
     504           0 : auto PTCPSocketParent::DestroySubtree(ActorDestroyReason why) -> void
     505             : {
     506             :     // Unregister from our manager.
     507           0 :     Unregister(Id());
     508             : 
     509             :     // Reject owning pending promises.
     510           0 :     (GetIPCChannel())->RejectPendingPromisesForActor(this);
     511             : 
     512             :     // Finally, destroy "us".
     513           0 :     ActorDestroy(why);
     514           0 : }
     515             : 
     516           0 : auto PTCPSocketParent::DeallocSubtree() -> void
     517             : {
     518           0 : }
     519             : 
     520           0 : auto PTCPSocketParent::Write(
     521             :         const SendableData& v__,
     522             :         Message* msg__) -> void
     523             : {
     524             :     typedef SendableData type__;
     525           0 :     Write(int((v__).type()), msg__);
     526             :     // Sentinel = 'SendableData'
     527           0 :     (msg__)->WriteSentinel(1792235082);
     528             : 
     529           0 :     switch ((v__).type()) {
     530             :     case type__::TArrayOfuint8_t:
     531             :         {
     532           0 :             Write((v__).get_ArrayOfuint8_t(), msg__);
     533             :             // Sentinel = 'TArrayOfuint8_t'
     534           0 :             (msg__)->WriteSentinel(430000978);
     535           0 :             return;
     536             :         }
     537             :     case type__::TnsCString:
     538             :         {
     539           0 :             Write((v__).get_nsCString(), msg__);
     540             :             // Sentinel = 'TnsCString'
     541           0 :             (msg__)->WriteSentinel(2427411293);
     542           0 :             return;
     543             :         }
     544             :     default:
     545             :         {
     546           0 :             FatalError("unknown union type");
     547           0 :             return;
     548             :         }
     549             :     }
     550             : }
     551             : 
     552           0 : auto PTCPSocketParent::Read(
     553             :         SendableData* v__,
     554             :         const Message* msg__,
     555             :         PickleIterator* iter__) -> bool
     556             : {
     557             :     typedef SendableData type__;
     558             :     int type;
     559           0 :     if ((!(Read((&(type)), msg__, iter__)))) {
     560           0 :         mozilla::ipc::UnionTypeReadError("SendableData");
     561           0 :         return false;
     562             :     }
     563             :     // Sentinel = 'SendableData'
     564           0 :     if ((!((msg__)->ReadSentinel(iter__, 1792235082)))) {
     565           0 :         mozilla::ipc::SentinelReadError("SendableData");
     566           0 :         return false;
     567             :     }
     568             : 
     569           0 :     switch (type) {
     570             :     case type__::TArrayOfuint8_t:
     571             :         {
     572           0 :             nsTArray<uint8_t> tmp;
     573           0 :             (*(v__)) = tmp;
     574           0 :             if ((!(Read((&((v__)->get_ArrayOfuint8_t())), msg__, iter__)))) {
     575           0 :                 FatalError("Error deserializing Union type");
     576           0 :                 return false;
     577             :             }
     578             :             // Sentinel = 'TArrayOfuint8_t'
     579           0 :             if ((!((msg__)->ReadSentinel(iter__, 430000978)))) {
     580           0 :                 mozilla::ipc::SentinelReadError("Error deserializing Union type");
     581           0 :                 return false;
     582             :             }
     583           0 :             return true;
     584             :         }
     585             :     case type__::TnsCString:
     586             :         {
     587           0 :             nsCString tmp = nsCString();
     588           0 :             (*(v__)) = tmp;
     589           0 :             if ((!(Read((&((v__)->get_nsCString())), msg__, iter__)))) {
     590           0 :                 FatalError("Error deserializing Union type");
     591           0 :                 return false;
     592             :             }
     593             :             // Sentinel = 'TnsCString'
     594           0 :             if ((!((msg__)->ReadSentinel(iter__, 2427411293)))) {
     595           0 :                 mozilla::ipc::SentinelReadError("Error deserializing Union type");
     596           0 :                 return false;
     597             :             }
     598           0 :             return true;
     599             :         }
     600             :     default:
     601             :         {
     602           0 :             FatalError("unknown union type");
     603           0 :             return false;
     604             :         }
     605             :     }
     606             : }
     607             : 
     608           0 : auto PTCPSocketParent::Write(
     609             :         const PTCPSocketParent* v__,
     610             :         Message* msg__,
     611             :         bool nullable__) -> void
     612             : {
     613             :     int32_t id;
     614           0 :     if ((!(v__))) {
     615           0 :         if ((!(nullable__))) {
     616           0 :             FatalError("NULL actor value passed to non-nullable param");
     617             :         }
     618           0 :         id = 0;
     619             :     }
     620             :     else {
     621           0 :         id = (v__)->Id();
     622           0 :         if ((1) == (id)) {
     623           0 :             FatalError("actor has been |delete|d");
     624             :         }
     625             :     }
     626             : 
     627           0 :     Write(id, msg__);
     628           0 : }
     629             : 
     630           0 : auto PTCPSocketParent::Read(
     631             :         PTCPSocketParent** v__,
     632             :         const Message* msg__,
     633             :         PickleIterator* iter__,
     634             :         bool nullable__) -> bool
     635             : {
     636           0 :     Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PTCPSocket", PTCPSocketMsgStart);
     637           0 :     if ((actor).isNothing()) {
     638           0 :         return false;
     639             :     }
     640             : 
     641           0 :     (*(v__)) = static_cast<PTCPSocketParent*>((actor).value());
     642           0 :     return true;
     643             : }
     644             : 
     645           0 : auto PTCPSocketParent::Write(
     646             :         const CallbackData& v__,
     647             :         Message* msg__) -> void
     648             : {
     649             :     typedef CallbackData type__;
     650           0 :     Write(int((v__).type()), msg__);
     651             :     // Sentinel = 'CallbackData'
     652           0 :     (msg__)->WriteSentinel(3715623197);
     653             : 
     654           0 :     switch ((v__).type()) {
     655             :     case type__::Tvoid_t:
     656             :         {
     657           0 :             Write((v__).get_void_t(), msg__);
     658             :             // Sentinel = 'Tvoid_t'
     659           0 :             (msg__)->WriteSentinel(3041273328);
     660           0 :             return;
     661             :         }
     662             :     case type__::TSendableData:
     663             :         {
     664           0 :             Write((v__).get_SendableData(), msg__);
     665             :             // Sentinel = 'TSendableData'
     666           0 :             (msg__)->WriteSentinel(1253583583);
     667           0 :             return;
     668             :         }
     669             :     case type__::TTCPError:
     670             :         {
     671           0 :             Write((v__).get_TCPError(), msg__);
     672             :             // Sentinel = 'TTCPError'
     673           0 :             (msg__)->WriteSentinel(2275116752);
     674           0 :             return;
     675             :         }
     676             :     default:
     677             :         {
     678           0 :             FatalError("unknown union type");
     679           0 :             return;
     680             :         }
     681             :     }
     682             : }
     683             : 
     684           0 : auto PTCPSocketParent::Read(
     685             :         CallbackData* v__,
     686             :         const Message* msg__,
     687             :         PickleIterator* iter__) -> bool
     688             : {
     689             :     typedef CallbackData type__;
     690             :     int type;
     691           0 :     if ((!(Read((&(type)), msg__, iter__)))) {
     692           0 :         mozilla::ipc::UnionTypeReadError("CallbackData");
     693           0 :         return false;
     694             :     }
     695             :     // Sentinel = 'CallbackData'
     696           0 :     if ((!((msg__)->ReadSentinel(iter__, 3715623197)))) {
     697           0 :         mozilla::ipc::SentinelReadError("CallbackData");
     698           0 :         return false;
     699             :     }
     700             : 
     701           0 :     switch (type) {
     702             :     case type__::Tvoid_t:
     703             :         {
     704             :             void_t tmp = void_t();
     705           0 :             (*(v__)) = tmp;
     706           0 :             if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
     707           0 :                 FatalError("Error deserializing Union type");
     708           0 :                 return false;
     709             :             }
     710             :             // Sentinel = 'Tvoid_t'
     711           0 :             if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
     712           0 :                 mozilla::ipc::SentinelReadError("Error deserializing Union type");
     713           0 :                 return false;
     714             :             }
     715           0 :             return true;
     716             :         }
     717             :     case type__::TSendableData:
     718             :         {
     719           0 :             SendableData tmp = SendableData();
     720           0 :             (*(v__)) = tmp;
     721           0 :             if ((!(Read((&((v__)->get_SendableData())), msg__, iter__)))) {
     722           0 :                 FatalError("Error deserializing Union type");
     723           0 :                 return false;
     724             :             }
     725             :             // Sentinel = 'TSendableData'
     726           0 :             if ((!((msg__)->ReadSentinel(iter__, 1253583583)))) {
     727           0 :                 mozilla::ipc::SentinelReadError("Error deserializing Union type");
     728           0 :                 return false;
     729             :             }
     730           0 :             return true;
     731             :         }
     732             :     case type__::TTCPError:
     733             :         {
     734           0 :             TCPError tmp = TCPError();
     735           0 :             (*(v__)) = tmp;
     736           0 :             if ((!(Read((&((v__)->get_TCPError())), msg__, iter__)))) {
     737           0 :                 FatalError("Error deserializing Union type");
     738           0 :                 return false;
     739             :             }
     740             :             // Sentinel = 'TTCPError'
     741           0 :             if ((!((msg__)->ReadSentinel(iter__, 2275116752)))) {
     742           0 :                 mozilla::ipc::SentinelReadError("Error deserializing Union type");
     743           0 :                 return false;
     744             :             }
     745           0 :             return true;
     746             :         }
     747             :     default:
     748             :         {
     749           0 :             FatalError("unknown union type");
     750           0 :             return false;
     751             :         }
     752             :     }
     753             : }
     754             : 
     755           0 : auto PTCPSocketParent::Write(
     756             :         const TCPError& v__,
     757             :         Message* msg__) -> void
     758             : {
     759           0 :     Write((v__).name(), msg__);
     760             :     // Sentinel = 'name'
     761           0 :     (msg__)->WriteSentinel(15034981);
     762           0 :     Write((v__).message(), msg__);
     763             :     // Sentinel = 'message'
     764           0 :     (msg__)->WriteSentinel(1366108954);
     765           0 : }
     766             : 
     767           0 : auto PTCPSocketParent::Read(
     768             :         TCPError* v__,
     769             :         const Message* msg__,
     770             :         PickleIterator* iter__) -> bool
     771             : {
     772           0 :     if ((!(Read((&((v__)->name())), msg__, iter__)))) {
     773           0 :         FatalError("Error deserializing 'name' (nsString) member of 'TCPError'");
     774           0 :         return false;
     775             :     }
     776             :     // Sentinel = 'name'
     777           0 :     if ((!((msg__)->ReadSentinel(iter__, 15034981)))) {
     778           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'name' (nsString) member of 'TCPError'");
     779           0 :         return false;
     780             :     }
     781           0 :     if ((!(Read((&((v__)->message())), msg__, iter__)))) {
     782           0 :         FatalError("Error deserializing 'message' (nsString) member of 'TCPError'");
     783           0 :         return false;
     784             :     }
     785             :     // Sentinel = 'message'
     786           0 :     if ((!((msg__)->ReadSentinel(iter__, 1366108954)))) {
     787           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'message' (nsString) member of 'TCPError'");
     788           0 :         return false;
     789             :     }
     790           0 :     return true;
     791             : }
     792             : 
     793             : 
     794             : 
     795             : } // namespace net
     796             : } // namespace mozilla

Generated by: LCOV version 1.13