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

Generated by: LCOV version 1.13