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

       1                 : //
       2                 : // Automatically generated by ipdlc.
       3                 : // Edit at your own risk
       4                 : //
       5                 : 
       6                 : 
       7                 : #include "mozilla/dom/PContentDialogChild.h"
       8                 : 
       9                 : #include "mozilla/dom/PBrowserChild.h"
      10                 : 
      11                 : typedef IPC::Message Message;
      12                 : typedef mozilla::ipc::RPCChannel Channel;
      13                 : typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
      14                 : typedef base::ProcessHandle ProcessHandle;
      15                 : typedef mozilla::ipc::AsyncChannel AsyncChannel;
      16                 : typedef mozilla::ipc::SharedMemory SharedMemory;
      17                 : typedef mozilla::ipc::Trigger Trigger;
      18                 : typedef mozilla::ipc::ActorHandle ActorHandle;
      19                 : typedef mozilla::ipc::Shmem Shmem;
      20                 : using mozilla::dom::PBrowserChild;
      21                 : 
      22                 : namespace mozilla {
      23                 : namespace dom {
      24                 : 
      25                 : 
      26                 : bool
      27               0 : PContentDialogChild::Recv__delete__(
      28                 :         const InfallibleTArray<PRInt32>& aIntParams,
      29                 :         const InfallibleTArray<nsString>& aStringParams)
      30                 : {
      31               0 :     return true;
      32                 : }
      33                 : 
      34                 : void
      35               0 : PContentDialogChild::ActorDestroy(ActorDestroyReason why)
      36                 : {
      37               0 : }
      38                 : 
      39               0 : PContentDialogChild::PContentDialogChild() :
      40                 :     mId(0),
      41               0 :     mState(PContentDialog::__Dead)
      42                 : {
      43               0 :     MOZ_COUNT_CTOR(PContentDialogChild);
      44               0 : }
      45                 : 
      46               0 : PContentDialogChild::~PContentDialogChild()
      47                 : {
      48               0 :     MOZ_COUNT_DTOR(PContentDialogChild);
      49               0 : }
      50                 : 
      51                 : PBrowserChild*
      52               0 : PContentDialogChild::Manager()
      53                 : {
      54               0 :     return static_cast<PBrowserChild*>(mManager);
      55                 : }
      56                 : 
      57                 : PContentDialog::State
      58               0 : PContentDialogChild::state()
      59                 : {
      60               0 :     return mState;
      61                 : }
      62                 : 
      63                 : int32
      64               0 : PContentDialogChild::Register(ChannelListener* aRouted)
      65                 : {
      66               0 :     return (mManager)->Register(aRouted);
      67                 : }
      68                 : 
      69                 : int32
      70               0 : PContentDialogChild::RegisterID(
      71                 :         ChannelListener* aRouted,
      72                 :         int32 aId)
      73                 : {
      74               0 :     return (mManager)->RegisterID(aRouted, aId);
      75                 : }
      76                 : 
      77                 : ChannelListener*
      78               0 : PContentDialogChild::Lookup(int32 aId)
      79                 : {
      80               0 :     return (mManager)->Lookup(aId);
      81                 : }
      82                 : 
      83                 : void
      84               0 : PContentDialogChild::Unregister(int32 aId)
      85                 : {
      86               0 :     return (mManager)->Unregister(aId);
      87                 : }
      88                 : 
      89                 : void
      90               0 : PContentDialogChild::RemoveManagee(
      91                 :         int32 aProtocolId,
      92                 :         ChannelListener* aListener)
      93                 : {
      94               0 :     NS_RUNTIMEABORT("unreached");
      95                 :     return;
      96                 : }
      97                 : 
      98                 : Shmem::SharedMemory*
      99               0 : PContentDialogChild::CreateSharedMemory(
     100                 :         size_t aSize,
     101                 :         Shmem::SharedMemory::SharedMemoryType type,
     102                 :         bool unsafe,
     103                 :         Shmem::id_t* aId)
     104                 : {
     105               0 :     return (mManager)->CreateSharedMemory(aSize, type, unsafe, aId);
     106                 : }
     107                 : 
     108                 : bool
     109               0 : PContentDialogChild::AdoptSharedMemory(
     110                 :         Shmem::SharedMemory* segment,
     111                 :         Shmem::id_t* aId)
     112                 : {
     113               0 :     return (mManager)->AdoptSharedMemory(segment, aId);
     114                 : }
     115                 : 
     116                 : Shmem::SharedMemory*
     117               0 : PContentDialogChild::LookupSharedMemory(Shmem::id_t aId)
     118                 : {
     119               0 :     return (mManager)->LookupSharedMemory(aId);
     120                 : }
     121                 : 
     122                 : bool
     123               0 : PContentDialogChild::IsTrackingSharedMemory(Shmem::SharedMemory* segment)
     124                 : {
     125               0 :     return (mManager)->IsTrackingSharedMemory(segment);
     126                 : }
     127                 : 
     128                 : bool
     129               0 : PContentDialogChild::DestroySharedMemory(Shmem& aShmem)
     130                 : {
     131               0 :     return (mManager)->DestroySharedMemory(aShmem);
     132                 : }
     133                 : 
     134                 : ProcessHandle
     135               0 : PContentDialogChild::OtherProcess() const
     136                 : {
     137               0 :     return (mManager)->OtherProcess();
     138                 : }
     139                 : 
     140                 : AsyncChannel*
     141               0 : PContentDialogChild::GetIPCChannel()
     142                 : {
     143               0 :     return mChannel;
     144                 : }
     145                 : 
     146                 : PContentDialogChild::Result
     147               0 : PContentDialogChild::OnMessageReceived(const Message& __msg)
     148                 : {
     149               0 :     switch ((__msg).type()) {
     150                 :     case PContentDialog::Msg___delete____ID:
     151                 :         {
     152               0 :             (const_cast<Message&>(__msg)).set_name("PContentDialog::Msg___delete__");
     153               0 :             if (mozilla::ipc::LoggingEnabled()) {
     154               0 :                 (static_cast<const PContentDialog::Msg___delete__*>((&(__msg))))->Log("[PContentDialogChild] Received ", stderr);
     155                 :             }
     156                 : 
     157               0 :             void* __iter = 0;
     158                 :             PContentDialogChild* actor;
     159               0 :             InfallibleTArray<PRInt32> aIntParams;
     160               0 :             InfallibleTArray<nsString> aStringParams;
     161                 : 
     162               0 :             if ((!(Read((&(actor)), (&(__msg)), (&(__iter)), false)))) {
     163               0 :                 FatalError("error deserializing (better message TODO)");
     164               0 :                 return MsgValueError;
     165                 :             }
     166               0 :             if ((!(Read((&(aIntParams)), (&(__msg)), (&(__iter)))))) {
     167               0 :                 FatalError("error deserializing (better message TODO)");
     168               0 :                 return MsgValueError;
     169                 :             }
     170               0 :             if ((!(Read((&(aStringParams)), (&(__msg)), (&(__iter)))))) {
     171               0 :                 FatalError("error deserializing (better message TODO)");
     172               0 :                 return MsgValueError;
     173                 :             }
     174               0 :             (__msg).EndRead(__iter);
     175               0 :             if ((!(PContentDialog::Transition(mState, Trigger(Trigger::Send, PContentDialog::Msg___delete____ID), (&(mState)))))) {
     176               0 :                 NS_WARNING("bad state transition!");
     177                 :             }
     178               0 :             if ((!(Recv__delete__(aIntParams, aStringParams)))) {
     179               0 :                 return MsgProcessingError;
     180                 :             }
     181                 : 
     182               0 :             (actor)->DestroySubtree(Deletion);
     183               0 :             (actor)->DeallocSubtree();
     184               0 :             ((actor)->mManager)->RemoveManagee(PContentDialogMsgStart, actor);
     185                 : 
     186                 : 
     187               0 :             return MsgProcessed;
     188                 :         }
     189                 :     default:
     190                 :         {
     191               0 :             return MsgNotKnown;
     192                 :         }
     193                 :     }
     194                 : }
     195                 : 
     196                 : PContentDialogChild::Result
     197               0 : PContentDialogChild::OnMessageReceived(
     198                 :         const Message& __msg,
     199                 :         Message*& __reply)
     200                 : {
     201               0 :     return MsgNotKnown;
     202                 : }
     203                 : 
     204                 : PContentDialogChild::Result
     205               0 : PContentDialogChild::OnCallReceived(
     206                 :         const Message& __msg,
     207                 :         Message*& __reply)
     208                 : {
     209               0 :     return MsgNotKnown;
     210                 : }
     211                 : 
     212                 : void
     213               0 : PContentDialogChild::OnProcessingError(Result code)
     214                 : {
     215               0 :     NS_RUNTIMEABORT("`OnProcessingError' called on non-toplevel actor");
     216               0 : }
     217                 : 
     218                 : bool
     219               0 : PContentDialogChild::OnReplyTimeout()
     220                 : {
     221               0 :     NS_RUNTIMEABORT("`OnReplyTimeout' called on non-toplevel actor");
     222               0 :     return false;
     223                 : }
     224                 : 
     225                 : void
     226               0 : PContentDialogChild::OnChannelClose()
     227                 : {
     228               0 :     NS_RUNTIMEABORT("`OnClose' called on non-toplevel actor");
     229               0 : }
     230                 : 
     231                 : void
     232               0 : PContentDialogChild::OnChannelError()
     233                 : {
     234               0 :     NS_RUNTIMEABORT("`OnError' called on non-toplevel actor");
     235               0 : }
     236                 : 
     237                 : void
     238               0 : PContentDialogChild::OnChannelConnected(int32 pid)
     239                 : {
     240               0 :     NS_RUNTIMEABORT("'OnConnected' called on non-toplevel actor");
     241               0 : }
     242                 : 
     243                 : bool
     244               0 : PContentDialogChild::AllocShmem(
     245                 :         size_t aSize,
     246                 :         Shmem::SharedMemory::SharedMemoryType aType,
     247                 :         Shmem* aMem)
     248                 : {
     249                 :     Shmem::id_t aId;
     250               0 :     nsAutoPtr<Shmem::SharedMemory> rawmem(CreateSharedMemory(aSize, aType, false, (&(aId))));
     251               0 :     if ((!(rawmem))) {
     252               0 :         return false;
     253                 :     }
     254                 : 
     255               0 :     (*(aMem)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), (rawmem).forget(), aId);
     256               0 :     return true;
     257                 : }
     258                 : 
     259                 : bool
     260               0 : PContentDialogChild::AllocUnsafeShmem(
     261                 :         size_t aSize,
     262                 :         Shmem::SharedMemory::SharedMemoryType aType,
     263                 :         Shmem* aMem)
     264                 : {
     265                 :     Shmem::id_t aId;
     266               0 :     nsAutoPtr<Shmem::SharedMemory> rawmem(CreateSharedMemory(aSize, aType, true, (&(aId))));
     267               0 :     if ((!(rawmem))) {
     268               0 :         return false;
     269                 :     }
     270                 : 
     271               0 :     (*(aMem)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), (rawmem).forget(), aId);
     272               0 :     return true;
     273                 : }
     274                 : 
     275                 : bool
     276               0 : PContentDialogChild::AdoptShmem(
     277                 :         Shmem& aMem,
     278                 :         Shmem* aOutMem)
     279                 : {
     280               0 :     Shmem::SharedMemory* rawmem = (aMem).Segment(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
     281               0 :     if (((!(rawmem))) || (IsTrackingSharedMemory(rawmem))) {
     282               0 :         NS_RUNTIMEABORT("bad Shmem");
     283                 :     }
     284                 : 
     285                 :     Shmem::id_t aId;
     286               0 :     if ((!(AdoptSharedMemory(rawmem, (&(aId)))))) {
     287               0 :         return false;
     288                 :     }
     289                 : 
     290               0 :     (*(aOutMem)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), rawmem, aId);
     291               0 :     return true;
     292                 : }
     293                 : 
     294                 : bool
     295               0 : PContentDialogChild::DeallocShmem(Shmem& aMem)
     296                 : {
     297               0 :     bool ok = DestroySharedMemory(aMem);
     298               0 :     (aMem).forget(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
     299               0 :     return ok;
     300                 : }
     301                 : 
     302                 : void
     303               0 : PContentDialogChild::FatalError(const char* const msg) const
     304                 : {
     305                 :     // Virtual method to prevent inlining.
     306                 :     // This give us better error reporting.
     307                 :     // See bug 589371
     308                 : 
     309               0 :     NS_ERROR("IPDL error:");
     310               0 :     NS_ERROR(msg);
     311                 : 
     312               0 :     NS_RUNTIMEABORT("[PContentDialogChild] abort()ing as a result");
     313               0 : }
     314                 : 
     315                 : void
     316               0 : PContentDialogChild::DestroySubtree(ActorDestroyReason why)
     317                 : {
     318                 :     // Unregister from our manager.
     319               0 :     Unregister(mId);
     320               0 :     mId = 1;
     321                 : 
     322                 :     // Finally, destroy "us".
     323               0 :     ActorDestroy(why);
     324               0 : }
     325                 : 
     326                 : void
     327               0 : PContentDialogChild::DeallocSubtree()
     328                 : {
     329               0 : }
     330                 : 
     331                 : void
     332               0 : PContentDialogChild::Write(
     333                 :         PContentDialogChild* __v,
     334                 :         Message* __msg,
     335                 :         bool __nullable)
     336                 : {
     337                 :     int32 id;
     338               0 :     if ((!(__v))) {
     339               0 :         if ((!(__nullable))) {
     340               0 :             NS_RUNTIMEABORT("NULL actor value passed to non-nullable param");
     341                 :         }
     342               0 :         id = 0;
     343                 :     }
     344                 :     else {
     345               0 :         id = (__v)->mId;
     346               0 :         if ((1) == (id)) {
     347               0 :             NS_RUNTIMEABORT("actor has been |delete|d");
     348                 :         }
     349                 :     }
     350                 : 
     351               0 :     Write(id, __msg);
     352               0 : }
     353                 : 
     354                 : bool
     355               0 : PContentDialogChild::Read(
     356                 :         PContentDialogChild** __v,
     357                 :         const Message* __msg,
     358                 :         void** __iter,
     359                 :         bool __nullable)
     360                 : {
     361                 :     int32 id;
     362               0 :     if ((!(Read((&(id)), __msg, __iter)))) {
     363               0 :         return false;
     364                 :     }
     365               0 :     if (((1) == (id)) || (((0) == (id)) && ((!(__nullable))))) {
     366               0 :         return false;
     367                 :     }
     368                 : 
     369               0 :     if ((0) == (id)) {
     370               0 :         (*(__v)) = 0;
     371                 :     }
     372                 :     else {
     373               0 :         (*(__v)) = static_cast<PContentDialogChild*>(Lookup(id));
     374               0 :         if ((!((*(__v))))) {
     375               0 :             return false;
     376                 :         }
     377                 :     }
     378               0 :     return true;
     379                 : }
     380                 : 
     381                 : 
     382                 : 
     383                 : } // namespace dom
     384                 : } // namespace mozilla

Generated by: LCOV version 1.7