LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - PExternalHelperAppParent.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 195 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 20 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/PExternalHelperAppParent.h"
       8             : 
       9             : #include "mozilla/dom/PBrowserParent.h"
      10             : #include "mozilla/dom/PContentParent.h"
      11             : #include "mozilla/net/PChannelDiverterParent.h"
      12             : 
      13             : #include "nsIFile.h"
      14             : #include "GeckoProfiler.h"
      15             : 
      16             : namespace mozilla {
      17             : namespace dom {
      18             : 
      19             : 
      20             : 
      21           0 : MOZ_IMPLICIT PExternalHelperAppParent::PExternalHelperAppParent() :
      22             :     mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
      23           0 :     mState(PExternalHelperApp::__Dead)
      24             : {
      25           0 :     MOZ_COUNT_CTOR(PExternalHelperAppParent);
      26           0 : }
      27             : 
      28           0 : PExternalHelperAppParent::~PExternalHelperAppParent()
      29             : {
      30           0 :     MOZ_COUNT_DTOR(PExternalHelperAppParent);
      31           0 : }
      32             : 
      33           0 : auto PExternalHelperAppParent::Manager() const -> PContentParent*
      34             : {
      35           0 :     return static_cast<PContentParent*>(IProtocol::Manager());
      36             : }
      37             : 
      38           0 : auto PExternalHelperAppParent::SendCancel(const nsresult& aStatus) -> bool
      39             : {
      40           0 :     IPC::Message* msg__ = PExternalHelperApp::Msg_Cancel(Id());
      41             : 
      42           0 :     Write(aStatus, msg__);
      43             :     // Sentinel = 'aStatus'
      44           0 :     (msg__)->WriteSentinel(236002576);
      45             : 
      46             : 
      47             : 
      48             : 
      49           0 :     if (mozilla::ipc::LoggingEnabledFor("PExternalHelperAppParent")) {
      50           0 :         mozilla::ipc::LogMessageForProtocol("PExternalHelperAppParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      51             :     }
      52           0 :     AUTO_PROFILER_LABEL("PExternalHelperApp::Msg_Cancel", OTHER);
      53           0 :     PExternalHelperApp::Transition(PExternalHelperApp::Msg_Cancel__ID, (&(mState)));
      54             : 
      55           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      56           0 :     return sendok__;
      57             : }
      58             : 
      59           0 : auto PExternalHelperAppParent::Send__delete__(PExternalHelperAppParent* actor) -> bool
      60             : {
      61           0 :     if ((!(actor))) {
      62           0 :         return false;
      63             :     }
      64             : 
      65           0 :     IPC::Message* msg__ = PExternalHelperApp::Msg___delete__((actor)->Id());
      66             : 
      67           0 :     (actor)->Write(actor, msg__, false);
      68             :     // Sentinel = 'actor'
      69           0 :     (msg__)->WriteSentinel(875202478);
      70             : 
      71             : 
      72             : 
      73           0 :     if (mozilla::ipc::LoggingEnabledFor("PExternalHelperAppParent")) {
      74           0 :         mozilla::ipc::LogMessageForProtocol("PExternalHelperAppParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      75             :     }
      76           0 :     AUTO_PROFILER_LABEL("PExternalHelperApp::Msg___delete__", OTHER);
      77           0 :     PExternalHelperApp::Transition(PExternalHelperApp::Msg___delete____ID, (&((actor)->mState)));
      78             : 
      79           0 :     bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
      80             : 
      81           0 :     IProtocol* mgr = (actor)->Manager();
      82           0 :     (actor)->DestroySubtree(Deletion);
      83           0 :     (actor)->DeallocSubtree();
      84           0 :     (mgr)->RemoveManagee(PExternalHelperAppMsgStart, actor);
      85           0 :     return sendok__;
      86             : }
      87             : 
      88           0 : auto PExternalHelperAppParent::RemoveManagee(
      89             :         int32_t aProtocolId,
      90             :         ProtocolBase* aListener) -> void
      91             : {
      92           0 :     FatalError("unreached");
      93           0 :     return;
      94             : }
      95             : 
      96           0 : auto PExternalHelperAppParent::OnMessageReceived(const Message& msg__) -> PExternalHelperAppParent::Result
      97             : {
      98           0 :     switch ((msg__).type()) {
      99             :     case PExternalHelperApp::Msg_OnStartRequest__ID:
     100             :         {
     101           0 :             if (mozilla::ipc::LoggingEnabledFor("PExternalHelperAppParent")) {
     102           0 :                 mozilla::ipc::LogMessageForProtocol("PExternalHelperAppParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     103             :             }
     104           0 :             AUTO_PROFILER_LABEL("PExternalHelperApp::Msg_OnStartRequest", OTHER);
     105             : 
     106           0 :             PickleIterator iter__(msg__);
     107           0 :             nsCString entityID;
     108             :             PBrowserParent* windowContext;
     109             : 
     110           0 :             if ((!(Read((&(entityID)), (&(msg__)), (&(iter__)))))) {
     111           0 :                 FatalError("Error deserializing 'nsCString'");
     112           0 :                 return MsgValueError;
     113             :             }
     114             :             // Sentinel = 'entityID'
     115           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 245743354)))) {
     116           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
     117           0 :                 return MsgValueError;
     118             :             }
     119           0 :             if ((!(Read((&(windowContext)), (&(msg__)), (&(iter__)), false)))) {
     120           0 :                 FatalError("Error deserializing 'PBrowserParent'");
     121           0 :                 return MsgValueError;
     122             :             }
     123             :             // Sentinel = 'windowContext'
     124           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3429612728)))) {
     125           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'PBrowserParent'");
     126           0 :                 return MsgValueError;
     127             :             }
     128           0 :             (msg__).EndRead(iter__, (msg__).type());
     129           0 :             PExternalHelperApp::Transition(PExternalHelperApp::Msg_OnStartRequest__ID, (&(mState)));
     130           0 :             if ((!(RecvOnStartRequest(mozilla::Move(entityID), mozilla::Move(windowContext))))) {
     131           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     132             :                 // Error handled in mozilla::ipc::IPCResult
     133           0 :                 return MsgProcessingError;
     134             :             }
     135             : 
     136           0 :             return MsgProcessed;
     137             :         }
     138             :     case PExternalHelperApp::Msg_OnDataAvailable__ID:
     139             :         {
     140           0 :             if (mozilla::ipc::LoggingEnabledFor("PExternalHelperAppParent")) {
     141           0 :                 mozilla::ipc::LogMessageForProtocol("PExternalHelperAppParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     142             :             }
     143           0 :             AUTO_PROFILER_LABEL("PExternalHelperApp::Msg_OnDataAvailable", OTHER);
     144             : 
     145           0 :             PickleIterator iter__(msg__);
     146           0 :             nsCString data;
     147             :             uint64_t offset;
     148             :             uint32_t count;
     149             : 
     150           0 :             if ((!(Read((&(data)), (&(msg__)), (&(iter__)))))) {
     151           0 :                 FatalError("Error deserializing 'nsCString'");
     152           0 :                 return MsgValueError;
     153             :             }
     154             :             // Sentinel = 'data'
     155           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 843352540)))) {
     156           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
     157           0 :                 return MsgValueError;
     158             :             }
     159           0 :             if ((!(Read((&(offset)), (&(msg__)), (&(iter__)))))) {
     160           0 :                 FatalError("Error deserializing 'uint64_t'");
     161           0 :                 return MsgValueError;
     162             :             }
     163             :             // Sentinel = 'offset'
     164           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1369947863)))) {
     165           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
     166           0 :                 return MsgValueError;
     167             :             }
     168           0 :             if ((!(Read((&(count)), (&(msg__)), (&(iter__)))))) {
     169           0 :                 FatalError("Error deserializing 'uint32_t'");
     170           0 :                 return MsgValueError;
     171             :             }
     172             :             // Sentinel = 'count'
     173           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2126421856)))) {
     174           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
     175           0 :                 return MsgValueError;
     176             :             }
     177           0 :             (msg__).EndRead(iter__, (msg__).type());
     178           0 :             PExternalHelperApp::Transition(PExternalHelperApp::Msg_OnDataAvailable__ID, (&(mState)));
     179           0 :             if ((!(RecvOnDataAvailable(mozilla::Move(data), mozilla::Move(offset), mozilla::Move(count))))) {
     180           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     181             :                 // Error handled in mozilla::ipc::IPCResult
     182           0 :                 return MsgProcessingError;
     183             :             }
     184             : 
     185           0 :             return MsgProcessed;
     186             :         }
     187             :     case PExternalHelperApp::Msg_OnStopRequest__ID:
     188             :         {
     189           0 :             if (mozilla::ipc::LoggingEnabledFor("PExternalHelperAppParent")) {
     190           0 :                 mozilla::ipc::LogMessageForProtocol("PExternalHelperAppParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     191             :             }
     192           0 :             AUTO_PROFILER_LABEL("PExternalHelperApp::Msg_OnStopRequest", OTHER);
     193             : 
     194           0 :             PickleIterator iter__(msg__);
     195             :             nsresult code;
     196             : 
     197           0 :             if ((!(Read((&(code)), (&(msg__)), (&(iter__)))))) {
     198           0 :                 FatalError("Error deserializing 'nsresult'");
     199           0 :                 return MsgValueError;
     200             :             }
     201             :             // Sentinel = 'code'
     202           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3318913027)))) {
     203           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
     204           0 :                 return MsgValueError;
     205             :             }
     206           0 :             (msg__).EndRead(iter__, (msg__).type());
     207           0 :             PExternalHelperApp::Transition(PExternalHelperApp::Msg_OnStopRequest__ID, (&(mState)));
     208           0 :             if ((!(RecvOnStopRequest(mozilla::Move(code))))) {
     209           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     210             :                 // Error handled in mozilla::ipc::IPCResult
     211           0 :                 return MsgProcessingError;
     212             :             }
     213             : 
     214           0 :             return MsgProcessed;
     215             :         }
     216             :     case PExternalHelperApp::Msg_DivertToParentUsing__ID:
     217             :         {
     218           0 :             if (mozilla::ipc::LoggingEnabledFor("PExternalHelperAppParent")) {
     219           0 :                 mozilla::ipc::LogMessageForProtocol("PExternalHelperAppParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     220             :             }
     221           0 :             AUTO_PROFILER_LABEL("PExternalHelperApp::Msg_DivertToParentUsing", OTHER);
     222             : 
     223           0 :             PickleIterator iter__(msg__);
     224             :             PChannelDiverterParent* diverter;
     225             :             PBrowserParent* windowContext;
     226             : 
     227           0 :             if ((!(Read((&(diverter)), (&(msg__)), (&(iter__)), false)))) {
     228           0 :                 FatalError("Error deserializing 'PChannelDiverterParent'");
     229           0 :                 return MsgValueError;
     230             :             }
     231             :             // Sentinel = 'diverter'
     232           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1783530825)))) {
     233           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'PChannelDiverterParent'");
     234           0 :                 return MsgValueError;
     235             :             }
     236           0 :             if ((!(Read((&(windowContext)), (&(msg__)), (&(iter__)), false)))) {
     237           0 :                 FatalError("Error deserializing 'PBrowserParent'");
     238           0 :                 return MsgValueError;
     239             :             }
     240             :             // Sentinel = 'windowContext'
     241           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3429612728)))) {
     242           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'PBrowserParent'");
     243           0 :                 return MsgValueError;
     244             :             }
     245           0 :             (msg__).EndRead(iter__, (msg__).type());
     246           0 :             PExternalHelperApp::Transition(PExternalHelperApp::Msg_DivertToParentUsing__ID, (&(mState)));
     247           0 :             if ((!(RecvDivertToParentUsing(mozilla::Move(diverter), mozilla::Move(windowContext))))) {
     248           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     249             :                 // Error handled in mozilla::ipc::IPCResult
     250           0 :                 return MsgProcessingError;
     251             :             }
     252             : 
     253           0 :             return MsgProcessed;
     254             :         }
     255             :     case PExternalHelperApp::Reply___delete____ID:
     256             :         {
     257           0 :             return MsgProcessed;
     258             :         }
     259             :     default:
     260             :         {
     261           0 :             return MsgNotKnown;
     262             :         }
     263             :     }
     264             : }
     265             : 
     266           0 : auto PExternalHelperAppParent::OnMessageReceived(
     267             :         const Message& msg__,
     268             :         Message*& reply__) -> PExternalHelperAppParent::Result
     269             : {
     270           0 :     return MsgNotKnown;
     271             : }
     272             : 
     273           0 : auto PExternalHelperAppParent::OnCallReceived(
     274             :         const Message& msg__,
     275             :         Message*& reply__) -> PExternalHelperAppParent::Result
     276             : {
     277           0 :     MOZ_ASSERT_UNREACHABLE("message protocol not supported");
     278             :     return MsgNotKnown;
     279             : }
     280             : 
     281           0 : auto PExternalHelperAppParent::GetProtocolTypeId() -> int32_t
     282             : {
     283           0 :     return PExternalHelperAppMsgStart;
     284             : }
     285             : 
     286           0 : auto PExternalHelperAppParent::ProtocolName() const -> const char*
     287             : {
     288           0 :     return "PExternalHelperAppParent";
     289             : }
     290             : 
     291           0 : auto PExternalHelperAppParent::DestroySubtree(ActorDestroyReason why) -> void
     292             : {
     293             :     // Unregister from our manager.
     294           0 :     Unregister(Id());
     295             : 
     296             :     // Reject owning pending promises.
     297           0 :     (GetIPCChannel())->RejectPendingPromisesForActor(this);
     298             : 
     299             :     // Finally, destroy "us".
     300           0 :     ActorDestroy(why);
     301           0 : }
     302             : 
     303           0 : auto PExternalHelperAppParent::DeallocSubtree() -> void
     304             : {
     305           0 : }
     306             : 
     307           0 : auto PExternalHelperAppParent::Write(
     308             :         const PExternalHelperAppParent* v__,
     309             :         Message* msg__,
     310             :         bool nullable__) -> void
     311             : {
     312             :     int32_t id;
     313           0 :     if ((!(v__))) {
     314           0 :         if ((!(nullable__))) {
     315           0 :             FatalError("NULL actor value passed to non-nullable param");
     316             :         }
     317           0 :         id = 0;
     318             :     }
     319             :     else {
     320           0 :         id = (v__)->Id();
     321           0 :         if ((1) == (id)) {
     322           0 :             FatalError("actor has been |delete|d");
     323             :         }
     324             :     }
     325             : 
     326           0 :     Write(id, msg__);
     327           0 : }
     328             : 
     329           0 : auto PExternalHelperAppParent::Read(
     330             :         PExternalHelperAppParent** v__,
     331             :         const Message* msg__,
     332             :         PickleIterator* iter__,
     333             :         bool nullable__) -> bool
     334             : {
     335           0 :     Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PExternalHelperApp", PExternalHelperAppMsgStart);
     336           0 :     if ((actor).isNothing()) {
     337           0 :         return false;
     338             :     }
     339             : 
     340           0 :     (*(v__)) = static_cast<PExternalHelperAppParent*>((actor).value());
     341           0 :     return true;
     342             : }
     343             : 
     344           0 : auto PExternalHelperAppParent::Write(
     345             :         const PBrowserParent* v__,
     346             :         Message* msg__,
     347             :         bool nullable__) -> void
     348             : {
     349             :     int32_t id;
     350           0 :     if ((!(v__))) {
     351           0 :         if ((!(nullable__))) {
     352           0 :             FatalError("NULL actor value passed to non-nullable param");
     353             :         }
     354           0 :         id = 0;
     355             :     }
     356             :     else {
     357           0 :         id = (v__)->Id();
     358           0 :         if ((1) == (id)) {
     359           0 :             FatalError("actor has been |delete|d");
     360             :         }
     361             :     }
     362             : 
     363           0 :     Write(id, msg__);
     364           0 : }
     365             : 
     366           0 : auto PExternalHelperAppParent::Read(
     367             :         PBrowserParent** v__,
     368             :         const Message* msg__,
     369             :         PickleIterator* iter__,
     370             :         bool nullable__) -> bool
     371             : {
     372           0 :     Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PBrowser", PBrowserMsgStart);
     373           0 :     if ((actor).isNothing()) {
     374           0 :         return false;
     375             :     }
     376             : 
     377           0 :     (*(v__)) = static_cast<PBrowserParent*>((actor).value());
     378           0 :     return true;
     379             : }
     380             : 
     381           0 : auto PExternalHelperAppParent::Write(
     382             :         const PChannelDiverterParent* v__,
     383             :         Message* msg__,
     384             :         bool nullable__) -> void
     385             : {
     386             :     int32_t id;
     387           0 :     if ((!(v__))) {
     388           0 :         if ((!(nullable__))) {
     389           0 :             FatalError("NULL actor value passed to non-nullable param");
     390             :         }
     391           0 :         id = 0;
     392             :     }
     393             :     else {
     394           0 :         id = (v__)->Id();
     395           0 :         if ((1) == (id)) {
     396           0 :             FatalError("actor has been |delete|d");
     397             :         }
     398             :     }
     399             : 
     400           0 :     Write(id, msg__);
     401           0 : }
     402             : 
     403           0 : auto PExternalHelperAppParent::Read(
     404             :         PChannelDiverterParent** v__,
     405             :         const Message* msg__,
     406             :         PickleIterator* iter__,
     407             :         bool nullable__) -> bool
     408             : {
     409           0 :     Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PChannelDiverter", PChannelDiverterMsgStart);
     410           0 :     if ((actor).isNothing()) {
     411           0 :         return false;
     412             :     }
     413             : 
     414           0 :     (*(v__)) = static_cast<PChannelDiverterParent*>((actor).value());
     415           0 :     return true;
     416             : }
     417             : 
     418             : 
     419             : 
     420             : } // namespace dom
     421             : } // namespace mozilla

Generated by: LCOV version 1.13