LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - PHeapSnapshotTempFileHelperChild.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 169 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 23 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/devtools/PHeapSnapshotTempFileHelperChild.h"
       8             : 
       9             : #include "mozilla/dom/PContentChild.h"
      10             : 
      11             : #include "nsIFile.h"
      12             : #include "GeckoProfiler.h"
      13             : 
      14             : namespace mozilla {
      15             : namespace devtools {
      16             : 
      17             : 
      18           0 : auto PHeapSnapshotTempFileHelperChild::ActorDestroy(ActorDestroyReason aWhy) -> void
      19             : {
      20           0 : }
      21             : 
      22           0 : MOZ_IMPLICIT PHeapSnapshotTempFileHelperChild::PHeapSnapshotTempFileHelperChild() :
      23             :     mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
      24           0 :     mState(PHeapSnapshotTempFileHelper::__Dead)
      25             : {
      26           0 :     MOZ_COUNT_CTOR(PHeapSnapshotTempFileHelperChild);
      27           0 : }
      28             : 
      29           0 : PHeapSnapshotTempFileHelperChild::~PHeapSnapshotTempFileHelperChild()
      30             : {
      31           0 :     MOZ_COUNT_DTOR(PHeapSnapshotTempFileHelperChild);
      32           0 : }
      33             : 
      34           0 : auto PHeapSnapshotTempFileHelperChild::Manager() const -> PContentChild*
      35             : {
      36           0 :     return static_cast<PContentChild*>(IProtocol::Manager());
      37             : }
      38             : 
      39           0 : auto PHeapSnapshotTempFileHelperChild::SendOpenHeapSnapshotTempFile(OpenHeapSnapshotTempFileResponse* response) -> bool
      40             : {
      41           0 :     IPC::Message* msg__ = PHeapSnapshotTempFileHelper::Msg_OpenHeapSnapshotTempFile(Id());
      42             : 
      43             : 
      44           0 :     (msg__)->set_sync();
      45             : 
      46             : 
      47           0 :     Message reply__;
      48             : 
      49           0 :     if (mozilla::ipc::LoggingEnabledFor("PHeapSnapshotTempFileHelperChild")) {
      50           0 :         mozilla::ipc::LogMessageForProtocol("PHeapSnapshotTempFileHelperChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      51             :     }
      52           0 :     AUTO_PROFILER_LABEL("PHeapSnapshotTempFileHelper::Msg_OpenHeapSnapshotTempFile", OTHER);
      53           0 :     PHeapSnapshotTempFileHelper::Transition(PHeapSnapshotTempFileHelper::Msg_OpenHeapSnapshotTempFile__ID, (&(mState)));
      54             : 
      55             :     bool sendok__;
      56             :     {
      57             :         AutoProfilerTracing syncIPCTracer(
      58             :                 "IPC",
      59           0 :                 "PHeapSnapshotTempFileHelper::Msg_OpenHeapSnapshotTempFile");
      60           0 :         sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
      61             :     }
      62           0 :     if ((!(sendok__))) {
      63           0 :         return false;
      64             :     }
      65             : 
      66           0 :     if (mozilla::ipc::LoggingEnabledFor("PHeapSnapshotTempFileHelperChild")) {
      67           0 :         mozilla::ipc::LogMessageForProtocol("PHeapSnapshotTempFileHelperChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
      68             :     }
      69             : 
      70           0 :     PickleIterator iter__(reply__);
      71             : 
      72           0 :     if ((!(Read(response, (&(reply__)), (&(iter__)))))) {
      73           0 :         FatalError("Error deserializing 'OpenHeapSnapshotTempFileResponse'");
      74           0 :         return false;
      75             :     }
      76             :     // Sentinel = 'response'
      77           0 :     if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 2396115421)))) {
      78           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'OpenHeapSnapshotTempFileResponse'");
      79           0 :         return false;
      80             :     }
      81           0 :     (reply__).EndRead(iter__, (reply__).type());
      82             : 
      83           0 :     return true;
      84             : }
      85             : 
      86           0 : auto PHeapSnapshotTempFileHelperChild::Send__delete__(PHeapSnapshotTempFileHelperChild* actor) -> bool
      87             : {
      88           0 :     if ((!(actor))) {
      89           0 :         return false;
      90             :     }
      91             : 
      92           0 :     IPC::Message* msg__ = PHeapSnapshotTempFileHelper::Msg___delete__((actor)->Id());
      93             : 
      94           0 :     (actor)->Write(actor, msg__, false);
      95             :     // Sentinel = 'actor'
      96           0 :     (msg__)->WriteSentinel(875202478);
      97             : 
      98             : 
      99             : 
     100           0 :     if (mozilla::ipc::LoggingEnabledFor("PHeapSnapshotTempFileHelperChild")) {
     101           0 :         mozilla::ipc::LogMessageForProtocol("PHeapSnapshotTempFileHelperChild", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     102             :     }
     103           0 :     AUTO_PROFILER_LABEL("PHeapSnapshotTempFileHelper::Msg___delete__", OTHER);
     104           0 :     PHeapSnapshotTempFileHelper::Transition(PHeapSnapshotTempFileHelper::Msg___delete____ID, (&((actor)->mState)));
     105             : 
     106           0 :     bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
     107             : 
     108           0 :     IProtocol* mgr = (actor)->Manager();
     109           0 :     (actor)->DestroySubtree(Deletion);
     110           0 :     (actor)->DeallocSubtree();
     111           0 :     (mgr)->RemoveManagee(PHeapSnapshotTempFileHelperMsgStart, actor);
     112           0 :     return sendok__;
     113             : }
     114             : 
     115           0 : auto PHeapSnapshotTempFileHelperChild::RemoveManagee(
     116             :         int32_t aProtocolId,
     117             :         ProtocolBase* aListener) -> void
     118             : {
     119           0 :     FatalError("unreached");
     120           0 :     return;
     121             : }
     122             : 
     123           0 : auto PHeapSnapshotTempFileHelperChild::OnMessageReceived(const Message& msg__) -> PHeapSnapshotTempFileHelperChild::Result
     124             : {
     125           0 :     switch ((msg__).type()) {
     126             :     case PHeapSnapshotTempFileHelper::Reply___delete____ID:
     127             :         {
     128           0 :             return MsgProcessed;
     129             :         }
     130             :     default:
     131             :         {
     132           0 :             return MsgNotKnown;
     133             :         }
     134             :     }
     135             : }
     136             : 
     137           0 : auto PHeapSnapshotTempFileHelperChild::OnMessageReceived(
     138             :         const Message& msg__,
     139             :         Message*& reply__) -> PHeapSnapshotTempFileHelperChild::Result
     140             : {
     141           0 :     return MsgNotKnown;
     142             : }
     143             : 
     144           0 : auto PHeapSnapshotTempFileHelperChild::OnCallReceived(
     145             :         const Message& msg__,
     146             :         Message*& reply__) -> PHeapSnapshotTempFileHelperChild::Result
     147             : {
     148           0 :     MOZ_ASSERT_UNREACHABLE("message protocol not supported");
     149             :     return MsgNotKnown;
     150             : }
     151             : 
     152           0 : auto PHeapSnapshotTempFileHelperChild::GetProtocolTypeId() -> int32_t
     153             : {
     154           0 :     return PHeapSnapshotTempFileHelperMsgStart;
     155             : }
     156             : 
     157           0 : auto PHeapSnapshotTempFileHelperChild::ProtocolName() const -> const char*
     158             : {
     159           0 :     return "PHeapSnapshotTempFileHelperChild";
     160             : }
     161             : 
     162           0 : auto PHeapSnapshotTempFileHelperChild::DestroySubtree(ActorDestroyReason why) -> void
     163             : {
     164             :     // Unregister from our manager.
     165           0 :     Unregister(Id());
     166             : 
     167             :     // Reject owning pending promises.
     168           0 :     (GetIPCChannel())->RejectPendingPromisesForActor(this);
     169             : 
     170             :     // Finally, destroy "us".
     171           0 :     ActorDestroy(why);
     172           0 : }
     173             : 
     174           0 : auto PHeapSnapshotTempFileHelperChild::DeallocSubtree() -> void
     175             : {
     176           0 : }
     177             : 
     178           0 : auto PHeapSnapshotTempFileHelperChild::Write(
     179             :         const OpenHeapSnapshotTempFileResponse& v__,
     180             :         Message* msg__) -> void
     181             : {
     182             :     typedef OpenHeapSnapshotTempFileResponse type__;
     183           0 :     Write(int((v__).type()), msg__);
     184             :     // Sentinel = 'OpenHeapSnapshotTempFileResponse'
     185           0 :     (msg__)->WriteSentinel(201569947);
     186             : 
     187           0 :     switch ((v__).type()) {
     188             :     case type__::Tnsresult:
     189             :         {
     190           0 :             Write((v__).get_nsresult(), msg__);
     191             :             // Sentinel = 'Tnsresult'
     192           0 :             (msg__)->WriteSentinel(2293764539);
     193           0 :             return;
     194             :         }
     195             :     case type__::TOpenedFile:
     196             :         {
     197           0 :             Write((v__).get_OpenedFile(), msg__);
     198             :             // Sentinel = 'TOpenedFile'
     199           0 :             (msg__)->WriteSentinel(218745554);
     200           0 :             return;
     201             :         }
     202             :     default:
     203             :         {
     204           0 :             FatalError("unknown union type");
     205           0 :             return;
     206             :         }
     207             :     }
     208             : }
     209             : 
     210           0 : auto PHeapSnapshotTempFileHelperChild::Read(
     211             :         OpenHeapSnapshotTempFileResponse* v__,
     212             :         const Message* msg__,
     213             :         PickleIterator* iter__) -> bool
     214             : {
     215             :     typedef OpenHeapSnapshotTempFileResponse type__;
     216             :     int type;
     217           0 :     if ((!(Read((&(type)), msg__, iter__)))) {
     218           0 :         mozilla::ipc::UnionTypeReadError("OpenHeapSnapshotTempFileResponse");
     219           0 :         return false;
     220             :     }
     221             :     // Sentinel = 'OpenHeapSnapshotTempFileResponse'
     222           0 :     if ((!((msg__)->ReadSentinel(iter__, 201569947)))) {
     223           0 :         mozilla::ipc::SentinelReadError("OpenHeapSnapshotTempFileResponse");
     224           0 :         return false;
     225             :     }
     226             : 
     227           0 :     switch (type) {
     228             :     case type__::Tnsresult:
     229             :         {
     230           0 :             nsresult tmp = nsresult();
     231           0 :             (*(v__)) = tmp;
     232           0 :             if ((!(Read((&((v__)->get_nsresult())), msg__, iter__)))) {
     233           0 :                 FatalError("Error deserializing Union type");
     234           0 :                 return false;
     235             :             }
     236             :             // Sentinel = 'Tnsresult'
     237           0 :             if ((!((msg__)->ReadSentinel(iter__, 2293764539)))) {
     238           0 :                 mozilla::ipc::SentinelReadError("Error deserializing Union type");
     239           0 :                 return false;
     240             :             }
     241           0 :             return true;
     242             :         }
     243             :     case type__::TOpenedFile:
     244             :         {
     245           0 :             OpenedFile tmp = OpenedFile();
     246           0 :             (*(v__)) = tmp;
     247           0 :             if ((!(Read((&((v__)->get_OpenedFile())), msg__, iter__)))) {
     248           0 :                 FatalError("Error deserializing Union type");
     249           0 :                 return false;
     250             :             }
     251             :             // Sentinel = 'TOpenedFile'
     252           0 :             if ((!((msg__)->ReadSentinel(iter__, 218745554)))) {
     253           0 :                 mozilla::ipc::SentinelReadError("Error deserializing Union type");
     254           0 :                 return false;
     255             :             }
     256           0 :             return true;
     257             :         }
     258             :     default:
     259             :         {
     260           0 :             FatalError("unknown union type");
     261           0 :             return false;
     262             :         }
     263             :     }
     264             : }
     265             : 
     266           0 : auto PHeapSnapshotTempFileHelperChild::Write(
     267             :         const FileDescriptor& v__,
     268             :         Message* msg__) -> void
     269             : {
     270           0 :     FileDescriptor::PickleType pfd = (v__).ShareTo(FileDescriptor::IPDLPrivate(), OtherPid());
     271           0 :     IPC::WriteParam(msg__, pfd);
     272           0 : }
     273             : 
     274           0 : auto PHeapSnapshotTempFileHelperChild::Read(
     275             :         FileDescriptor* v__,
     276             :         const Message* msg__,
     277             :         PickleIterator* iter__) -> bool
     278             : {
     279           0 :     FileDescriptor::PickleType pfd;
     280           0 :     if ((!(IPC::ReadParam(msg__, iter__, (&(pfd)))))) {
     281           0 :         return false;
     282             :     }
     283             : 
     284           0 :     FileDescriptor fd = FileDescriptor(FileDescriptor::IPDLPrivate(), pfd);
     285           0 :     if ((!((fd).IsValid()))) {
     286           0 :         mozilla::ipc::ProtocolErrorBreakpoint("[PHeapSnapshotTempFileHelperChild] Received an invalid file descriptor!");
     287             :     }
     288             : 
     289           0 :     (*(v__)) = fd;
     290           0 :     return true;
     291             : }
     292             : 
     293           0 : auto PHeapSnapshotTempFileHelperChild::Write(
     294             :         const OpenedFile& v__,
     295             :         Message* msg__) -> void
     296             : {
     297           0 :     Write((v__).path(), msg__);
     298             :     // Sentinel = 'path'
     299           0 :     (msg__)->WriteSentinel(913629401);
     300           0 :     Write((v__).snapshotId(), msg__);
     301             :     // Sentinel = 'snapshotId'
     302           0 :     (msg__)->WriteSentinel(2517068057);
     303           0 :     Write((v__).descriptor(), msg__);
     304             :     // Sentinel = 'descriptor'
     305           0 :     (msg__)->WriteSentinel(2435877233);
     306           0 : }
     307             : 
     308           0 : auto PHeapSnapshotTempFileHelperChild::Read(
     309             :         OpenedFile* v__,
     310             :         const Message* msg__,
     311             :         PickleIterator* iter__) -> bool
     312             : {
     313           0 :     if ((!(Read((&((v__)->path())), msg__, iter__)))) {
     314           0 :         FatalError("Error deserializing 'path' (nsString) member of 'OpenedFile'");
     315           0 :         return false;
     316             :     }
     317             :     // Sentinel = 'path'
     318           0 :     if ((!((msg__)->ReadSentinel(iter__, 913629401)))) {
     319           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'path' (nsString) member of 'OpenedFile'");
     320           0 :         return false;
     321             :     }
     322           0 :     if ((!(Read((&((v__)->snapshotId())), msg__, iter__)))) {
     323           0 :         FatalError("Error deserializing 'snapshotId' (nsString) member of 'OpenedFile'");
     324           0 :         return false;
     325             :     }
     326             :     // Sentinel = 'snapshotId'
     327           0 :     if ((!((msg__)->ReadSentinel(iter__, 2517068057)))) {
     328           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'snapshotId' (nsString) member of 'OpenedFile'");
     329           0 :         return false;
     330             :     }
     331           0 :     if ((!(Read((&((v__)->descriptor())), msg__, iter__)))) {
     332           0 :         FatalError("Error deserializing 'descriptor' (FileDescriptor) member of 'OpenedFile'");
     333           0 :         return false;
     334             :     }
     335             :     // Sentinel = 'descriptor'
     336           0 :     if ((!((msg__)->ReadSentinel(iter__, 2435877233)))) {
     337           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'descriptor' (FileDescriptor) member of 'OpenedFile'");
     338           0 :         return false;
     339             :     }
     340           0 :     return true;
     341             : }
     342             : 
     343           0 : auto PHeapSnapshotTempFileHelperChild::Write(
     344             :         const PHeapSnapshotTempFileHelperChild* v__,
     345             :         Message* msg__,
     346             :         bool nullable__) -> void
     347             : {
     348             :     int32_t id;
     349           0 :     if ((!(v__))) {
     350           0 :         if ((!(nullable__))) {
     351           0 :             FatalError("NULL actor value passed to non-nullable param");
     352             :         }
     353           0 :         id = 0;
     354             :     }
     355             :     else {
     356           0 :         id = (v__)->Id();
     357           0 :         if ((1) == (id)) {
     358           0 :             FatalError("actor has been |delete|d");
     359             :         }
     360             :     }
     361             : 
     362           0 :     Write(id, msg__);
     363           0 : }
     364             : 
     365           0 : auto PHeapSnapshotTempFileHelperChild::Read(
     366             :         PHeapSnapshotTempFileHelperChild** v__,
     367             :         const Message* msg__,
     368             :         PickleIterator* iter__,
     369             :         bool nullable__) -> bool
     370             : {
     371           0 :     Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PHeapSnapshotTempFileHelper", PHeapSnapshotTempFileHelperMsgStart);
     372           0 :     if ((actor).isNothing()) {
     373           0 :         return false;
     374             :     }
     375             : 
     376           0 :     (*(v__)) = static_cast<PHeapSnapshotTempFileHelperChild*>((actor).value());
     377           0 :     return true;
     378             : }
     379             : 
     380             : 
     381             : 
     382             : } // namespace devtools
     383             : } // namespace mozilla

Generated by: LCOV version 1.13