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

Generated by: LCOV version 1.13