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

Generated by: LCOV version 1.13