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

Generated by: LCOV version 1.13