LCOV - code coverage report
Current view: directory - objdir/ipc/ipdl - PTestShellParent.cpp (source / functions) Found Hit Coverage
Test: app.info Lines: 278 0 0.0 %
Date: 2012-06-02 Functions: 48 0 0.0 %

       1                 : //
       2                 : // Automatically generated by ipdlc.
       3                 : // Edit at your own risk
       4                 : //
       5                 : 
       6                 : 
       7                 : #include "mozilla/ipc/PTestShellParent.h"
       8                 : 
       9                 : #include "mozilla/dom/PContentParent.h"
      10                 : #include "mozilla/ipc/PTestShellCommandParent.h"
      11                 : #include "mozilla/jsipc/PContextWrapperParent.h"
      12                 : 
      13                 : typedef IPC::Message Message;
      14                 : typedef mozilla::ipc::RPCChannel Channel;
      15                 : typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
      16                 : typedef base::ProcessHandle ProcessHandle;
      17                 : typedef mozilla::ipc::AsyncChannel AsyncChannel;
      18                 : typedef mozilla::ipc::SharedMemory SharedMemory;
      19                 : typedef mozilla::ipc::Trigger Trigger;
      20                 : typedef mozilla::ipc::ActorHandle ActorHandle;
      21                 : typedef mozilla::ipc::Shmem Shmem;
      22                 : using mozilla::dom::PContentParent;
      23                 : using mozilla::ipc::PTestShellCommandParent;
      24                 : using mozilla::jsipc::PContextWrapperParent;
      25                 : 
      26                 : namespace mozilla {
      27                 : namespace ipc {
      28                 : 
      29                 : 
      30                 : bool
      31               0 : PTestShellParent::RecvPContextWrapperConstructor(PContextWrapperParent* actor)
      32                 : {
      33               0 :     return true;
      34                 : }
      35                 : 
      36                 : void
      37               0 : PTestShellParent::ActorDestroy(ActorDestroyReason why)
      38                 : {
      39               0 : }
      40                 : 
      41               0 : PTestShellParent::PTestShellParent() :
      42                 :     mId(0),
      43               0 :     mState(PTestShell::__Dead)
      44                 : {
      45               0 :     MOZ_COUNT_CTOR(PTestShellParent);
      46               0 : }
      47                 : 
      48               0 : PTestShellParent::~PTestShellParent()
      49                 : {
      50               0 :     MOZ_COUNT_DTOR(PTestShellParent);
      51               0 : }
      52                 : 
      53                 : PContentParent*
      54               0 : PTestShellParent::Manager()
      55                 : {
      56               0 :     return static_cast<PContentParent*>(mManager);
      57                 : }
      58                 : 
      59                 : void
      60               0 : PTestShellParent::ManagedPTestShellCommandParent(InfallibleTArray<PTestShellCommandParent*>& aArr) const
      61                 : {
      62               0 :     aArr = mManagedPTestShellCommandParent;
      63               0 : }
      64                 : 
      65                 : const InfallibleTArray<PTestShellCommandParent*>&
      66               0 : PTestShellParent::ManagedPTestShellCommandParent() const
      67                 : {
      68               0 :     return mManagedPTestShellCommandParent;
      69                 : }
      70                 : 
      71                 : void
      72               0 : PTestShellParent::ManagedPContextWrapperParent(InfallibleTArray<PContextWrapperParent*>& aArr) const
      73                 : {
      74               0 :     aArr = mManagedPContextWrapperParent;
      75               0 : }
      76                 : 
      77                 : const InfallibleTArray<PContextWrapperParent*>&
      78               0 : PTestShellParent::ManagedPContextWrapperParent() const
      79                 : {
      80               0 :     return mManagedPContextWrapperParent;
      81                 : }
      82                 : 
      83                 : PTestShell::State
      84               0 : PTestShellParent::state()
      85                 : {
      86               0 :     return mState;
      87                 : }
      88                 : 
      89                 : bool
      90               0 : PTestShellParent::Send__delete__(PTestShellParent* actor)
      91                 : {
      92               0 :     if ((!(actor))) {
      93               0 :         return false;
      94                 :     }
      95                 : 
      96               0 :     if ((!(actor))) {
      97               0 :         return false;
      98                 :     }
      99                 : 
     100               0 :     PTestShell::Msg___delete__* __msg = new PTestShell::Msg___delete__();
     101                 : 
     102               0 :     (actor)->Write(actor, __msg, false);
     103                 : 
     104               0 :     (__msg)->set_routing_id((actor)->mId);
     105                 : 
     106                 : 
     107               0 :     if (mozilla::ipc::LoggingEnabled()) {
     108               0 :         (__msg)->Log("[PTestShellParent] Sending ", stderr);
     109                 :     }
     110               0 :     if ((!(PTestShell::Transition((actor)->mState, Trigger(Trigger::Send, PTestShell::Msg___delete____ID), (&((actor)->mState)))))) {
     111               0 :         NS_WARNING("bad state transition!");
     112                 :     }
     113                 : 
     114               0 :     bool __sendok = ((actor)->mChannel)->Send(__msg);
     115                 : 
     116               0 :     (actor)->DestroySubtree(Deletion);
     117               0 :     (actor)->DeallocSubtree();
     118               0 :     ((actor)->mManager)->RemoveManagee(PTestShellMsgStart, actor);
     119               0 :     return __sendok;
     120                 : }
     121                 : 
     122                 : bool
     123               0 : PTestShellParent::SendExecuteCommand(const nsString& aCommand)
     124                 : {
     125               0 :     PTestShell::Msg_ExecuteCommand* __msg = new PTestShell::Msg_ExecuteCommand();
     126                 : 
     127               0 :     Write(aCommand, __msg);
     128                 : 
     129               0 :     (__msg)->set_routing_id(mId);
     130                 : 
     131                 : 
     132                 : 
     133               0 :     if (mozilla::ipc::LoggingEnabled()) {
     134               0 :         (__msg)->Log("[PTestShellParent] Sending ", stderr);
     135                 :     }
     136               0 :     if ((!(PTestShell::Transition(mState, Trigger(Trigger::Send, PTestShell::Msg_ExecuteCommand__ID), (&(mState)))))) {
     137               0 :         NS_WARNING("bad state transition!");
     138                 :     }
     139                 : 
     140               0 :     bool __sendok = (mChannel)->Send(__msg);
     141               0 :     return __sendok;
     142                 : }
     143                 : 
     144                 : PTestShellCommandParent*
     145               0 : PTestShellParent::SendPTestShellCommandConstructor(const nsString& aCommand)
     146                 : {
     147               0 :     return SendPTestShellCommandConstructor(AllocPTestShellCommand(aCommand), aCommand);
     148                 : }
     149                 : 
     150                 : PTestShellCommandParent*
     151               0 : PTestShellParent::SendPTestShellCommandConstructor(
     152                 :         PTestShellCommandParent* actor,
     153                 :         const nsString& aCommand)
     154                 : {
     155               0 :     if ((!(actor))) {
     156               0 :         return 0;
     157                 :     }
     158               0 :     (actor)->mId = Register(actor);
     159               0 :     (actor)->mManager = this;
     160               0 :     (actor)->mChannel = mChannel;
     161               0 :     (mManagedPTestShellCommandParent).InsertElementSorted(actor);
     162               0 :     (actor)->mState = mozilla::ipc::PTestShellCommand::__Start;
     163                 : 
     164               0 :     PTestShell::Msg_PTestShellCommandConstructor* __msg = new PTestShell::Msg_PTestShellCommandConstructor();
     165                 : 
     166               0 :     Write(actor, __msg, false);
     167               0 :     Write(aCommand, __msg);
     168                 : 
     169               0 :     (__msg)->set_routing_id(mId);
     170                 : 
     171                 : 
     172               0 :     if (mozilla::ipc::LoggingEnabled()) {
     173               0 :         (__msg)->Log("[PTestShellParent] Sending ", stderr);
     174                 :     }
     175               0 :     if ((!(PTestShell::Transition(mState, Trigger(Trigger::Send, PTestShell::Msg_PTestShellCommandConstructor__ID), (&(mState)))))) {
     176               0 :         NS_WARNING("bad state transition!");
     177                 :     }
     178                 : 
     179               0 :     bool __sendok = (mChannel)->Send(__msg);
     180               0 :     if ((!(__sendok))) {
     181               0 :         (actor)->DestroySubtree(FailedConstructor);
     182               0 :         (actor)->DeallocSubtree();
     183               0 :         ((actor)->mManager)->RemoveManagee(PTestShellCommandMsgStart, actor);
     184               0 :         return 0;
     185                 :     }
     186               0 :     return actor;
     187                 : }
     188                 : 
     189                 : int32
     190               0 : PTestShellParent::Register(ChannelListener* aRouted)
     191                 : {
     192               0 :     return (mManager)->Register(aRouted);
     193                 : }
     194                 : 
     195                 : int32
     196               0 : PTestShellParent::RegisterID(
     197                 :         ChannelListener* aRouted,
     198                 :         int32 aId)
     199                 : {
     200               0 :     return (mManager)->RegisterID(aRouted, aId);
     201                 : }
     202                 : 
     203                 : ChannelListener*
     204               0 : PTestShellParent::Lookup(int32 aId)
     205                 : {
     206               0 :     return (mManager)->Lookup(aId);
     207                 : }
     208                 : 
     209                 : void
     210               0 : PTestShellParent::Unregister(int32 aId)
     211                 : {
     212               0 :     return (mManager)->Unregister(aId);
     213                 : }
     214                 : 
     215                 : void
     216               0 : PTestShellParent::RemoveManagee(
     217                 :         int32 aProtocolId,
     218                 :         ChannelListener* aListener)
     219                 : {
     220               0 :     switch (aProtocolId) {
     221                 :     case PTestShellCommandMsgStart:
     222                 :         {
     223               0 :             PTestShellCommandParent* actor = static_cast<PTestShellCommandParent*>(aListener);
     224               0 :             NS_ABORT_IF_FALSE(((mManagedPTestShellCommandParent).NoIndex) != ((mManagedPTestShellCommandParent).BinaryIndexOf(actor)), "actor not managed by this!");
     225                 : 
     226               0 :             (mManagedPTestShellCommandParent).RemoveElementSorted(actor);
     227               0 :             DeallocPTestShellCommand(actor);
     228               0 :             return;
     229                 :         }
     230                 :     case PContextWrapperMsgStart:
     231                 :         {
     232               0 :             PContextWrapperParent* actor = static_cast<PContextWrapperParent*>(aListener);
     233               0 :             NS_ABORT_IF_FALSE(((mManagedPContextWrapperParent).NoIndex) != ((mManagedPContextWrapperParent).BinaryIndexOf(actor)), "actor not managed by this!");
     234                 : 
     235               0 :             (mManagedPContextWrapperParent).RemoveElementSorted(actor);
     236               0 :             DeallocPContextWrapper(actor);
     237               0 :             return;
     238                 :         }
     239                 :     default:
     240                 :         {
     241               0 :             NS_RUNTIMEABORT("unreached");
     242               0 :             return;
     243                 :         }
     244                 :     }
     245                 : }
     246                 : 
     247                 : Shmem::SharedMemory*
     248               0 : PTestShellParent::CreateSharedMemory(
     249                 :         size_t aSize,
     250                 :         Shmem::SharedMemory::SharedMemoryType type,
     251                 :         bool unsafe,
     252                 :         Shmem::id_t* aId)
     253                 : {
     254               0 :     return (mManager)->CreateSharedMemory(aSize, type, unsafe, aId);
     255                 : }
     256                 : 
     257                 : bool
     258               0 : PTestShellParent::AdoptSharedMemory(
     259                 :         Shmem::SharedMemory* segment,
     260                 :         Shmem::id_t* aId)
     261                 : {
     262               0 :     return (mManager)->AdoptSharedMemory(segment, aId);
     263                 : }
     264                 : 
     265                 : Shmem::SharedMemory*
     266               0 : PTestShellParent::LookupSharedMemory(Shmem::id_t aId)
     267                 : {
     268               0 :     return (mManager)->LookupSharedMemory(aId);
     269                 : }
     270                 : 
     271                 : bool
     272               0 : PTestShellParent::IsTrackingSharedMemory(Shmem::SharedMemory* segment)
     273                 : {
     274               0 :     return (mManager)->IsTrackingSharedMemory(segment);
     275                 : }
     276                 : 
     277                 : bool
     278               0 : PTestShellParent::DestroySharedMemory(Shmem& aShmem)
     279                 : {
     280               0 :     return (mManager)->DestroySharedMemory(aShmem);
     281                 : }
     282                 : 
     283                 : ProcessHandle
     284               0 : PTestShellParent::OtherProcess() const
     285                 : {
     286               0 :     return (mManager)->OtherProcess();
     287                 : }
     288                 : 
     289                 : AsyncChannel*
     290               0 : PTestShellParent::GetIPCChannel()
     291                 : {
     292               0 :     return mChannel;
     293                 : }
     294                 : 
     295                 : PTestShellParent::Result
     296               0 : PTestShellParent::OnMessageReceived(const Message& __msg)
     297                 : {
     298               0 :     switch ((__msg).type()) {
     299                 :     case PTestShell::Reply___delete____ID:
     300                 :         {
     301               0 :             return MsgProcessed;
     302                 :         }
     303                 :     case PTestShell::Reply_PTestShellCommandConstructor__ID:
     304                 :         {
     305               0 :             return MsgProcessed;
     306                 :         }
     307                 :     case PTestShell::Msg_PContextWrapperConstructor__ID:
     308                 :         {
     309               0 :             (const_cast<Message&>(__msg)).set_name("PTestShell::Msg_PContextWrapperConstructor");
     310               0 :             if (mozilla::ipc::LoggingEnabled()) {
     311               0 :                 (static_cast<const PTestShell::Msg_PContextWrapperConstructor*>((&(__msg))))->Log("[PTestShellParent] Received ", stderr);
     312                 :             }
     313                 : 
     314               0 :             void* __iter = 0;
     315                 :             ActorHandle __handle;
     316                 :             PContextWrapperParent* actor;
     317                 : 
     318               0 :             if ((!(Read((&(__handle)), (&(__msg)), (&(__iter)))))) {
     319               0 :                 FatalError("error deserializing (better message TODO)");
     320               0 :                 return MsgValueError;
     321                 :             }
     322               0 :             (__msg).EndRead(__iter);
     323               0 :             if ((!(PTestShell::Transition(mState, Trigger(Trigger::Recv, PTestShell::Msg_PContextWrapperConstructor__ID), (&(mState)))))) {
     324               0 :                 NS_WARNING("bad state transition!");
     325                 :             }
     326               0 :             actor = AllocPContextWrapper();
     327               0 :             if ((!(actor))) {
     328               0 :                 return MsgValueError;
     329                 :             }
     330               0 :             (actor)->mId = RegisterID(actor, (__handle).mId);
     331               0 :             (actor)->mManager = this;
     332               0 :             (actor)->mChannel = mChannel;
     333               0 :             (mManagedPContextWrapperParent).InsertElementSorted(actor);
     334               0 :             (actor)->mState = mozilla::jsipc::PContextWrapper::__Start;
     335                 : 
     336               0 :             if ((!(RecvPContextWrapperConstructor(actor)))) {
     337               0 :                 return MsgProcessingError;
     338                 :             }
     339                 : 
     340               0 :             return MsgProcessed;
     341                 :         }
     342                 :     default:
     343                 :         {
     344               0 :             return MsgNotKnown;
     345                 :         }
     346                 :     }
     347                 : }
     348                 : 
     349                 : PTestShellParent::Result
     350               0 : PTestShellParent::OnMessageReceived(
     351                 :         const Message& __msg,
     352                 :         Message*& __reply)
     353                 : {
     354               0 :     return MsgNotKnown;
     355                 : }
     356                 : 
     357                 : PTestShellParent::Result
     358               0 : PTestShellParent::OnCallReceived(
     359                 :         const Message& __msg,
     360                 :         Message*& __reply)
     361                 : {
     362               0 :     return MsgNotKnown;
     363                 : }
     364                 : 
     365                 : void
     366               0 : PTestShellParent::OnProcessingError(Result code)
     367                 : {
     368               0 :     NS_RUNTIMEABORT("`OnProcessingError' called on non-toplevel actor");
     369               0 : }
     370                 : 
     371                 : bool
     372               0 : PTestShellParent::OnReplyTimeout()
     373                 : {
     374               0 :     NS_RUNTIMEABORT("`OnReplyTimeout' called on non-toplevel actor");
     375               0 :     return false;
     376                 : }
     377                 : 
     378                 : void
     379               0 : PTestShellParent::OnChannelClose()
     380                 : {
     381               0 :     NS_RUNTIMEABORT("`OnClose' called on non-toplevel actor");
     382               0 : }
     383                 : 
     384                 : void
     385               0 : PTestShellParent::OnChannelError()
     386                 : {
     387               0 :     NS_RUNTIMEABORT("`OnError' called on non-toplevel actor");
     388               0 : }
     389                 : 
     390                 : void
     391               0 : PTestShellParent::OnChannelConnected(int32 pid)
     392                 : {
     393               0 :     NS_RUNTIMEABORT("'OnConnected' called on non-toplevel actor");
     394               0 : }
     395                 : 
     396                 : bool
     397               0 : PTestShellParent::AllocShmem(
     398                 :         size_t aSize,
     399                 :         Shmem::SharedMemory::SharedMemoryType aType,
     400                 :         Shmem* aMem)
     401                 : {
     402                 :     Shmem::id_t aId;
     403               0 :     nsAutoPtr<Shmem::SharedMemory> rawmem(CreateSharedMemory(aSize, aType, false, (&(aId))));
     404               0 :     if ((!(rawmem))) {
     405               0 :         return false;
     406                 :     }
     407                 : 
     408               0 :     (*(aMem)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), (rawmem).forget(), aId);
     409               0 :     return true;
     410                 : }
     411                 : 
     412                 : bool
     413               0 : PTestShellParent::AllocUnsafeShmem(
     414                 :         size_t aSize,
     415                 :         Shmem::SharedMemory::SharedMemoryType aType,
     416                 :         Shmem* aMem)
     417                 : {
     418                 :     Shmem::id_t aId;
     419               0 :     nsAutoPtr<Shmem::SharedMemory> rawmem(CreateSharedMemory(aSize, aType, true, (&(aId))));
     420               0 :     if ((!(rawmem))) {
     421               0 :         return false;
     422                 :     }
     423                 : 
     424               0 :     (*(aMem)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), (rawmem).forget(), aId);
     425               0 :     return true;
     426                 : }
     427                 : 
     428                 : bool
     429               0 : PTestShellParent::AdoptShmem(
     430                 :         Shmem& aMem,
     431                 :         Shmem* aOutMem)
     432                 : {
     433               0 :     Shmem::SharedMemory* rawmem = (aMem).Segment(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
     434               0 :     if (((!(rawmem))) || (IsTrackingSharedMemory(rawmem))) {
     435               0 :         NS_RUNTIMEABORT("bad Shmem");
     436                 :     }
     437                 : 
     438                 :     Shmem::id_t aId;
     439               0 :     if ((!(AdoptSharedMemory(rawmem, (&(aId)))))) {
     440               0 :         return false;
     441                 :     }
     442                 : 
     443               0 :     (*(aOutMem)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), rawmem, aId);
     444               0 :     return true;
     445                 : }
     446                 : 
     447                 : bool
     448               0 : PTestShellParent::DeallocShmem(Shmem& aMem)
     449                 : {
     450               0 :     bool ok = DestroySharedMemory(aMem);
     451               0 :     (aMem).forget(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
     452               0 :     return ok;
     453                 : }
     454                 : 
     455                 : void
     456               0 : PTestShellParent::FatalError(const char* const msg) const
     457                 : {
     458                 :     // Virtual method to prevent inlining.
     459                 :     // This give us better error reporting.
     460                 :     // See bug 589371
     461                 : 
     462               0 :     NS_ERROR("IPDL error:");
     463               0 :     NS_ERROR(msg);
     464                 : 
     465               0 :     NS_ERROR("[PTestShellParent] killing child side as a result");
     466                 : 
     467               0 :     if ((!(base::KillProcess(OtherProcess(), base::PROCESS_END_KILLED_BY_USER, false)))) {
     468               0 :         NS_ERROR("  may have failed to kill child!");
     469                 :     }
     470               0 : }
     471                 : 
     472                 : void
     473               0 : PTestShellParent::DestroySubtree(ActorDestroyReason why)
     474                 : {
     475                 :     // Unregister from our manager.
     476               0 :     Unregister(mId);
     477               0 :     mId = 1;
     478                 : 
     479               0 :     ActorDestroyReason subtreewhy = (((why) == (Deletion)) || ((why) == (FailedConstructor)) ? AncestorDeletion : why);
     480                 : 
     481                 :     {
     482                 :         // Recursively shutting down PTestShellCommand kids
     483               0 :         InfallibleTArray<PTestShellCommandParent*> kids = mManagedPTestShellCommandParent;
     484               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
     485               0 :             (kids[i])->DestroySubtree(subtreewhy);
     486                 :         }
     487                 :     }
     488                 :     {
     489                 :         // Recursively shutting down PContextWrapper kids
     490               0 :         InfallibleTArray<PContextWrapperParent*> kids = mManagedPContextWrapperParent;
     491               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
     492               0 :             (kids[i])->DestroySubtree(subtreewhy);
     493                 :         }
     494                 :     }
     495                 : 
     496                 :     // Finally, destroy "us".
     497               0 :     ActorDestroy(why);
     498               0 : }
     499                 : 
     500                 : void
     501               0 : PTestShellParent::DeallocSubtree()
     502                 : {
     503                 :     {
     504                 :         // Recursively deleting PTestShellCommand kids
     505               0 :         InfallibleTArray<PTestShellCommandParent*>& kids = mManagedPTestShellCommandParent;
     506               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
     507               0 :             (kids[i])->DeallocSubtree();
     508                 :         }
     509                 : 
     510               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
     511               0 :             DeallocPTestShellCommand(kids[i]);
     512                 :         }
     513               0 :         (mManagedPTestShellCommandParent).Clear();
     514                 :     }
     515                 :     {
     516                 :         // Recursively deleting PContextWrapper kids
     517               0 :         InfallibleTArray<PContextWrapperParent*>& kids = mManagedPContextWrapperParent;
     518               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
     519               0 :             (kids[i])->DeallocSubtree();
     520                 :         }
     521                 : 
     522               0 :         for (uint32 i = 0; (i) < ((kids).Length()); (++(i))) {
     523               0 :             DeallocPContextWrapper(kids[i]);
     524                 :         }
     525               0 :         (mManagedPContextWrapperParent).Clear();
     526                 :     }
     527               0 : }
     528                 : 
     529                 : void
     530               0 : PTestShellParent::Write(
     531                 :         PTestShellParent* __v,
     532                 :         Message* __msg,
     533                 :         bool __nullable)
     534                 : {
     535                 :     int32 id;
     536               0 :     if ((!(__v))) {
     537               0 :         if ((!(__nullable))) {
     538               0 :             NS_RUNTIMEABORT("NULL actor value passed to non-nullable param");
     539                 :         }
     540               0 :         id = 0;
     541                 :     }
     542                 :     else {
     543               0 :         id = (__v)->mId;
     544               0 :         if ((1) == (id)) {
     545               0 :             NS_RUNTIMEABORT("actor has been |delete|d");
     546                 :         }
     547                 :     }
     548                 : 
     549               0 :     Write(id, __msg);
     550               0 : }
     551                 : 
     552                 : bool
     553               0 : PTestShellParent::Read(
     554                 :         PTestShellParent** __v,
     555                 :         const Message* __msg,
     556                 :         void** __iter,
     557                 :         bool __nullable)
     558                 : {
     559                 :     int32 id;
     560               0 :     if ((!(Read((&(id)), __msg, __iter)))) {
     561               0 :         return false;
     562                 :     }
     563               0 :     if (((1) == (id)) || (((0) == (id)) && ((!(__nullable))))) {
     564               0 :         return false;
     565                 :     }
     566                 : 
     567               0 :     if ((0) == (id)) {
     568               0 :         (*(__v)) = 0;
     569                 :     }
     570                 :     else {
     571               0 :         (*(__v)) = static_cast<PTestShellParent*>(Lookup(id));
     572               0 :         if ((!((*(__v))))) {
     573               0 :             return false;
     574                 :         }
     575                 :     }
     576               0 :     return true;
     577                 : }
     578                 : 
     579                 : void
     580               0 : PTestShellParent::Write(
     581                 :         PContextWrapperParent* __v,
     582                 :         Message* __msg,
     583                 :         bool __nullable)
     584                 : {
     585                 :     int32 id;
     586               0 :     if ((!(__v))) {
     587               0 :         if ((!(__nullable))) {
     588               0 :             NS_RUNTIMEABORT("NULL actor value passed to non-nullable param");
     589                 :         }
     590               0 :         id = 0;
     591                 :     }
     592                 :     else {
     593               0 :         id = (__v)->mId;
     594               0 :         if ((1) == (id)) {
     595               0 :             NS_RUNTIMEABORT("actor has been |delete|d");
     596                 :         }
     597                 :     }
     598                 : 
     599               0 :     Write(id, __msg);
     600               0 : }
     601                 : 
     602                 : bool
     603               0 : PTestShellParent::Read(
     604                 :         PContextWrapperParent** __v,
     605                 :         const Message* __msg,
     606                 :         void** __iter,
     607                 :         bool __nullable)
     608                 : {
     609                 :     int32 id;
     610               0 :     if ((!(Read((&(id)), __msg, __iter)))) {
     611               0 :         return false;
     612                 :     }
     613               0 :     if (((1) == (id)) || (((0) == (id)) && ((!(__nullable))))) {
     614               0 :         return false;
     615                 :     }
     616                 : 
     617               0 :     if ((0) == (id)) {
     618               0 :         (*(__v)) = 0;
     619                 :     }
     620                 :     else {
     621               0 :         (*(__v)) = static_cast<PContextWrapperParent*>(Lookup(id));
     622               0 :         if ((!((*(__v))))) {
     623               0 :             return false;
     624                 :         }
     625                 :     }
     626               0 :     return true;
     627                 : }
     628                 : 
     629                 : void
     630               0 : PTestShellParent::Write(
     631                 :         PTestShellCommandParent* __v,
     632                 :         Message* __msg,
     633                 :         bool __nullable)
     634                 : {
     635                 :     int32 id;
     636               0 :     if ((!(__v))) {
     637               0 :         if ((!(__nullable))) {
     638               0 :             NS_RUNTIMEABORT("NULL actor value passed to non-nullable param");
     639                 :         }
     640               0 :         id = 0;
     641                 :     }
     642                 :     else {
     643               0 :         id = (__v)->mId;
     644               0 :         if ((1) == (id)) {
     645               0 :             NS_RUNTIMEABORT("actor has been |delete|d");
     646                 :         }
     647                 :     }
     648                 : 
     649               0 :     Write(id, __msg);
     650               0 : }
     651                 : 
     652                 : bool
     653               0 : PTestShellParent::Read(
     654                 :         PTestShellCommandParent** __v,
     655                 :         const Message* __msg,
     656                 :         void** __iter,
     657                 :         bool __nullable)
     658                 : {
     659                 :     int32 id;
     660               0 :     if ((!(Read((&(id)), __msg, __iter)))) {
     661               0 :         return false;
     662                 :     }
     663               0 :     if (((1) == (id)) || (((0) == (id)) && ((!(__nullable))))) {
     664               0 :         return false;
     665                 :     }
     666                 : 
     667               0 :     if ((0) == (id)) {
     668               0 :         (*(__v)) = 0;
     669                 :     }
     670                 :     else {
     671               0 :         (*(__v)) = static_cast<PTestShellCommandParent*>(Lookup(id));
     672               0 :         if ((!((*(__v))))) {
     673               0 :             return false;
     674                 :         }
     675                 :     }
     676               0 :     return true;
     677                 : }
     678                 : 
     679                 : 
     680                 : 
     681                 : } // namespace ipc
     682                 : } // namespace mozilla

Generated by: LCOV version 1.7