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

       1                 : //
       2                 : // Automatically generated by ipdlc.
       3                 : // Edit at your own risk
       4                 : //
       5                 : 
       6                 : 
       7                 : #include "mozilla/plugins/PPluginScriptableObjectChild.h"
       8                 : 
       9                 : #include "mozilla/plugins/PPluginInstanceChild.h"
      10                 : #include "mozilla/plugins/PPluginIdentifierChild.h"
      11                 : 
      12                 : typedef IPC::Message Message;
      13                 : typedef mozilla::ipc::RPCChannel Channel;
      14                 : typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
      15                 : typedef base::ProcessHandle ProcessHandle;
      16                 : typedef mozilla::ipc::AsyncChannel AsyncChannel;
      17                 : typedef mozilla::ipc::SharedMemory SharedMemory;
      18                 : typedef mozilla::ipc::Trigger Trigger;
      19                 : typedef mozilla::ipc::ActorHandle ActorHandle;
      20                 : typedef mozilla::plugins::Variant Variant;
      21                 : typedef mozilla::ipc::Shmem Shmem;
      22                 : typedef mozilla::void_t void_t;
      23                 : typedef mozilla::null_t null_t;
      24                 : using mozilla::plugins::PPluginInstanceChild;
      25                 : using mozilla::plugins::PPluginIdentifierChild;
      26                 : 
      27                 : namespace mozilla {
      28                 : namespace plugins {
      29                 : 
      30                 : 
      31                 : bool
      32               0 : PPluginScriptableObjectChild::Recv__delete__()
      33                 : {
      34               0 :     return true;
      35                 : }
      36                 : 
      37                 : void
      38               0 : PPluginScriptableObjectChild::ActorDestroy(ActorDestroyReason why)
      39                 : {
      40               0 : }
      41                 : 
      42               0 : PPluginScriptableObjectChild::PPluginScriptableObjectChild() :
      43                 :     mId(0),
      44               0 :     mState(PPluginScriptableObject::__Dead)
      45                 : {
      46               0 :     MOZ_COUNT_CTOR(PPluginScriptableObjectChild);
      47               0 : }
      48                 : 
      49               0 : PPluginScriptableObjectChild::~PPluginScriptableObjectChild()
      50                 : {
      51               0 :     MOZ_COUNT_DTOR(PPluginScriptableObjectChild);
      52               0 : }
      53                 : 
      54                 : PPluginInstanceChild*
      55               0 : PPluginScriptableObjectChild::Manager()
      56                 : {
      57               0 :     return static_cast<PPluginInstanceChild*>(mManager);
      58                 : }
      59                 : 
      60                 : PPluginScriptableObject::State
      61               0 : PPluginScriptableObjectChild::state()
      62                 : {
      63               0 :     return mState;
      64                 : }
      65                 : 
      66                 : bool
      67               0 : PPluginScriptableObjectChild::Send__delete__(PPluginScriptableObjectChild* actor)
      68                 : {
      69               0 :     if ((!(actor))) {
      70               0 :         return false;
      71                 :     }
      72                 : 
      73               0 :     if ((!(actor))) {
      74               0 :         return false;
      75                 :     }
      76                 : 
      77               0 :     PPluginScriptableObject::Msg___delete__* __msg = new PPluginScriptableObject::Msg___delete__();
      78                 : 
      79               0 :     (actor)->Write(actor, __msg, false);
      80                 : 
      81               0 :     (__msg)->set_routing_id((actor)->mId);
      82                 : 
      83                 : 
      84               0 :     if (mozilla::ipc::LoggingEnabled()) {
      85               0 :         (__msg)->Log("[PPluginScriptableObjectChild] Sending ", stderr);
      86                 :     }
      87               0 :     if ((!(PPluginScriptableObject::Transition((actor)->mState, Trigger(Trigger::Recv, PPluginScriptableObject::Msg___delete____ID), (&((actor)->mState)))))) {
      88               0 :         NS_WARNING("bad state transition!");
      89                 :     }
      90                 : 
      91               0 :     bool __sendok = ((actor)->mChannel)->Send(__msg);
      92                 : 
      93               0 :     (actor)->DestroySubtree(Deletion);
      94               0 :     (actor)->DeallocSubtree();
      95               0 :     ((actor)->mManager)->RemoveManagee(PPluginScriptableObjectMsgStart, actor);
      96               0 :     return __sendok;
      97                 : }
      98                 : 
      99                 : bool
     100               0 : PPluginScriptableObjectChild::CallNPN_Evaluate(
     101                 :         const nsCString& aScript,
     102                 :         Variant* aResult,
     103                 :         bool* aSuccess)
     104                 : {
     105               0 :     PPluginScriptableObject::Msg_NPN_Evaluate* __msg = new PPluginScriptableObject::Msg_NPN_Evaluate();
     106                 : 
     107               0 :     Write(aScript, __msg);
     108                 : 
     109               0 :     (__msg)->set_routing_id(mId);
     110               0 :     (__msg)->set_rpc();
     111                 : 
     112                 : 
     113               0 :     Message __reply;
     114                 : 
     115               0 :     if (mozilla::ipc::LoggingEnabled()) {
     116               0 :         (__msg)->Log("[PPluginScriptableObjectChild] Sending ", stderr);
     117                 :     }
     118               0 :     if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Recv, PPluginScriptableObject::Msg_NPN_Evaluate__ID), (&(mState)))))) {
     119               0 :         NS_WARNING("bad state transition!");
     120                 :     }
     121                 : 
     122               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     123               0 :     if ((!(__sendok))) {
     124               0 :         return false;
     125                 :     }
     126                 : 
     127               0 :     if (mozilla::ipc::LoggingEnabled()) {
     128               0 :         (static_cast<const PPluginScriptableObject::Reply_NPN_Evaluate*>((&(__reply))))->Log("[PPluginScriptableObjectChild] Received reply ", stderr);
     129                 :     }
     130                 : 
     131               0 :     void* __iter = 0;
     132               0 :     if ((!(Read(aResult, (&(__reply)), (&(__iter)))))) {
     133               0 :         FatalError("error deserializing (better message TODO)");
     134               0 :         return false;
     135                 :     }
     136               0 :     if ((!(Read(aSuccess, (&(__reply)), (&(__iter)))))) {
     137               0 :         FatalError("error deserializing (better message TODO)");
     138               0 :         return false;
     139                 :     }
     140               0 :     (__reply).EndRead(__iter);
     141                 : 
     142               0 :     return true;
     143                 : }
     144                 : 
     145                 : bool
     146               0 : PPluginScriptableObjectChild::CallHasMethod(
     147                 :         PPluginIdentifierChild* aId,
     148                 :         bool* aHasMethod)
     149                 : {
     150               0 :     PPluginScriptableObject::Msg_HasMethod* __msg = new PPluginScriptableObject::Msg_HasMethod();
     151                 : 
     152               0 :     Write(aId, __msg, false);
     153                 : 
     154               0 :     (__msg)->set_routing_id(mId);
     155               0 :     (__msg)->set_rpc();
     156                 : 
     157                 : 
     158               0 :     Message __reply;
     159                 : 
     160               0 :     if (mozilla::ipc::LoggingEnabled()) {
     161               0 :         (__msg)->Log("[PPluginScriptableObjectChild] Sending ", stderr);
     162                 :     }
     163               0 :     if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Recv, PPluginScriptableObject::Msg_HasMethod__ID), (&(mState)))))) {
     164               0 :         NS_WARNING("bad state transition!");
     165                 :     }
     166                 : 
     167               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     168               0 :     if ((!(__sendok))) {
     169               0 :         return false;
     170                 :     }
     171                 : 
     172               0 :     if (mozilla::ipc::LoggingEnabled()) {
     173               0 :         (static_cast<const PPluginScriptableObject::Reply_HasMethod*>((&(__reply))))->Log("[PPluginScriptableObjectChild] Received reply ", stderr);
     174                 :     }
     175                 : 
     176               0 :     void* __iter = 0;
     177               0 :     if ((!(Read(aHasMethod, (&(__reply)), (&(__iter)))))) {
     178               0 :         FatalError("error deserializing (better message TODO)");
     179               0 :         return false;
     180                 :     }
     181               0 :     (__reply).EndRead(__iter);
     182                 : 
     183               0 :     return true;
     184                 : }
     185                 : 
     186                 : bool
     187               0 : PPluginScriptableObjectChild::CallInvoke(
     188                 :         PPluginIdentifierChild* aId,
     189                 :         const InfallibleTArray<Variant>& aArgs,
     190                 :         Variant* aResult,
     191                 :         bool* aSuccess)
     192                 : {
     193               0 :     PPluginScriptableObject::Msg_Invoke* __msg = new PPluginScriptableObject::Msg_Invoke();
     194                 : 
     195               0 :     Write(aId, __msg, false);
     196               0 :     Write(aArgs, __msg);
     197                 : 
     198               0 :     (__msg)->set_routing_id(mId);
     199               0 :     (__msg)->set_rpc();
     200                 : 
     201                 : 
     202               0 :     Message __reply;
     203                 : 
     204               0 :     if (mozilla::ipc::LoggingEnabled()) {
     205               0 :         (__msg)->Log("[PPluginScriptableObjectChild] Sending ", stderr);
     206                 :     }
     207               0 :     if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Recv, PPluginScriptableObject::Msg_Invoke__ID), (&(mState)))))) {
     208               0 :         NS_WARNING("bad state transition!");
     209                 :     }
     210                 : 
     211               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     212               0 :     if ((!(__sendok))) {
     213               0 :         return false;
     214                 :     }
     215                 : 
     216               0 :     if (mozilla::ipc::LoggingEnabled()) {
     217               0 :         (static_cast<const PPluginScriptableObject::Reply_Invoke*>((&(__reply))))->Log("[PPluginScriptableObjectChild] Received reply ", stderr);
     218                 :     }
     219                 : 
     220               0 :     void* __iter = 0;
     221               0 :     if ((!(Read(aResult, (&(__reply)), (&(__iter)))))) {
     222               0 :         FatalError("error deserializing (better message TODO)");
     223               0 :         return false;
     224                 :     }
     225               0 :     if ((!(Read(aSuccess, (&(__reply)), (&(__iter)))))) {
     226               0 :         FatalError("error deserializing (better message TODO)");
     227               0 :         return false;
     228                 :     }
     229               0 :     (__reply).EndRead(__iter);
     230                 : 
     231               0 :     return true;
     232                 : }
     233                 : 
     234                 : bool
     235               0 : PPluginScriptableObjectChild::CallInvokeDefault(
     236                 :         const InfallibleTArray<Variant>& aArgs,
     237                 :         Variant* aResult,
     238                 :         bool* aSuccess)
     239                 : {
     240               0 :     PPluginScriptableObject::Msg_InvokeDefault* __msg = new PPluginScriptableObject::Msg_InvokeDefault();
     241                 : 
     242               0 :     Write(aArgs, __msg);
     243                 : 
     244               0 :     (__msg)->set_routing_id(mId);
     245               0 :     (__msg)->set_rpc();
     246                 : 
     247                 : 
     248               0 :     Message __reply;
     249                 : 
     250               0 :     if (mozilla::ipc::LoggingEnabled()) {
     251               0 :         (__msg)->Log("[PPluginScriptableObjectChild] Sending ", stderr);
     252                 :     }
     253               0 :     if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Recv, PPluginScriptableObject::Msg_InvokeDefault__ID), (&(mState)))))) {
     254               0 :         NS_WARNING("bad state transition!");
     255                 :     }
     256                 : 
     257               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     258               0 :     if ((!(__sendok))) {
     259               0 :         return false;
     260                 :     }
     261                 : 
     262               0 :     if (mozilla::ipc::LoggingEnabled()) {
     263               0 :         (static_cast<const PPluginScriptableObject::Reply_InvokeDefault*>((&(__reply))))->Log("[PPluginScriptableObjectChild] Received reply ", stderr);
     264                 :     }
     265                 : 
     266               0 :     void* __iter = 0;
     267               0 :     if ((!(Read(aResult, (&(__reply)), (&(__iter)))))) {
     268               0 :         FatalError("error deserializing (better message TODO)");
     269               0 :         return false;
     270                 :     }
     271               0 :     if ((!(Read(aSuccess, (&(__reply)), (&(__iter)))))) {
     272               0 :         FatalError("error deserializing (better message TODO)");
     273               0 :         return false;
     274                 :     }
     275               0 :     (__reply).EndRead(__iter);
     276                 : 
     277               0 :     return true;
     278                 : }
     279                 : 
     280                 : bool
     281               0 : PPluginScriptableObjectChild::CallHasProperty(
     282                 :         PPluginIdentifierChild* aId,
     283                 :         bool* aHasProperty)
     284                 : {
     285               0 :     PPluginScriptableObject::Msg_HasProperty* __msg = new PPluginScriptableObject::Msg_HasProperty();
     286                 : 
     287               0 :     Write(aId, __msg, false);
     288                 : 
     289               0 :     (__msg)->set_routing_id(mId);
     290               0 :     (__msg)->set_rpc();
     291                 : 
     292                 : 
     293               0 :     Message __reply;
     294                 : 
     295               0 :     if (mozilla::ipc::LoggingEnabled()) {
     296               0 :         (__msg)->Log("[PPluginScriptableObjectChild] Sending ", stderr);
     297                 :     }
     298               0 :     if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Recv, PPluginScriptableObject::Msg_HasProperty__ID), (&(mState)))))) {
     299               0 :         NS_WARNING("bad state transition!");
     300                 :     }
     301                 : 
     302               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     303               0 :     if ((!(__sendok))) {
     304               0 :         return false;
     305                 :     }
     306                 : 
     307               0 :     if (mozilla::ipc::LoggingEnabled()) {
     308               0 :         (static_cast<const PPluginScriptableObject::Reply_HasProperty*>((&(__reply))))->Log("[PPluginScriptableObjectChild] Received reply ", stderr);
     309                 :     }
     310                 : 
     311               0 :     void* __iter = 0;
     312               0 :     if ((!(Read(aHasProperty, (&(__reply)), (&(__iter)))))) {
     313               0 :         FatalError("error deserializing (better message TODO)");
     314               0 :         return false;
     315                 :     }
     316               0 :     (__reply).EndRead(__iter);
     317                 : 
     318               0 :     return true;
     319                 : }
     320                 : 
     321                 : bool
     322               0 : PPluginScriptableObjectChild::CallSetProperty(
     323                 :         PPluginIdentifierChild* aId,
     324                 :         const Variant& aValue,
     325                 :         bool* aSuccess)
     326                 : {
     327               0 :     PPluginScriptableObject::Msg_SetProperty* __msg = new PPluginScriptableObject::Msg_SetProperty();
     328                 : 
     329               0 :     Write(aId, __msg, false);
     330               0 :     Write(aValue, __msg);
     331                 : 
     332               0 :     (__msg)->set_routing_id(mId);
     333               0 :     (__msg)->set_rpc();
     334                 : 
     335                 : 
     336               0 :     Message __reply;
     337                 : 
     338               0 :     if (mozilla::ipc::LoggingEnabled()) {
     339               0 :         (__msg)->Log("[PPluginScriptableObjectChild] Sending ", stderr);
     340                 :     }
     341               0 :     if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Recv, PPluginScriptableObject::Msg_SetProperty__ID), (&(mState)))))) {
     342               0 :         NS_WARNING("bad state transition!");
     343                 :     }
     344                 : 
     345               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     346               0 :     if ((!(__sendok))) {
     347               0 :         return false;
     348                 :     }
     349                 : 
     350               0 :     if (mozilla::ipc::LoggingEnabled()) {
     351               0 :         (static_cast<const PPluginScriptableObject::Reply_SetProperty*>((&(__reply))))->Log("[PPluginScriptableObjectChild] Received reply ", stderr);
     352                 :     }
     353                 : 
     354               0 :     void* __iter = 0;
     355               0 :     if ((!(Read(aSuccess, (&(__reply)), (&(__iter)))))) {
     356               0 :         FatalError("error deserializing (better message TODO)");
     357               0 :         return false;
     358                 :     }
     359               0 :     (__reply).EndRead(__iter);
     360                 : 
     361               0 :     return true;
     362                 : }
     363                 : 
     364                 : bool
     365               0 : PPluginScriptableObjectChild::CallRemoveProperty(
     366                 :         PPluginIdentifierChild* aId,
     367                 :         bool* aSuccess)
     368                 : {
     369               0 :     PPluginScriptableObject::Msg_RemoveProperty* __msg = new PPluginScriptableObject::Msg_RemoveProperty();
     370                 : 
     371               0 :     Write(aId, __msg, false);
     372                 : 
     373               0 :     (__msg)->set_routing_id(mId);
     374               0 :     (__msg)->set_rpc();
     375                 : 
     376                 : 
     377               0 :     Message __reply;
     378                 : 
     379               0 :     if (mozilla::ipc::LoggingEnabled()) {
     380               0 :         (__msg)->Log("[PPluginScriptableObjectChild] Sending ", stderr);
     381                 :     }
     382               0 :     if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Recv, PPluginScriptableObject::Msg_RemoveProperty__ID), (&(mState)))))) {
     383               0 :         NS_WARNING("bad state transition!");
     384                 :     }
     385                 : 
     386               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     387               0 :     if ((!(__sendok))) {
     388               0 :         return false;
     389                 :     }
     390                 : 
     391               0 :     if (mozilla::ipc::LoggingEnabled()) {
     392               0 :         (static_cast<const PPluginScriptableObject::Reply_RemoveProperty*>((&(__reply))))->Log("[PPluginScriptableObjectChild] Received reply ", stderr);
     393                 :     }
     394                 : 
     395               0 :     void* __iter = 0;
     396               0 :     if ((!(Read(aSuccess, (&(__reply)), (&(__iter)))))) {
     397               0 :         FatalError("error deserializing (better message TODO)");
     398               0 :         return false;
     399                 :     }
     400               0 :     (__reply).EndRead(__iter);
     401                 : 
     402               0 :     return true;
     403                 : }
     404                 : 
     405                 : bool
     406               0 : PPluginScriptableObjectChild::CallEnumerate(
     407                 :         InfallibleTArray<PPluginIdentifierChild*>* aProperties,
     408                 :         bool* aSuccess)
     409                 : {
     410               0 :     PPluginScriptableObject::Msg_Enumerate* __msg = new PPluginScriptableObject::Msg_Enumerate();
     411                 : 
     412                 : 
     413               0 :     (__msg)->set_routing_id(mId);
     414               0 :     (__msg)->set_rpc();
     415                 : 
     416                 : 
     417               0 :     Message __reply;
     418                 : 
     419               0 :     if (mozilla::ipc::LoggingEnabled()) {
     420               0 :         (__msg)->Log("[PPluginScriptableObjectChild] Sending ", stderr);
     421                 :     }
     422               0 :     if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Recv, PPluginScriptableObject::Msg_Enumerate__ID), (&(mState)))))) {
     423               0 :         NS_WARNING("bad state transition!");
     424                 :     }
     425                 : 
     426               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     427               0 :     if ((!(__sendok))) {
     428               0 :         return false;
     429                 :     }
     430                 : 
     431               0 :     if (mozilla::ipc::LoggingEnabled()) {
     432               0 :         (static_cast<const PPluginScriptableObject::Reply_Enumerate*>((&(__reply))))->Log("[PPluginScriptableObjectChild] Received reply ", stderr);
     433                 :     }
     434                 : 
     435               0 :     void* __iter = 0;
     436               0 :     if ((!(Read(aProperties, (&(__reply)), (&(__iter)))))) {
     437               0 :         FatalError("error deserializing (better message TODO)");
     438               0 :         return false;
     439                 :     }
     440               0 :     if ((!(Read(aSuccess, (&(__reply)), (&(__iter)))))) {
     441               0 :         FatalError("error deserializing (better message TODO)");
     442               0 :         return false;
     443                 :     }
     444               0 :     (__reply).EndRead(__iter);
     445                 : 
     446               0 :     return true;
     447                 : }
     448                 : 
     449                 : bool
     450               0 : PPluginScriptableObjectChild::CallConstruct(
     451                 :         const InfallibleTArray<Variant>& aArgs,
     452                 :         Variant* aResult,
     453                 :         bool* aSuccess)
     454                 : {
     455               0 :     PPluginScriptableObject::Msg_Construct* __msg = new PPluginScriptableObject::Msg_Construct();
     456                 : 
     457               0 :     Write(aArgs, __msg);
     458                 : 
     459               0 :     (__msg)->set_routing_id(mId);
     460               0 :     (__msg)->set_rpc();
     461                 : 
     462                 : 
     463               0 :     Message __reply;
     464                 : 
     465               0 :     if (mozilla::ipc::LoggingEnabled()) {
     466               0 :         (__msg)->Log("[PPluginScriptableObjectChild] Sending ", stderr);
     467                 :     }
     468               0 :     if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Recv, PPluginScriptableObject::Msg_Construct__ID), (&(mState)))))) {
     469               0 :         NS_WARNING("bad state transition!");
     470                 :     }
     471                 : 
     472               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     473               0 :     if ((!(__sendok))) {
     474               0 :         return false;
     475                 :     }
     476                 : 
     477               0 :     if (mozilla::ipc::LoggingEnabled()) {
     478               0 :         (static_cast<const PPluginScriptableObject::Reply_Construct*>((&(__reply))))->Log("[PPluginScriptableObjectChild] Received reply ", stderr);
     479                 :     }
     480                 : 
     481               0 :     void* __iter = 0;
     482               0 :     if ((!(Read(aResult, (&(__reply)), (&(__iter)))))) {
     483               0 :         FatalError("error deserializing (better message TODO)");
     484               0 :         return false;
     485                 :     }
     486               0 :     if ((!(Read(aSuccess, (&(__reply)), (&(__iter)))))) {
     487               0 :         FatalError("error deserializing (better message TODO)");
     488               0 :         return false;
     489                 :     }
     490               0 :     (__reply).EndRead(__iter);
     491                 : 
     492               0 :     return true;
     493                 : }
     494                 : 
     495                 : bool
     496               0 : PPluginScriptableObjectChild::SendProtect()
     497                 : {
     498               0 :     PPluginScriptableObject::Msg_Protect* __msg = new PPluginScriptableObject::Msg_Protect();
     499                 : 
     500                 : 
     501               0 :     (__msg)->set_routing_id(mId);
     502                 : 
     503                 : 
     504                 : 
     505               0 :     if (mozilla::ipc::LoggingEnabled()) {
     506               0 :         (__msg)->Log("[PPluginScriptableObjectChild] Sending ", stderr);
     507                 :     }
     508               0 :     if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Recv, PPluginScriptableObject::Msg_Protect__ID), (&(mState)))))) {
     509               0 :         NS_WARNING("bad state transition!");
     510                 :     }
     511                 : 
     512               0 :     bool __sendok = (mChannel)->Send(__msg);
     513               0 :     return __sendok;
     514                 : }
     515                 : 
     516                 : bool
     517               0 : PPluginScriptableObjectChild::SendUnprotect()
     518                 : {
     519               0 :     PPluginScriptableObject::Msg_Unprotect* __msg = new PPluginScriptableObject::Msg_Unprotect();
     520                 : 
     521                 : 
     522               0 :     (__msg)->set_routing_id(mId);
     523                 : 
     524                 : 
     525                 : 
     526               0 :     if (mozilla::ipc::LoggingEnabled()) {
     527               0 :         (__msg)->Log("[PPluginScriptableObjectChild] Sending ", stderr);
     528                 :     }
     529               0 :     if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Recv, PPluginScriptableObject::Msg_Unprotect__ID), (&(mState)))))) {
     530               0 :         NS_WARNING("bad state transition!");
     531                 :     }
     532                 : 
     533               0 :     bool __sendok = (mChannel)->Send(__msg);
     534               0 :     return __sendok;
     535                 : }
     536                 : 
     537                 : bool
     538               0 : PPluginScriptableObjectChild::CallGetParentProperty(
     539                 :         PPluginIdentifierChild* aId,
     540                 :         Variant* aResult,
     541                 :         bool* aSuccess)
     542                 : {
     543               0 :     PPluginScriptableObject::Msg_GetParentProperty* __msg = new PPluginScriptableObject::Msg_GetParentProperty();
     544                 : 
     545               0 :     Write(aId, __msg, false);
     546                 : 
     547               0 :     (__msg)->set_routing_id(mId);
     548               0 :     (__msg)->set_rpc();
     549                 : 
     550                 : 
     551               0 :     Message __reply;
     552                 : 
     553               0 :     if (mozilla::ipc::LoggingEnabled()) {
     554               0 :         (__msg)->Log("[PPluginScriptableObjectChild] Sending ", stderr);
     555                 :     }
     556               0 :     if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Recv, PPluginScriptableObject::Msg_GetParentProperty__ID), (&(mState)))))) {
     557               0 :         NS_WARNING("bad state transition!");
     558                 :     }
     559                 : 
     560               0 :     bool __sendok = (mChannel)->Call(__msg, (&(__reply)));
     561               0 :     if ((!(__sendok))) {
     562               0 :         return false;
     563                 :     }
     564                 : 
     565               0 :     if (mozilla::ipc::LoggingEnabled()) {
     566               0 :         (static_cast<const PPluginScriptableObject::Reply_GetParentProperty*>((&(__reply))))->Log("[PPluginScriptableObjectChild] Received reply ", stderr);
     567                 :     }
     568                 : 
     569               0 :     void* __iter = 0;
     570               0 :     if ((!(Read(aResult, (&(__reply)), (&(__iter)))))) {
     571               0 :         FatalError("error deserializing (better message TODO)");
     572               0 :         return false;
     573                 :     }
     574               0 :     if ((!(Read(aSuccess, (&(__reply)), (&(__iter)))))) {
     575               0 :         FatalError("error deserializing (better message TODO)");
     576               0 :         return false;
     577                 :     }
     578               0 :     (__reply).EndRead(__iter);
     579                 : 
     580               0 :     return true;
     581                 : }
     582                 : 
     583                 : int32
     584               0 : PPluginScriptableObjectChild::Register(ChannelListener* aRouted)
     585                 : {
     586               0 :     return (mManager)->Register(aRouted);
     587                 : }
     588                 : 
     589                 : int32
     590               0 : PPluginScriptableObjectChild::RegisterID(
     591                 :         ChannelListener* aRouted,
     592                 :         int32 aId)
     593                 : {
     594               0 :     return (mManager)->RegisterID(aRouted, aId);
     595                 : }
     596                 : 
     597                 : ChannelListener*
     598               0 : PPluginScriptableObjectChild::Lookup(int32 aId)
     599                 : {
     600               0 :     return (mManager)->Lookup(aId);
     601                 : }
     602                 : 
     603                 : void
     604               0 : PPluginScriptableObjectChild::Unregister(int32 aId)
     605                 : {
     606               0 :     return (mManager)->Unregister(aId);
     607                 : }
     608                 : 
     609                 : void
     610               0 : PPluginScriptableObjectChild::RemoveManagee(
     611                 :         int32 aProtocolId,
     612                 :         ChannelListener* aListener)
     613                 : {
     614               0 :     NS_RUNTIMEABORT("unreached");
     615                 :     return;
     616                 : }
     617                 : 
     618                 : Shmem::SharedMemory*
     619               0 : PPluginScriptableObjectChild::CreateSharedMemory(
     620                 :         size_t aSize,
     621                 :         Shmem::SharedMemory::SharedMemoryType type,
     622                 :         bool unsafe,
     623                 :         Shmem::id_t* aId)
     624                 : {
     625               0 :     return (mManager)->CreateSharedMemory(aSize, type, unsafe, aId);
     626                 : }
     627                 : 
     628                 : bool
     629               0 : PPluginScriptableObjectChild::AdoptSharedMemory(
     630                 :         Shmem::SharedMemory* segment,
     631                 :         Shmem::id_t* aId)
     632                 : {
     633               0 :     return (mManager)->AdoptSharedMemory(segment, aId);
     634                 : }
     635                 : 
     636                 : Shmem::SharedMemory*
     637               0 : PPluginScriptableObjectChild::LookupSharedMemory(Shmem::id_t aId)
     638                 : {
     639               0 :     return (mManager)->LookupSharedMemory(aId);
     640                 : }
     641                 : 
     642                 : bool
     643               0 : PPluginScriptableObjectChild::IsTrackingSharedMemory(Shmem::SharedMemory* segment)
     644                 : {
     645               0 :     return (mManager)->IsTrackingSharedMemory(segment);
     646                 : }
     647                 : 
     648                 : bool
     649               0 : PPluginScriptableObjectChild::DestroySharedMemory(Shmem& aShmem)
     650                 : {
     651               0 :     return (mManager)->DestroySharedMemory(aShmem);
     652                 : }
     653                 : 
     654                 : ProcessHandle
     655               0 : PPluginScriptableObjectChild::OtherProcess() const
     656                 : {
     657               0 :     return (mManager)->OtherProcess();
     658                 : }
     659                 : 
     660                 : AsyncChannel*
     661               0 : PPluginScriptableObjectChild::GetIPCChannel()
     662                 : {
     663               0 :     return mChannel;
     664                 : }
     665                 : 
     666                 : PPluginScriptableObjectChild::Result
     667               0 : PPluginScriptableObjectChild::OnMessageReceived(const Message& __msg)
     668                 : {
     669               0 :     switch ((__msg).type()) {
     670                 :     case PPluginScriptableObject::Reply___delete____ID:
     671                 :         {
     672               0 :             return MsgProcessed;
     673                 :         }
     674                 :     case PPluginScriptableObject::Msg___delete____ID:
     675                 :         {
     676               0 :             (const_cast<Message&>(__msg)).set_name("PPluginScriptableObject::Msg___delete__");
     677               0 :             if (mozilla::ipc::LoggingEnabled()) {
     678               0 :                 (static_cast<const PPluginScriptableObject::Msg___delete__*>((&(__msg))))->Log("[PPluginScriptableObjectChild] Received ", stderr);
     679                 :             }
     680                 : 
     681               0 :             void* __iter = 0;
     682                 :             PPluginScriptableObjectChild* actor;
     683                 : 
     684               0 :             if ((!(Read((&(actor)), (&(__msg)), (&(__iter)), false)))) {
     685               0 :                 FatalError("error deserializing (better message TODO)");
     686               0 :                 return MsgValueError;
     687                 :             }
     688               0 :             (__msg).EndRead(__iter);
     689               0 :             if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Send, PPluginScriptableObject::Msg___delete____ID), (&(mState)))))) {
     690               0 :                 NS_WARNING("bad state transition!");
     691                 :             }
     692               0 :             if ((!(Recv__delete__()))) {
     693               0 :                 return MsgProcessingError;
     694                 :             }
     695                 : 
     696               0 :             (actor)->DestroySubtree(Deletion);
     697               0 :             (actor)->DeallocSubtree();
     698               0 :             ((actor)->mManager)->RemoveManagee(PPluginScriptableObjectMsgStart, actor);
     699                 : 
     700                 : 
     701               0 :             return MsgProcessed;
     702                 :         }
     703                 :     case PPluginScriptableObject::Msg_Protect__ID:
     704                 :         {
     705               0 :             (const_cast<Message&>(__msg)).set_name("PPluginScriptableObject::Msg_Protect");
     706               0 :             if (mozilla::ipc::LoggingEnabled()) {
     707               0 :                 (static_cast<const PPluginScriptableObject::Msg_Protect*>((&(__msg))))->Log("[PPluginScriptableObjectChild] Received ", stderr);
     708                 :             }
     709                 : 
     710               0 :             if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Send, PPluginScriptableObject::Msg_Protect__ID), (&(mState)))))) {
     711               0 :                 NS_WARNING("bad state transition!");
     712                 :             }
     713               0 :             if ((!(RecvProtect()))) {
     714               0 :                 return MsgProcessingError;
     715                 :             }
     716                 : 
     717               0 :             return MsgProcessed;
     718                 :         }
     719                 :     case PPluginScriptableObject::Msg_Unprotect__ID:
     720                 :         {
     721               0 :             (const_cast<Message&>(__msg)).set_name("PPluginScriptableObject::Msg_Unprotect");
     722               0 :             if (mozilla::ipc::LoggingEnabled()) {
     723               0 :                 (static_cast<const PPluginScriptableObject::Msg_Unprotect*>((&(__msg))))->Log("[PPluginScriptableObjectChild] Received ", stderr);
     724                 :             }
     725                 : 
     726               0 :             if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Send, PPluginScriptableObject::Msg_Unprotect__ID), (&(mState)))))) {
     727               0 :                 NS_WARNING("bad state transition!");
     728                 :             }
     729               0 :             if ((!(RecvUnprotect()))) {
     730               0 :                 return MsgProcessingError;
     731                 :             }
     732                 : 
     733               0 :             return MsgProcessed;
     734                 :         }
     735                 :     default:
     736                 :         {
     737               0 :             return MsgNotKnown;
     738                 :         }
     739                 :     }
     740                 : }
     741                 : 
     742                 : PPluginScriptableObjectChild::Result
     743               0 : PPluginScriptableObjectChild::OnMessageReceived(
     744                 :         const Message& __msg,
     745                 :         Message*& __reply)
     746                 : {
     747               0 :     return MsgNotKnown;
     748                 : }
     749                 : 
     750                 : PPluginScriptableObjectChild::Result
     751               0 : PPluginScriptableObjectChild::OnCallReceived(
     752                 :         const Message& __msg,
     753                 :         Message*& __reply)
     754                 : {
     755               0 :     switch ((__msg).type()) {
     756                 :     case PPluginScriptableObject::Msg_Invalidate__ID:
     757                 :         {
     758               0 :             (const_cast<Message&>(__msg)).set_name("PPluginScriptableObject::Msg_Invalidate");
     759               0 :             if (mozilla::ipc::LoggingEnabled()) {
     760               0 :                 (static_cast<const PPluginScriptableObject::Msg_Invalidate*>((&(__msg))))->Log("[PPluginScriptableObjectChild] Received ", stderr);
     761                 :             }
     762                 : 
     763               0 :             if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Send, PPluginScriptableObject::Msg_Invalidate__ID), (&(mState)))))) {
     764               0 :                 NS_WARNING("bad state transition!");
     765                 :             }
     766               0 :             int32 __id = mId;
     767               0 :             if ((!(AnswerInvalidate()))) {
     768               0 :                 return MsgProcessingError;
     769                 :             }
     770                 : 
     771               0 :             __reply = new PPluginScriptableObject::Reply_Invalidate();
     772                 : 
     773               0 :             (__reply)->set_routing_id(__id);
     774               0 :             (__reply)->set_rpc();
     775               0 :             (__reply)->set_reply();
     776                 : 
     777               0 :             if (mozilla::ipc::LoggingEnabled()) {
     778               0 :                 (static_cast<const PPluginScriptableObject::Reply_Invalidate*>(__reply))->Log("[PPluginScriptableObjectChild] Sending reply ", stderr);
     779                 :             }
     780               0 :             return MsgProcessed;
     781                 :         }
     782                 :     case PPluginScriptableObject::Msg_HasMethod__ID:
     783                 :         {
     784               0 :             (const_cast<Message&>(__msg)).set_name("PPluginScriptableObject::Msg_HasMethod");
     785               0 :             if (mozilla::ipc::LoggingEnabled()) {
     786               0 :                 (static_cast<const PPluginScriptableObject::Msg_HasMethod*>((&(__msg))))->Log("[PPluginScriptableObjectChild] Received ", stderr);
     787                 :             }
     788                 : 
     789               0 :             void* __iter = 0;
     790                 :             PPluginIdentifierChild* aId;
     791                 : 
     792               0 :             if ((!(Read((&(aId)), (&(__msg)), (&(__iter)), false)))) {
     793               0 :                 FatalError("error deserializing (better message TODO)");
     794               0 :                 return MsgValueError;
     795                 :             }
     796               0 :             (__msg).EndRead(__iter);
     797               0 :             if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Send, PPluginScriptableObject::Msg_HasMethod__ID), (&(mState)))))) {
     798               0 :                 NS_WARNING("bad state transition!");
     799                 :             }
     800                 :             bool aHasMethod;
     801               0 :             int32 __id = mId;
     802               0 :             if ((!(AnswerHasMethod(aId, (&(aHasMethod)))))) {
     803               0 :                 return MsgProcessingError;
     804                 :             }
     805                 : 
     806               0 :             __reply = new PPluginScriptableObject::Reply_HasMethod();
     807                 : 
     808               0 :             Write(aHasMethod, __reply);
     809               0 :             (__reply)->set_routing_id(__id);
     810               0 :             (__reply)->set_rpc();
     811               0 :             (__reply)->set_reply();
     812                 : 
     813               0 :             if (mozilla::ipc::LoggingEnabled()) {
     814               0 :                 (static_cast<const PPluginScriptableObject::Reply_HasMethod*>(__reply))->Log("[PPluginScriptableObjectChild] Sending reply ", stderr);
     815                 :             }
     816               0 :             return MsgProcessed;
     817                 :         }
     818                 :     case PPluginScriptableObject::Msg_Invoke__ID:
     819                 :         {
     820               0 :             (const_cast<Message&>(__msg)).set_name("PPluginScriptableObject::Msg_Invoke");
     821               0 :             if (mozilla::ipc::LoggingEnabled()) {
     822               0 :                 (static_cast<const PPluginScriptableObject::Msg_Invoke*>((&(__msg))))->Log("[PPluginScriptableObjectChild] Received ", stderr);
     823                 :             }
     824                 : 
     825               0 :             void* __iter = 0;
     826                 :             PPluginIdentifierChild* aId;
     827               0 :             InfallibleTArray<Variant> aArgs;
     828                 : 
     829               0 :             if ((!(Read((&(aId)), (&(__msg)), (&(__iter)), false)))) {
     830               0 :                 FatalError("error deserializing (better message TODO)");
     831               0 :                 return MsgValueError;
     832                 :             }
     833               0 :             if ((!(Read((&(aArgs)), (&(__msg)), (&(__iter)))))) {
     834               0 :                 FatalError("error deserializing (better message TODO)");
     835               0 :                 return MsgValueError;
     836                 :             }
     837               0 :             (__msg).EndRead(__iter);
     838               0 :             if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Send, PPluginScriptableObject::Msg_Invoke__ID), (&(mState)))))) {
     839               0 :                 NS_WARNING("bad state transition!");
     840                 :             }
     841               0 :             Variant aResult;
     842                 :             bool aSuccess;
     843               0 :             int32 __id = mId;
     844               0 :             if ((!(AnswerInvoke(aId, aArgs, (&(aResult)), (&(aSuccess)))))) {
     845               0 :                 return MsgProcessingError;
     846                 :             }
     847                 : 
     848               0 :             __reply = new PPluginScriptableObject::Reply_Invoke();
     849                 : 
     850               0 :             Write(aResult, __reply);
     851               0 :             Write(aSuccess, __reply);
     852               0 :             (__reply)->set_routing_id(__id);
     853               0 :             (__reply)->set_rpc();
     854               0 :             (__reply)->set_reply();
     855                 : 
     856               0 :             if (mozilla::ipc::LoggingEnabled()) {
     857               0 :                 (static_cast<const PPluginScriptableObject::Reply_Invoke*>(__reply))->Log("[PPluginScriptableObjectChild] Sending reply ", stderr);
     858                 :             }
     859               0 :             return MsgProcessed;
     860                 :         }
     861                 :     case PPluginScriptableObject::Msg_InvokeDefault__ID:
     862                 :         {
     863               0 :             (const_cast<Message&>(__msg)).set_name("PPluginScriptableObject::Msg_InvokeDefault");
     864               0 :             if (mozilla::ipc::LoggingEnabled()) {
     865               0 :                 (static_cast<const PPluginScriptableObject::Msg_InvokeDefault*>((&(__msg))))->Log("[PPluginScriptableObjectChild] Received ", stderr);
     866                 :             }
     867                 : 
     868               0 :             void* __iter = 0;
     869               0 :             InfallibleTArray<Variant> aArgs;
     870                 : 
     871               0 :             if ((!(Read((&(aArgs)), (&(__msg)), (&(__iter)))))) {
     872               0 :                 FatalError("error deserializing (better message TODO)");
     873               0 :                 return MsgValueError;
     874                 :             }
     875               0 :             (__msg).EndRead(__iter);
     876               0 :             if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Send, PPluginScriptableObject::Msg_InvokeDefault__ID), (&(mState)))))) {
     877               0 :                 NS_WARNING("bad state transition!");
     878                 :             }
     879               0 :             Variant aResult;
     880                 :             bool aSuccess;
     881               0 :             int32 __id = mId;
     882               0 :             if ((!(AnswerInvokeDefault(aArgs, (&(aResult)), (&(aSuccess)))))) {
     883               0 :                 return MsgProcessingError;
     884                 :             }
     885                 : 
     886               0 :             __reply = new PPluginScriptableObject::Reply_InvokeDefault();
     887                 : 
     888               0 :             Write(aResult, __reply);
     889               0 :             Write(aSuccess, __reply);
     890               0 :             (__reply)->set_routing_id(__id);
     891               0 :             (__reply)->set_rpc();
     892               0 :             (__reply)->set_reply();
     893                 : 
     894               0 :             if (mozilla::ipc::LoggingEnabled()) {
     895               0 :                 (static_cast<const PPluginScriptableObject::Reply_InvokeDefault*>(__reply))->Log("[PPluginScriptableObjectChild] Sending reply ", stderr);
     896                 :             }
     897               0 :             return MsgProcessed;
     898                 :         }
     899                 :     case PPluginScriptableObject::Msg_HasProperty__ID:
     900                 :         {
     901               0 :             (const_cast<Message&>(__msg)).set_name("PPluginScriptableObject::Msg_HasProperty");
     902               0 :             if (mozilla::ipc::LoggingEnabled()) {
     903               0 :                 (static_cast<const PPluginScriptableObject::Msg_HasProperty*>((&(__msg))))->Log("[PPluginScriptableObjectChild] Received ", stderr);
     904                 :             }
     905                 : 
     906               0 :             void* __iter = 0;
     907                 :             PPluginIdentifierChild* aId;
     908                 : 
     909               0 :             if ((!(Read((&(aId)), (&(__msg)), (&(__iter)), false)))) {
     910               0 :                 FatalError("error deserializing (better message TODO)");
     911               0 :                 return MsgValueError;
     912                 :             }
     913               0 :             (__msg).EndRead(__iter);
     914               0 :             if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Send, PPluginScriptableObject::Msg_HasProperty__ID), (&(mState)))))) {
     915               0 :                 NS_WARNING("bad state transition!");
     916                 :             }
     917                 :             bool aHasProperty;
     918               0 :             int32 __id = mId;
     919               0 :             if ((!(AnswerHasProperty(aId, (&(aHasProperty)))))) {
     920               0 :                 return MsgProcessingError;
     921                 :             }
     922                 : 
     923               0 :             __reply = new PPluginScriptableObject::Reply_HasProperty();
     924                 : 
     925               0 :             Write(aHasProperty, __reply);
     926               0 :             (__reply)->set_routing_id(__id);
     927               0 :             (__reply)->set_rpc();
     928               0 :             (__reply)->set_reply();
     929                 : 
     930               0 :             if (mozilla::ipc::LoggingEnabled()) {
     931               0 :                 (static_cast<const PPluginScriptableObject::Reply_HasProperty*>(__reply))->Log("[PPluginScriptableObjectChild] Sending reply ", stderr);
     932                 :             }
     933               0 :             return MsgProcessed;
     934                 :         }
     935                 :     case PPluginScriptableObject::Msg_SetProperty__ID:
     936                 :         {
     937               0 :             (const_cast<Message&>(__msg)).set_name("PPluginScriptableObject::Msg_SetProperty");
     938               0 :             if (mozilla::ipc::LoggingEnabled()) {
     939               0 :                 (static_cast<const PPluginScriptableObject::Msg_SetProperty*>((&(__msg))))->Log("[PPluginScriptableObjectChild] Received ", stderr);
     940                 :             }
     941                 : 
     942               0 :             void* __iter = 0;
     943                 :             PPluginIdentifierChild* aId;
     944               0 :             Variant aValue;
     945                 : 
     946               0 :             if ((!(Read((&(aId)), (&(__msg)), (&(__iter)), false)))) {
     947               0 :                 FatalError("error deserializing (better message TODO)");
     948               0 :                 return MsgValueError;
     949                 :             }
     950               0 :             if ((!(Read((&(aValue)), (&(__msg)), (&(__iter)))))) {
     951               0 :                 FatalError("error deserializing (better message TODO)");
     952               0 :                 return MsgValueError;
     953                 :             }
     954               0 :             (__msg).EndRead(__iter);
     955               0 :             if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Send, PPluginScriptableObject::Msg_SetProperty__ID), (&(mState)))))) {
     956               0 :                 NS_WARNING("bad state transition!");
     957                 :             }
     958                 :             bool aSuccess;
     959               0 :             int32 __id = mId;
     960               0 :             if ((!(AnswerSetProperty(aId, aValue, (&(aSuccess)))))) {
     961               0 :                 return MsgProcessingError;
     962                 :             }
     963                 : 
     964               0 :             __reply = new PPluginScriptableObject::Reply_SetProperty();
     965                 : 
     966               0 :             Write(aSuccess, __reply);
     967               0 :             (__reply)->set_routing_id(__id);
     968               0 :             (__reply)->set_rpc();
     969               0 :             (__reply)->set_reply();
     970                 : 
     971               0 :             if (mozilla::ipc::LoggingEnabled()) {
     972               0 :                 (static_cast<const PPluginScriptableObject::Reply_SetProperty*>(__reply))->Log("[PPluginScriptableObjectChild] Sending reply ", stderr);
     973                 :             }
     974               0 :             return MsgProcessed;
     975                 :         }
     976                 :     case PPluginScriptableObject::Msg_RemoveProperty__ID:
     977                 :         {
     978               0 :             (const_cast<Message&>(__msg)).set_name("PPluginScriptableObject::Msg_RemoveProperty");
     979               0 :             if (mozilla::ipc::LoggingEnabled()) {
     980               0 :                 (static_cast<const PPluginScriptableObject::Msg_RemoveProperty*>((&(__msg))))->Log("[PPluginScriptableObjectChild] Received ", stderr);
     981                 :             }
     982                 : 
     983               0 :             void* __iter = 0;
     984                 :             PPluginIdentifierChild* aId;
     985                 : 
     986               0 :             if ((!(Read((&(aId)), (&(__msg)), (&(__iter)), false)))) {
     987               0 :                 FatalError("error deserializing (better message TODO)");
     988               0 :                 return MsgValueError;
     989                 :             }
     990               0 :             (__msg).EndRead(__iter);
     991               0 :             if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Send, PPluginScriptableObject::Msg_RemoveProperty__ID), (&(mState)))))) {
     992               0 :                 NS_WARNING("bad state transition!");
     993                 :             }
     994                 :             bool aSuccess;
     995               0 :             int32 __id = mId;
     996               0 :             if ((!(AnswerRemoveProperty(aId, (&(aSuccess)))))) {
     997               0 :                 return MsgProcessingError;
     998                 :             }
     999                 : 
    1000               0 :             __reply = new PPluginScriptableObject::Reply_RemoveProperty();
    1001                 : 
    1002               0 :             Write(aSuccess, __reply);
    1003               0 :             (__reply)->set_routing_id(__id);
    1004               0 :             (__reply)->set_rpc();
    1005               0 :             (__reply)->set_reply();
    1006                 : 
    1007               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1008               0 :                 (static_cast<const PPluginScriptableObject::Reply_RemoveProperty*>(__reply))->Log("[PPluginScriptableObjectChild] Sending reply ", stderr);
    1009                 :             }
    1010               0 :             return MsgProcessed;
    1011                 :         }
    1012                 :     case PPluginScriptableObject::Msg_Enumerate__ID:
    1013                 :         {
    1014               0 :             (const_cast<Message&>(__msg)).set_name("PPluginScriptableObject::Msg_Enumerate");
    1015               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1016               0 :                 (static_cast<const PPluginScriptableObject::Msg_Enumerate*>((&(__msg))))->Log("[PPluginScriptableObjectChild] Received ", stderr);
    1017                 :             }
    1018                 : 
    1019               0 :             if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Send, PPluginScriptableObject::Msg_Enumerate__ID), (&(mState)))))) {
    1020               0 :                 NS_WARNING("bad state transition!");
    1021                 :             }
    1022               0 :             InfallibleTArray<PPluginIdentifierChild*> aProperties;
    1023                 :             bool aSuccess;
    1024               0 :             int32 __id = mId;
    1025               0 :             if ((!(AnswerEnumerate((&(aProperties)), (&(aSuccess)))))) {
    1026               0 :                 return MsgProcessingError;
    1027                 :             }
    1028                 : 
    1029               0 :             __reply = new PPluginScriptableObject::Reply_Enumerate();
    1030                 : 
    1031               0 :             Write(aProperties, __reply);
    1032               0 :             Write(aSuccess, __reply);
    1033               0 :             (__reply)->set_routing_id(__id);
    1034               0 :             (__reply)->set_rpc();
    1035               0 :             (__reply)->set_reply();
    1036                 : 
    1037               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1038               0 :                 (static_cast<const PPluginScriptableObject::Reply_Enumerate*>(__reply))->Log("[PPluginScriptableObjectChild] Sending reply ", stderr);
    1039                 :             }
    1040               0 :             return MsgProcessed;
    1041                 :         }
    1042                 :     case PPluginScriptableObject::Msg_Construct__ID:
    1043                 :         {
    1044               0 :             (const_cast<Message&>(__msg)).set_name("PPluginScriptableObject::Msg_Construct");
    1045               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1046               0 :                 (static_cast<const PPluginScriptableObject::Msg_Construct*>((&(__msg))))->Log("[PPluginScriptableObjectChild] Received ", stderr);
    1047                 :             }
    1048                 : 
    1049               0 :             void* __iter = 0;
    1050               0 :             InfallibleTArray<Variant> aArgs;
    1051                 : 
    1052               0 :             if ((!(Read((&(aArgs)), (&(__msg)), (&(__iter)))))) {
    1053               0 :                 FatalError("error deserializing (better message TODO)");
    1054               0 :                 return MsgValueError;
    1055                 :             }
    1056               0 :             (__msg).EndRead(__iter);
    1057               0 :             if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Send, PPluginScriptableObject::Msg_Construct__ID), (&(mState)))))) {
    1058               0 :                 NS_WARNING("bad state transition!");
    1059                 :             }
    1060               0 :             Variant aResult;
    1061                 :             bool aSuccess;
    1062               0 :             int32 __id = mId;
    1063               0 :             if ((!(AnswerConstruct(aArgs, (&(aResult)), (&(aSuccess)))))) {
    1064               0 :                 return MsgProcessingError;
    1065                 :             }
    1066                 : 
    1067               0 :             __reply = new PPluginScriptableObject::Reply_Construct();
    1068                 : 
    1069               0 :             Write(aResult, __reply);
    1070               0 :             Write(aSuccess, __reply);
    1071               0 :             (__reply)->set_routing_id(__id);
    1072               0 :             (__reply)->set_rpc();
    1073               0 :             (__reply)->set_reply();
    1074                 : 
    1075               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1076               0 :                 (static_cast<const PPluginScriptableObject::Reply_Construct*>(__reply))->Log("[PPluginScriptableObjectChild] Sending reply ", stderr);
    1077                 :             }
    1078               0 :             return MsgProcessed;
    1079                 :         }
    1080                 :     case PPluginScriptableObject::Msg_GetChildProperty__ID:
    1081                 :         {
    1082               0 :             (const_cast<Message&>(__msg)).set_name("PPluginScriptableObject::Msg_GetChildProperty");
    1083               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1084               0 :                 (static_cast<const PPluginScriptableObject::Msg_GetChildProperty*>((&(__msg))))->Log("[PPluginScriptableObjectChild] Received ", stderr);
    1085                 :             }
    1086                 : 
    1087               0 :             void* __iter = 0;
    1088                 :             PPluginIdentifierChild* aId;
    1089                 : 
    1090               0 :             if ((!(Read((&(aId)), (&(__msg)), (&(__iter)), false)))) {
    1091               0 :                 FatalError("error deserializing (better message TODO)");
    1092               0 :                 return MsgValueError;
    1093                 :             }
    1094               0 :             (__msg).EndRead(__iter);
    1095               0 :             if ((!(PPluginScriptableObject::Transition(mState, Trigger(Trigger::Send, PPluginScriptableObject::Msg_GetChildProperty__ID), (&(mState)))))) {
    1096               0 :                 NS_WARNING("bad state transition!");
    1097                 :             }
    1098                 :             bool aHasProperty;
    1099                 :             bool aHasMethod;
    1100               0 :             Variant aResult;
    1101                 :             bool aSuccess;
    1102               0 :             int32 __id = mId;
    1103               0 :             if ((!(AnswerGetChildProperty(aId, (&(aHasProperty)), (&(aHasMethod)), (&(aResult)), (&(aSuccess)))))) {
    1104               0 :                 return MsgProcessingError;
    1105                 :             }
    1106                 : 
    1107               0 :             __reply = new PPluginScriptableObject::Reply_GetChildProperty();
    1108                 : 
    1109               0 :             Write(aHasProperty, __reply);
    1110               0 :             Write(aHasMethod, __reply);
    1111               0 :             Write(aResult, __reply);
    1112               0 :             Write(aSuccess, __reply);
    1113               0 :             (__reply)->set_routing_id(__id);
    1114               0 :             (__reply)->set_rpc();
    1115               0 :             (__reply)->set_reply();
    1116                 : 
    1117               0 :             if (mozilla::ipc::LoggingEnabled()) {
    1118               0 :                 (static_cast<const PPluginScriptableObject::Reply_GetChildProperty*>(__reply))->Log("[PPluginScriptableObjectChild] Sending reply ", stderr);
    1119                 :             }
    1120               0 :             return MsgProcessed;
    1121                 :         }
    1122                 :     default:
    1123                 :         {
    1124               0 :             return MsgNotKnown;
    1125                 :         }
    1126                 :     }
    1127                 : }
    1128                 : 
    1129                 : void
    1130               0 : PPluginScriptableObjectChild::OnProcessingError(Result code)
    1131                 : {
    1132               0 :     NS_RUNTIMEABORT("`OnProcessingError' called on non-toplevel actor");
    1133               0 : }
    1134                 : 
    1135                 : bool
    1136               0 : PPluginScriptableObjectChild::OnReplyTimeout()
    1137                 : {
    1138               0 :     NS_RUNTIMEABORT("`OnReplyTimeout' called on non-toplevel actor");
    1139               0 :     return false;
    1140                 : }
    1141                 : 
    1142                 : void
    1143               0 : PPluginScriptableObjectChild::OnChannelClose()
    1144                 : {
    1145               0 :     NS_RUNTIMEABORT("`OnClose' called on non-toplevel actor");
    1146               0 : }
    1147                 : 
    1148                 : void
    1149               0 : PPluginScriptableObjectChild::OnChannelError()
    1150                 : {
    1151               0 :     NS_RUNTIMEABORT("`OnError' called on non-toplevel actor");
    1152               0 : }
    1153                 : 
    1154                 : void
    1155               0 : PPluginScriptableObjectChild::OnChannelConnected(int32 pid)
    1156                 : {
    1157               0 :     NS_RUNTIMEABORT("'OnConnected' called on non-toplevel actor");
    1158               0 : }
    1159                 : 
    1160                 : bool
    1161               0 : PPluginScriptableObjectChild::AllocShmem(
    1162                 :         size_t aSize,
    1163                 :         Shmem::SharedMemory::SharedMemoryType aType,
    1164                 :         Shmem* aMem)
    1165                 : {
    1166                 :     Shmem::id_t aId;
    1167               0 :     nsAutoPtr<Shmem::SharedMemory> rawmem(CreateSharedMemory(aSize, aType, false, (&(aId))));
    1168               0 :     if ((!(rawmem))) {
    1169               0 :         return false;
    1170                 :     }
    1171                 : 
    1172               0 :     (*(aMem)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), (rawmem).forget(), aId);
    1173               0 :     return true;
    1174                 : }
    1175                 : 
    1176                 : bool
    1177               0 : PPluginScriptableObjectChild::AllocUnsafeShmem(
    1178                 :         size_t aSize,
    1179                 :         Shmem::SharedMemory::SharedMemoryType aType,
    1180                 :         Shmem* aMem)
    1181                 : {
    1182                 :     Shmem::id_t aId;
    1183               0 :     nsAutoPtr<Shmem::SharedMemory> rawmem(CreateSharedMemory(aSize, aType, true, (&(aId))));
    1184               0 :     if ((!(rawmem))) {
    1185               0 :         return false;
    1186                 :     }
    1187                 : 
    1188               0 :     (*(aMem)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), (rawmem).forget(), aId);
    1189               0 :     return true;
    1190                 : }
    1191                 : 
    1192                 : bool
    1193               0 : PPluginScriptableObjectChild::AdoptShmem(
    1194                 :         Shmem& aMem,
    1195                 :         Shmem* aOutMem)
    1196                 : {
    1197               0 :     Shmem::SharedMemory* rawmem = (aMem).Segment(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
    1198               0 :     if (((!(rawmem))) || (IsTrackingSharedMemory(rawmem))) {
    1199               0 :         NS_RUNTIMEABORT("bad Shmem");
    1200                 :     }
    1201                 : 
    1202                 :     Shmem::id_t aId;
    1203               0 :     if ((!(AdoptSharedMemory(rawmem, (&(aId)))))) {
    1204               0 :         return false;
    1205                 :     }
    1206                 : 
    1207               0 :     (*(aOutMem)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), rawmem, aId);
    1208               0 :     return true;
    1209                 : }
    1210                 : 
    1211                 : bool
    1212               0 : PPluginScriptableObjectChild::DeallocShmem(Shmem& aMem)
    1213                 : {
    1214               0 :     bool ok = DestroySharedMemory(aMem);
    1215               0 :     (aMem).forget(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
    1216               0 :     return ok;
    1217                 : }
    1218                 : 
    1219                 : void
    1220               0 : PPluginScriptableObjectChild::FatalError(const char* const msg) const
    1221                 : {
    1222                 :     // Virtual method to prevent inlining.
    1223                 :     // This give us better error reporting.
    1224                 :     // See bug 589371
    1225                 : 
    1226               0 :     NS_ERROR("IPDL error:");
    1227               0 :     NS_ERROR(msg);
    1228                 : 
    1229               0 :     NS_RUNTIMEABORT("[PPluginScriptableObjectChild] abort()ing as a result");
    1230               0 : }
    1231                 : 
    1232                 : void
    1233               0 : PPluginScriptableObjectChild::DestroySubtree(ActorDestroyReason why)
    1234                 : {
    1235                 :     // Unregister from our manager.
    1236               0 :     Unregister(mId);
    1237               0 :     mId = 1;
    1238                 : 
    1239                 :     // Finally, destroy "us".
    1240               0 :     ActorDestroy(why);
    1241               0 : }
    1242                 : 
    1243                 : void
    1244               0 : PPluginScriptableObjectChild::DeallocSubtree()
    1245                 : {
    1246               0 : }
    1247                 : 
    1248                 : void
    1249               0 : PPluginScriptableObjectChild::Write(
    1250                 :         const InfallibleTArray<Variant>& __v,
    1251                 :         Message* __msg)
    1252                 : {
    1253               0 :     uint32 length = (__v).Length();
    1254               0 :     Write(length, __msg);
    1255                 : 
    1256               0 :     for (uint32 i = 0; (i) < (length); (++(i))) {
    1257               0 :         Write(__v[i], __msg);
    1258                 :     }
    1259               0 : }
    1260                 : 
    1261                 : bool
    1262               0 : PPluginScriptableObjectChild::Read(
    1263                 :         InfallibleTArray<Variant>* __v,
    1264                 :         const Message* __msg,
    1265                 :         void** __iter)
    1266                 : {
    1267               0 :     InfallibleTArray<Variant>& a = (*(__v));
    1268                 :     uint32 length;
    1269               0 :     if ((!(Read((&(length)), __msg, __iter)))) {
    1270               0 :         return false;
    1271                 :     }
    1272                 : 
    1273               0 :     (__v)->SetLength(length);
    1274               0 :     for (uint32 i = 0; (i) < (length); (++(i))) {
    1275               0 :         if ((!(Read((&(a[i])), __msg, __iter)))) {
    1276               0 :             return false;
    1277                 :         }
    1278                 :     }
    1279               0 :     return true;
    1280                 : }
    1281                 : 
    1282                 : void
    1283               0 : PPluginScriptableObjectChild::Write(
    1284                 :         PPluginScriptableObjectChild* __v,
    1285                 :         Message* __msg,
    1286                 :         bool __nullable)
    1287                 : {
    1288                 :     int32 id;
    1289               0 :     if ((!(__v))) {
    1290               0 :         if ((!(__nullable))) {
    1291               0 :             NS_RUNTIMEABORT("NULL actor value passed to non-nullable param");
    1292                 :         }
    1293               0 :         id = 0;
    1294                 :     }
    1295                 :     else {
    1296               0 :         id = (__v)->mId;
    1297               0 :         if ((1) == (id)) {
    1298               0 :             NS_RUNTIMEABORT("actor has been |delete|d");
    1299                 :         }
    1300                 :     }
    1301                 : 
    1302               0 :     Write(id, __msg);
    1303               0 : }
    1304                 : 
    1305                 : bool
    1306               0 : PPluginScriptableObjectChild::Read(
    1307                 :         PPluginScriptableObjectChild** __v,
    1308                 :         const Message* __msg,
    1309                 :         void** __iter,
    1310                 :         bool __nullable)
    1311                 : {
    1312                 :     int32 id;
    1313               0 :     if ((!(Read((&(id)), __msg, __iter)))) {
    1314               0 :         return false;
    1315                 :     }
    1316               0 :     if (((1) == (id)) || (((0) == (id)) && ((!(__nullable))))) {
    1317               0 :         return false;
    1318                 :     }
    1319                 : 
    1320               0 :     if ((0) == (id)) {
    1321               0 :         (*(__v)) = 0;
    1322                 :     }
    1323                 :     else {
    1324               0 :         (*(__v)) = static_cast<PPluginScriptableObjectChild*>(Lookup(id));
    1325               0 :         if ((!((*(__v))))) {
    1326               0 :             return false;
    1327                 :         }
    1328                 :     }
    1329               0 :     return true;
    1330                 : }
    1331                 : 
    1332                 : void
    1333               0 : PPluginScriptableObjectChild::Write(
    1334                 :         const InfallibleTArray<PPluginIdentifierChild*>& __v,
    1335                 :         Message* __msg)
    1336                 : {
    1337               0 :     uint32 length = (__v).Length();
    1338               0 :     Write(length, __msg);
    1339                 : 
    1340               0 :     for (uint32 i = 0; (i) < (length); (++(i))) {
    1341               0 :         Write(__v[i], __msg, false);
    1342                 :     }
    1343               0 : }
    1344                 : 
    1345                 : bool
    1346               0 : PPluginScriptableObjectChild::Read(
    1347                 :         InfallibleTArray<PPluginIdentifierChild*>* __v,
    1348                 :         const Message* __msg,
    1349                 :         void** __iter)
    1350                 : {
    1351               0 :     InfallibleTArray<PPluginIdentifierChild*>& a = (*(__v));
    1352                 :     uint32 length;
    1353               0 :     if ((!(Read((&(length)), __msg, __iter)))) {
    1354               0 :         return false;
    1355                 :     }
    1356                 : 
    1357               0 :     (__v)->SetLength(length);
    1358               0 :     for (uint32 i = 0; (i) < (length); (++(i))) {
    1359               0 :         if ((!(Read((&(a[i])), __msg, __iter, false)))) {
    1360               0 :             return false;
    1361                 :         }
    1362                 :     }
    1363               0 :     return true;
    1364                 : }
    1365                 : 
    1366                 : void
    1367               0 : PPluginScriptableObjectChild::Write(
    1368                 :         const Variant& __v,
    1369                 :         Message* __msg)
    1370                 : {
    1371                 :     typedef Variant __type;
    1372               0 :     Write(int((__v).type()), __msg);
    1373                 : 
    1374               0 :     switch ((__v).type()) {
    1375                 :     case __type::Tvoid_t:
    1376                 :         {
    1377               0 :             Write((__v).get_void_t(), __msg);
    1378               0 :             return;
    1379                 :         }
    1380                 :     case __type::Tnull_t:
    1381                 :         {
    1382               0 :             Write((__v).get_null_t(), __msg);
    1383               0 :             return;
    1384                 :         }
    1385                 :     case __type::Tbool:
    1386                 :         {
    1387               0 :             Write((__v).get_bool(), __msg);
    1388               0 :             return;
    1389                 :         }
    1390                 :     case __type::Tint:
    1391                 :         {
    1392               0 :             Write((__v).get_int(), __msg);
    1393               0 :             return;
    1394                 :         }
    1395                 :     case __type::Tdouble:
    1396                 :         {
    1397               0 :             Write((__v).get_double(), __msg);
    1398               0 :             return;
    1399                 :         }
    1400                 :     case __type::TnsCString:
    1401                 :         {
    1402               0 :             Write((__v).get_nsCString(), __msg);
    1403               0 :             return;
    1404                 :         }
    1405                 :     case __type::TPPluginScriptableObjectParent:
    1406                 :         {
    1407               0 :             NS_RUNTIMEABORT("wrong side!");
    1408               0 :             return;
    1409                 :         }
    1410                 :     case __type::TPPluginScriptableObjectChild:
    1411                 :         {
    1412               0 :             Write((__v).get_PPluginScriptableObjectChild(), __msg, true);
    1413               0 :             return;
    1414                 :         }
    1415                 :     default:
    1416                 :         {
    1417               0 :             NS_RUNTIMEABORT("unknown union type");
    1418               0 :             return;
    1419                 :         }
    1420                 :     }
    1421                 : }
    1422                 : 
    1423                 : bool
    1424               0 : PPluginScriptableObjectChild::Read(
    1425                 :         Variant* __v,
    1426                 :         const Message* __msg,
    1427                 :         void** __iter)
    1428                 : {
    1429                 :     typedef Variant __type;
    1430                 :     int type;
    1431               0 :     if ((!(Read((&(type)), __msg, __iter)))) {
    1432               0 :         return false;
    1433                 :     }
    1434                 : 
    1435               0 :     switch (type) {
    1436                 :     case __type::Tvoid_t:
    1437                 :         {
    1438               0 :             void_t tmp = void_t();
    1439               0 :             (*(__v)) = tmp;
    1440               0 :             return Read((&((__v)->get_void_t())), __msg, __iter);
    1441                 :         }
    1442                 :     case __type::Tnull_t:
    1443                 :         {
    1444               0 :             null_t tmp = null_t();
    1445               0 :             (*(__v)) = tmp;
    1446               0 :             return Read((&((__v)->get_null_t())), __msg, __iter);
    1447                 :         }
    1448                 :     case __type::Tbool:
    1449                 :         {
    1450               0 :             bool tmp = bool();
    1451               0 :             (*(__v)) = tmp;
    1452               0 :             return Read((&((__v)->get_bool())), __msg, __iter);
    1453                 :         }
    1454                 :     case __type::Tint:
    1455                 :         {
    1456               0 :             int tmp = int();
    1457               0 :             (*(__v)) = tmp;
    1458               0 :             return Read((&((__v)->get_int())), __msg, __iter);
    1459                 :         }
    1460                 :     case __type::Tdouble:
    1461                 :         {
    1462               0 :             double tmp = double();
    1463               0 :             (*(__v)) = tmp;
    1464               0 :             return Read((&((__v)->get_double())), __msg, __iter);
    1465                 :         }
    1466                 :     case __type::TnsCString:
    1467                 :         {
    1468               0 :             nsCString tmp = nsCString();
    1469               0 :             (*(__v)) = tmp;
    1470               0 :             return Read((&((__v)->get_nsCString())), __msg, __iter);
    1471                 :         }
    1472                 :     case __type::TPPluginScriptableObjectParent:
    1473                 :         {
    1474               0 :             PPluginScriptableObjectChild* tmp = static_cast<PPluginScriptableObjectChild*>(0);
    1475               0 :             (*(__v)) = tmp;
    1476               0 :             return Read((&((__v)->get_PPluginScriptableObjectChild())), __msg, __iter, true);
    1477                 :         }
    1478                 :     case __type::TPPluginScriptableObjectChild:
    1479                 :         {
    1480               0 :             return false;
    1481                 :         }
    1482                 :     default:
    1483                 :         {
    1484               0 :             return false;
    1485                 :         }
    1486                 :     }
    1487                 : }
    1488                 : 
    1489                 : void
    1490               0 : PPluginScriptableObjectChild::Write(
    1491                 :         PPluginIdentifierChild* __v,
    1492                 :         Message* __msg,
    1493                 :         bool __nullable)
    1494                 : {
    1495                 :     int32 id;
    1496               0 :     if ((!(__v))) {
    1497               0 :         if ((!(__nullable))) {
    1498               0 :             NS_RUNTIMEABORT("NULL actor value passed to non-nullable param");
    1499                 :         }
    1500               0 :         id = 0;
    1501                 :     }
    1502                 :     else {
    1503               0 :         id = (__v)->mId;
    1504               0 :         if ((1) == (id)) {
    1505               0 :             NS_RUNTIMEABORT("actor has been |delete|d");
    1506                 :         }
    1507                 :     }
    1508                 : 
    1509               0 :     Write(id, __msg);
    1510               0 : }
    1511                 : 
    1512                 : bool
    1513               0 : PPluginScriptableObjectChild::Read(
    1514                 :         PPluginIdentifierChild** __v,
    1515                 :         const Message* __msg,
    1516                 :         void** __iter,
    1517                 :         bool __nullable)
    1518                 : {
    1519                 :     int32 id;
    1520               0 :     if ((!(Read((&(id)), __msg, __iter)))) {
    1521               0 :         return false;
    1522                 :     }
    1523               0 :     if (((1) == (id)) || (((0) == (id)) && ((!(__nullable))))) {
    1524               0 :         return false;
    1525                 :     }
    1526                 : 
    1527               0 :     if ((0) == (id)) {
    1528               0 :         (*(__v)) = 0;
    1529                 :     }
    1530                 :     else {
    1531               0 :         (*(__v)) = static_cast<PPluginIdentifierChild*>(Lookup(id));
    1532               0 :         if ((!((*(__v))))) {
    1533               0 :             return false;
    1534                 :         }
    1535                 :     }
    1536               0 :     return true;
    1537                 : }
    1538                 : 
    1539                 : 
    1540                 : 
    1541                 : } // namespace plugins
    1542                 : } // namespace mozilla

Generated by: LCOV version 1.7