LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - PParentToChildStreamParent.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 110 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 16 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/ipc/PParentToChildStreamParent.h"
       8             : 
       9             : #include "mozilla/ipc/PBackgroundParent.h"
      10             : #include "mozilla/dom/PContentParent.h"
      11             : #include "mozilla/dom/PContentBridgeParent.h"
      12             : 
      13             : #include "nsIFile.h"
      14             : #include "GeckoProfiler.h"
      15             : 
      16             : namespace mozilla {
      17             : namespace ipc {
      18             : 
      19             : 
      20           0 : auto PParentToChildStreamParent::Recv__delete__() -> mozilla::ipc::IPCResult
      21             : {
      22           0 :     return IPC_OK();
      23             : }
      24             : 
      25             : 
      26           0 : MOZ_IMPLICIT PParentToChildStreamParent::PParentToChildStreamParent() :
      27             :     mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
      28           0 :     mState(PParentToChildStream::__Dead)
      29             : {
      30           0 :     MOZ_COUNT_CTOR(PParentToChildStreamParent);
      31           0 : }
      32             : 
      33           0 : PParentToChildStreamParent::~PParentToChildStreamParent()
      34             : {
      35           0 :     MOZ_COUNT_DTOR(PParentToChildStreamParent);
      36           0 : }
      37             : 
      38           0 : auto PParentToChildStreamParent::SendBuffer(const nsCString& aBuffer) -> bool
      39             : {
      40           0 :     IPC::Message* msg__ = PParentToChildStream::Msg_Buffer(Id());
      41             : 
      42           0 :     Write(aBuffer, msg__);
      43             :     // Sentinel = 'aBuffer'
      44           0 :     (msg__)->WriteSentinel(35469444);
      45             : 
      46             : 
      47             : 
      48             : 
      49           0 :     if (mozilla::ipc::LoggingEnabledFor("PParentToChildStreamParent")) {
      50           0 :         mozilla::ipc::LogMessageForProtocol("PParentToChildStreamParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      51             :     }
      52           0 :     AUTO_PROFILER_LABEL("PParentToChildStream::Msg_Buffer", OTHER);
      53           0 :     PParentToChildStream::Transition(PParentToChildStream::Msg_Buffer__ID, (&(mState)));
      54             : 
      55           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      56           0 :     return sendok__;
      57             : }
      58             : 
      59           0 : auto PParentToChildStreamParent::SendClose(const nsresult& aRv) -> bool
      60             : {
      61           0 :     IPC::Message* msg__ = PParentToChildStream::Msg_Close(Id());
      62             : 
      63           0 :     Write(aRv, msg__);
      64             :     // Sentinel = 'aRv'
      65           0 :     (msg__)->WriteSentinel(2742041894);
      66             : 
      67             : 
      68             : 
      69             : 
      70           0 :     if (mozilla::ipc::LoggingEnabledFor("PParentToChildStreamParent")) {
      71           0 :         mozilla::ipc::LogMessageForProtocol("PParentToChildStreamParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      72             :     }
      73           0 :     AUTO_PROFILER_LABEL("PParentToChildStream::Msg_Close", OTHER);
      74           0 :     PParentToChildStream::Transition(PParentToChildStream::Msg_Close__ID, (&(mState)));
      75             : 
      76           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      77           0 :     return sendok__;
      78             : }
      79             : 
      80           0 : auto PParentToChildStreamParent::RemoveManagee(
      81             :         int32_t aProtocolId,
      82             :         ProtocolBase* aListener) -> void
      83             : {
      84           0 :     FatalError("unreached");
      85           0 :     return;
      86             : }
      87             : 
      88           0 : auto PParentToChildStreamParent::OnMessageReceived(const Message& msg__) -> PParentToChildStreamParent::Result
      89             : {
      90           0 :     switch ((msg__).type()) {
      91             :     case PParentToChildStream::Msg_StartReading__ID:
      92             :         {
      93           0 :             if (mozilla::ipc::LoggingEnabledFor("PParentToChildStreamParent")) {
      94           0 :                 mozilla::ipc::LogMessageForProtocol("PParentToChildStreamParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
      95             :             }
      96           0 :             AUTO_PROFILER_LABEL("PParentToChildStream::Msg_StartReading", OTHER);
      97             : 
      98           0 :             PParentToChildStream::Transition(PParentToChildStream::Msg_StartReading__ID, (&(mState)));
      99           0 :             if ((!(RecvStartReading()))) {
     100           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     101             :                 // Error handled in mozilla::ipc::IPCResult
     102           0 :                 return MsgProcessingError;
     103             :             }
     104             : 
     105           0 :             return MsgProcessed;
     106             :         }
     107             :     case PParentToChildStream::Msg_RequestClose__ID:
     108             :         {
     109           0 :             if (mozilla::ipc::LoggingEnabledFor("PParentToChildStreamParent")) {
     110           0 :                 mozilla::ipc::LogMessageForProtocol("PParentToChildStreamParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     111             :             }
     112           0 :             AUTO_PROFILER_LABEL("PParentToChildStream::Msg_RequestClose", OTHER);
     113             : 
     114           0 :             PickleIterator iter__(msg__);
     115             :             nsresult aRv;
     116             : 
     117           0 :             if ((!(Read((&(aRv)), (&(msg__)), (&(iter__)))))) {
     118           0 :                 FatalError("Error deserializing 'nsresult'");
     119           0 :                 return MsgValueError;
     120             :             }
     121             :             // Sentinel = 'aRv'
     122           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2742041894)))) {
     123           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
     124           0 :                 return MsgValueError;
     125             :             }
     126           0 :             (msg__).EndRead(iter__, (msg__).type());
     127           0 :             PParentToChildStream::Transition(PParentToChildStream::Msg_RequestClose__ID, (&(mState)));
     128           0 :             if ((!(RecvRequestClose(mozilla::Move(aRv))))) {
     129           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     130             :                 // Error handled in mozilla::ipc::IPCResult
     131           0 :                 return MsgProcessingError;
     132             :             }
     133             : 
     134           0 :             return MsgProcessed;
     135             :         }
     136             :     case PParentToChildStream::Msg___delete____ID:
     137             :         {
     138           0 :             if (mozilla::ipc::LoggingEnabledFor("PParentToChildStreamParent")) {
     139           0 :                 mozilla::ipc::LogMessageForProtocol("PParentToChildStreamParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     140             :             }
     141           0 :             AUTO_PROFILER_LABEL("PParentToChildStream::Msg___delete__", OTHER);
     142             : 
     143           0 :             PickleIterator iter__(msg__);
     144             :             PParentToChildStreamParent* actor;
     145             : 
     146           0 :             if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
     147           0 :                 FatalError("Error deserializing 'PParentToChildStreamParent'");
     148           0 :                 return MsgValueError;
     149             :             }
     150             :             // Sentinel = 'actor'
     151           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
     152           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'PParentToChildStreamParent'");
     153           0 :                 return MsgValueError;
     154             :             }
     155           0 :             (msg__).EndRead(iter__, (msg__).type());
     156           0 :             PParentToChildStream::Transition(PParentToChildStream::Msg___delete____ID, (&(mState)));
     157           0 :             if ((!(Recv__delete__()))) {
     158           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     159             :                 // Error handled in mozilla::ipc::IPCResult
     160           0 :                 return MsgProcessingError;
     161             :             }
     162             : 
     163             : 
     164           0 :             IProtocol* mgr = (actor)->Manager();
     165           0 :             (actor)->DestroySubtree(Deletion);
     166           0 :             (actor)->DeallocSubtree();
     167           0 :             (mgr)->RemoveManagee(PParentToChildStreamMsgStart, actor);
     168             : 
     169           0 :             return MsgProcessed;
     170             :         }
     171             :     default:
     172             :         {
     173           0 :             return MsgNotKnown;
     174             :         }
     175             :     }
     176             : }
     177             : 
     178           0 : auto PParentToChildStreamParent::OnMessageReceived(
     179             :         const Message& msg__,
     180             :         Message*& reply__) -> PParentToChildStreamParent::Result
     181             : {
     182           0 :     return MsgNotKnown;
     183             : }
     184             : 
     185           0 : auto PParentToChildStreamParent::OnCallReceived(
     186             :         const Message& msg__,
     187             :         Message*& reply__) -> PParentToChildStreamParent::Result
     188             : {
     189           0 :     MOZ_ASSERT_UNREACHABLE("message protocol not supported");
     190             :     return MsgNotKnown;
     191             : }
     192             : 
     193           0 : auto PParentToChildStreamParent::GetProtocolTypeId() -> int32_t
     194             : {
     195           0 :     return PParentToChildStreamMsgStart;
     196             : }
     197             : 
     198           0 : auto PParentToChildStreamParent::ProtocolName() const -> const char*
     199             : {
     200           0 :     return "PParentToChildStreamParent";
     201             : }
     202             : 
     203           0 : auto PParentToChildStreamParent::DestroySubtree(ActorDestroyReason why) -> void
     204             : {
     205             :     // Unregister from our manager.
     206           0 :     Unregister(Id());
     207             : 
     208             :     // Reject owning pending promises.
     209           0 :     (GetIPCChannel())->RejectPendingPromisesForActor(this);
     210             : 
     211             :     // Finally, destroy "us".
     212           0 :     ActorDestroy(why);
     213           0 : }
     214             : 
     215           0 : auto PParentToChildStreamParent::DeallocSubtree() -> void
     216             : {
     217           0 : }
     218             : 
     219           0 : auto PParentToChildStreamParent::Write(
     220             :         const PParentToChildStreamParent* v__,
     221             :         Message* msg__,
     222             :         bool nullable__) -> void
     223             : {
     224             :     int32_t id;
     225           0 :     if ((!(v__))) {
     226           0 :         if ((!(nullable__))) {
     227           0 :             FatalError("NULL actor value passed to non-nullable param");
     228             :         }
     229           0 :         id = 0;
     230             :     }
     231             :     else {
     232           0 :         id = (v__)->Id();
     233           0 :         if ((1) == (id)) {
     234           0 :             FatalError("actor has been |delete|d");
     235             :         }
     236             :     }
     237             : 
     238           0 :     Write(id, msg__);
     239           0 : }
     240             : 
     241           0 : auto PParentToChildStreamParent::Read(
     242             :         PParentToChildStreamParent** v__,
     243             :         const Message* msg__,
     244             :         PickleIterator* iter__,
     245             :         bool nullable__) -> bool
     246             : {
     247           0 :     Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PParentToChildStream", PParentToChildStreamMsgStart);
     248           0 :     if ((actor).isNothing()) {
     249           0 :         return false;
     250             :     }
     251             : 
     252           0 :     (*(v__)) = static_cast<PParentToChildStreamParent*>((actor).value());
     253           0 :     return true;
     254             : }
     255             : 
     256             : 
     257             : 
     258             : } // namespace ipc
     259             : } // namespace mozilla

Generated by: LCOV version 1.13