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

Generated by: LCOV version 1.13