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

Generated by: LCOV version 1.13