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

Generated by: LCOV version 1.13