LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - PGMPServiceChild.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 238 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 28 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //
       2             : // Automatically generated by ipdlc.
       3             : // Edit at your own risk
       4             : //
       5             : 
       6             : 
       7             : #include "mozilla/gmp/PGMPServiceChild.h"
       8             : #ifdef MOZ_CRASHREPORTER
       9             : #  include "nsXULAppAPI.h"
      10             : #endif
      11             : 
      12             : #include "mozilla/gmp/PGMPContentChild.h"
      13             : 
      14             : #include "nsIFile.h"
      15             : #include "GeckoProfiler.h"
      16             : 
      17             : namespace mozilla {
      18             : namespace gmp {
      19             : 
      20             : 
      21           0 : auto PGMPServiceChild::ActorDestroy(ActorDestroyReason aWhy) -> void
      22             : {
      23           0 : }
      24             : 
      25           0 : auto PGMPServiceChild::ProcessingError(
      26             :         Result aCode,
      27             :         const char* aReason) -> void
      28             : {
      29           0 : }
      30             : 
      31           0 : auto PGMPServiceChild::ShouldContinueFromReplyTimeout() -> bool
      32             : {
      33           0 :     return true;
      34             : }
      35             : 
      36           0 : auto PGMPServiceChild::EnteredCxxStack() -> void
      37             : {
      38           0 : }
      39             : 
      40           0 : auto PGMPServiceChild::ExitedCxxStack() -> void
      41             : {
      42           0 : }
      43             : 
      44           0 : auto PGMPServiceChild::EnteredCall() -> void
      45             : {
      46           0 : }
      47             : 
      48           0 : auto PGMPServiceChild::ExitedCall() -> void
      49             : {
      50           0 : }
      51             : 
      52           0 : MOZ_IMPLICIT PGMPServiceChild::PGMPServiceChild() :
      53             :     mozilla::ipc::IToplevelProtocol(PGMPServiceMsgStart, mozilla::ipc::ChildSide),
      54             :     mChannel("PGMPServiceChild", ALLOW_THIS_IN_INITIALIZER_LIST(this)),
      55           0 :     mState(PGMPService::__Start)
      56             : {
      57           0 :     MOZ_COUNT_CTOR(PGMPServiceChild);
      58           0 : }
      59             : 
      60           0 : PGMPServiceChild::~PGMPServiceChild()
      61             : {
      62           0 :     MOZ_COUNT_DTOR(PGMPServiceChild);
      63           0 : }
      64             : 
      65           0 : auto PGMPServiceChild::SendLaunchGMP(
      66             :         const nsCString& nodeId,
      67             :         const nsCString& api,
      68             :         const nsTArray<nsCString>& tags,
      69             :         const nsTArray<ProcessId>& alreadyBridgedTo,
      70             :         uint32_t* pluginId,
      71             :         ProcessId* id,
      72             :         nsCString* displayName,
      73             :         Endpoint<mozilla::gmp::PGMPContentParent>* endpoint,
      74             :         nsresult* aResult) -> bool
      75             : {
      76           0 :     IPC::Message* msg__ = PGMPService::Msg_LaunchGMP(MSG_ROUTING_CONTROL);
      77             : 
      78           0 :     Write(nodeId, msg__);
      79             :     // Sentinel = 'nodeId'
      80           0 :     (msg__)->WriteSentinel(592730925);
      81           0 :     Write(api, msg__);
      82             :     // Sentinel = 'api'
      83           0 :     (msg__)->WriteSentinel(2712041747);
      84           0 :     Write(tags, msg__);
      85             :     // Sentinel = 'tags'
      86           0 :     (msg__)->WriteSentinel(2697818311);
      87           0 :     Write(alreadyBridgedTo, msg__);
      88             :     // Sentinel = 'alreadyBridgedTo'
      89           0 :     (msg__)->WriteSentinel(3102476118);
      90             : 
      91           0 :     (msg__)->set_sync();
      92             : 
      93             : 
      94           0 :     Message reply__;
      95             : 
      96           0 :     if (mozilla::ipc::LoggingEnabledFor("PGMPServiceChild")) {
      97           0 :         mozilla::ipc::LogMessageForProtocol("PGMPServiceChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      98             :     }
      99           0 :     AUTO_PROFILER_LABEL("PGMPService::Msg_LaunchGMP", OTHER);
     100           0 :     PGMPService::Transition(PGMPService::Msg_LaunchGMP__ID, (&(mState)));
     101             : 
     102             :     bool sendok__;
     103             :     {
     104             :         AutoProfilerTracing syncIPCTracer(
     105             :                 "IPC",
     106           0 :                 "PGMPService::Msg_LaunchGMP");
     107           0 :         sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
     108             :     }
     109           0 :     if ((!(sendok__))) {
     110           0 :         return false;
     111             :     }
     112             : 
     113           0 :     if (mozilla::ipc::LoggingEnabledFor("PGMPServiceChild")) {
     114           0 :         mozilla::ipc::LogMessageForProtocol("PGMPServiceChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     115             :     }
     116             : 
     117           0 :     PickleIterator iter__(reply__);
     118             : 
     119           0 :     if ((!(Read(pluginId, (&(reply__)), (&(iter__)))))) {
     120           0 :         FatalError("Error deserializing 'uint32_t'");
     121           0 :         return false;
     122             :     }
     123             :     // Sentinel = 'pluginId'
     124           0 :     if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 1563488274)))) {
     125           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
     126           0 :         return false;
     127             :     }
     128           0 :     if ((!(Read(id, (&(reply__)), (&(iter__)))))) {
     129           0 :         FatalError("Error deserializing 'ProcessId'");
     130           0 :         return false;
     131             :     }
     132             :     // Sentinel = 'id'
     133           0 :     if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 2794505629)))) {
     134           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'ProcessId'");
     135           0 :         return false;
     136             :     }
     137           0 :     if ((!(Read(displayName, (&(reply__)), (&(iter__)))))) {
     138           0 :         FatalError("Error deserializing 'nsCString'");
     139           0 :         return false;
     140             :     }
     141             :     // Sentinel = 'displayName'
     142           0 :     if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3335312356)))) {
     143           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
     144           0 :         return false;
     145             :     }
     146           0 :     if ((!(Read(endpoint, (&(reply__)), (&(iter__)))))) {
     147           0 :         FatalError("Error deserializing 'Endpoint<mozilla::gmp::PGMPContentParent>'");
     148           0 :         return false;
     149             :     }
     150             :     // Sentinel = 'endpoint'
     151           0 :     if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3610972515)))) {
     152           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::gmp::PGMPContentParent>'");
     153           0 :         return false;
     154             :     }
     155           0 :     if ((!(Read(aResult, (&(reply__)), (&(iter__)))))) {
     156           0 :         FatalError("Error deserializing 'nsresult'");
     157           0 :         return false;
     158             :     }
     159             :     // Sentinel = 'aResult'
     160           0 :     if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3888726089)))) {
     161           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
     162           0 :         return false;
     163             :     }
     164           0 :     (reply__).EndRead(iter__, (reply__).type());
     165             : 
     166           0 :     return true;
     167             : }
     168             : 
     169           0 : auto PGMPServiceChild::SendLaunchGMPForNodeId(
     170             :         const NodeIdData& nodeId,
     171             :         const nsCString& api,
     172             :         const nsTArray<nsCString>& tags,
     173             :         const nsTArray<ProcessId>& alreadyBridgedTo,
     174             :         uint32_t* pluginId,
     175             :         ProcessId* id,
     176             :         nsCString* displayName,
     177             :         Endpoint<mozilla::gmp::PGMPContentParent>* endpoint,
     178             :         nsresult* aResult) -> bool
     179             : {
     180           0 :     IPC::Message* msg__ = PGMPService::Msg_LaunchGMPForNodeId(MSG_ROUTING_CONTROL);
     181             : 
     182           0 :     Write(nodeId, msg__);
     183             :     // Sentinel = 'nodeId'
     184           0 :     (msg__)->WriteSentinel(592730925);
     185           0 :     Write(api, msg__);
     186             :     // Sentinel = 'api'
     187           0 :     (msg__)->WriteSentinel(2712041747);
     188           0 :     Write(tags, msg__);
     189             :     // Sentinel = 'tags'
     190           0 :     (msg__)->WriteSentinel(2697818311);
     191           0 :     Write(alreadyBridgedTo, msg__);
     192             :     // Sentinel = 'alreadyBridgedTo'
     193           0 :     (msg__)->WriteSentinel(3102476118);
     194             : 
     195           0 :     (msg__)->set_sync();
     196             : 
     197             : 
     198           0 :     Message reply__;
     199             : 
     200           0 :     if (mozilla::ipc::LoggingEnabledFor("PGMPServiceChild")) {
     201           0 :         mozilla::ipc::LogMessageForProtocol("PGMPServiceChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     202             :     }
     203           0 :     AUTO_PROFILER_LABEL("PGMPService::Msg_LaunchGMPForNodeId", OTHER);
     204           0 :     PGMPService::Transition(PGMPService::Msg_LaunchGMPForNodeId__ID, (&(mState)));
     205             : 
     206             :     bool sendok__;
     207             :     {
     208             :         AutoProfilerTracing syncIPCTracer(
     209             :                 "IPC",
     210           0 :                 "PGMPService::Msg_LaunchGMPForNodeId");
     211           0 :         sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
     212             :     }
     213           0 :     if ((!(sendok__))) {
     214           0 :         return false;
     215             :     }
     216             : 
     217           0 :     if (mozilla::ipc::LoggingEnabledFor("PGMPServiceChild")) {
     218           0 :         mozilla::ipc::LogMessageForProtocol("PGMPServiceChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     219             :     }
     220             : 
     221           0 :     PickleIterator iter__(reply__);
     222             : 
     223           0 :     if ((!(Read(pluginId, (&(reply__)), (&(iter__)))))) {
     224           0 :         FatalError("Error deserializing 'uint32_t'");
     225           0 :         return false;
     226             :     }
     227             :     // Sentinel = 'pluginId'
     228           0 :     if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 1563488274)))) {
     229           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
     230           0 :         return false;
     231             :     }
     232           0 :     if ((!(Read(id, (&(reply__)), (&(iter__)))))) {
     233           0 :         FatalError("Error deserializing 'ProcessId'");
     234           0 :         return false;
     235             :     }
     236             :     // Sentinel = 'id'
     237           0 :     if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 2794505629)))) {
     238           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'ProcessId'");
     239           0 :         return false;
     240             :     }
     241           0 :     if ((!(Read(displayName, (&(reply__)), (&(iter__)))))) {
     242           0 :         FatalError("Error deserializing 'nsCString'");
     243           0 :         return false;
     244             :     }
     245             :     // Sentinel = 'displayName'
     246           0 :     if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3335312356)))) {
     247           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
     248           0 :         return false;
     249             :     }
     250           0 :     if ((!(Read(endpoint, (&(reply__)), (&(iter__)))))) {
     251           0 :         FatalError("Error deserializing 'Endpoint<mozilla::gmp::PGMPContentParent>'");
     252           0 :         return false;
     253             :     }
     254             :     // Sentinel = 'endpoint'
     255           0 :     if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3610972515)))) {
     256           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<mozilla::gmp::PGMPContentParent>'");
     257           0 :         return false;
     258             :     }
     259           0 :     if ((!(Read(aResult, (&(reply__)), (&(iter__)))))) {
     260           0 :         FatalError("Error deserializing 'nsresult'");
     261           0 :         return false;
     262             :     }
     263             :     // Sentinel = 'aResult'
     264           0 :     if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3888726089)))) {
     265           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
     266           0 :         return false;
     267             :     }
     268           0 :     (reply__).EndRead(iter__, (reply__).type());
     269             : 
     270           0 :     return true;
     271             : }
     272             : 
     273           0 : auto PGMPServiceChild::SendGetGMPNodeId(
     274             :         const nsString& origin,
     275             :         const nsString& topLevelOrigin,
     276             :         const nsString& gmpName,
     277             :         nsCString* id) -> bool
     278             : {
     279           0 :     IPC::Message* msg__ = PGMPService::Msg_GetGMPNodeId(MSG_ROUTING_CONTROL);
     280             : 
     281           0 :     Write(origin, msg__);
     282             :     // Sentinel = 'origin'
     283           0 :     (msg__)->WriteSentinel(1429924608);
     284           0 :     Write(topLevelOrigin, msg__);
     285             :     // Sentinel = 'topLevelOrigin'
     286           0 :     (msg__)->WriteSentinel(2455035801);
     287           0 :     Write(gmpName, msg__);
     288             :     // Sentinel = 'gmpName'
     289           0 :     (msg__)->WriteSentinel(2256822302);
     290             : 
     291           0 :     (msg__)->set_sync();
     292             : 
     293             : 
     294           0 :     Message reply__;
     295             : 
     296           0 :     if (mozilla::ipc::LoggingEnabledFor("PGMPServiceChild")) {
     297           0 :         mozilla::ipc::LogMessageForProtocol("PGMPServiceChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     298             :     }
     299           0 :     AUTO_PROFILER_LABEL("PGMPService::Msg_GetGMPNodeId", OTHER);
     300           0 :     PGMPService::Transition(PGMPService::Msg_GetGMPNodeId__ID, (&(mState)));
     301             : 
     302             :     bool sendok__;
     303             :     {
     304             :         AutoProfilerTracing syncIPCTracer(
     305             :                 "IPC",
     306           0 :                 "PGMPService::Msg_GetGMPNodeId");
     307           0 :         sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
     308             :     }
     309           0 :     if ((!(sendok__))) {
     310           0 :         return false;
     311             :     }
     312             : 
     313           0 :     if (mozilla::ipc::LoggingEnabledFor("PGMPServiceChild")) {
     314           0 :         mozilla::ipc::LogMessageForProtocol("PGMPServiceChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     315             :     }
     316             : 
     317           0 :     PickleIterator iter__(reply__);
     318             : 
     319           0 :     if ((!(Read(id, (&(reply__)), (&(iter__)))))) {
     320           0 :         FatalError("Error deserializing 'nsCString'");
     321           0 :         return false;
     322             :     }
     323             :     // Sentinel = 'id'
     324           0 :     if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 2794505629)))) {
     325           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
     326           0 :         return false;
     327             :     }
     328           0 :     (reply__).EndRead(iter__, (reply__).type());
     329             : 
     330           0 :     return true;
     331             : }
     332             : 
     333           0 : auto PGMPServiceChild::GetIPCChannel() -> MessageChannel*
     334             : {
     335           0 :     return (&(mChannel));
     336             : }
     337             : 
     338           0 : auto PGMPServiceChild::GetIPCChannel() const -> const MessageChannel*
     339             : {
     340           0 :     return (&(mChannel));
     341             : }
     342             : 
     343           0 : auto PGMPServiceChild::RemoveManagee(
     344             :         int32_t aProtocolId,
     345             :         ProtocolBase* aListener) -> void
     346             : {
     347           0 :     FatalError("unreached");
     348           0 :     return;
     349             : }
     350             : 
     351           0 : auto PGMPServiceChild::OnMessageReceived(const Message& msg__) -> PGMPServiceChild::Result
     352             : {
     353           0 :     switch ((msg__).type()) {
     354             :     case PGMPService::Msg_BeginShutdown__ID:
     355             :         {
     356           0 :             if (mozilla::ipc::LoggingEnabledFor("PGMPServiceChild")) {
     357           0 :                 mozilla::ipc::LogMessageForProtocol("PGMPServiceChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     358             :             }
     359           0 :             AUTO_PROFILER_LABEL("PGMPService::Msg_BeginShutdown", OTHER);
     360             : 
     361           0 :             PGMPService::Transition(PGMPService::Msg_BeginShutdown__ID, (&(mState)));
     362           0 :             if ((!(RecvBeginShutdown()))) {
     363           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     364             :                 // Error handled in mozilla::ipc::IPCResult
     365           0 :                 return MsgProcessingError;
     366             :             }
     367             : 
     368           0 :             return MsgProcessed;
     369             :         }
     370             :     default:
     371             :         {
     372           0 :             return MsgNotKnown;
     373             :         }
     374             :     case SHMEM_CREATED_MESSAGE_TYPE:
     375             :         {
     376           0 :             FatalError("this protocol tree does not use shmem");
     377           0 :             return MsgNotKnown;
     378             :         }
     379             :     case SHMEM_DESTROYED_MESSAGE_TYPE:
     380             :         {
     381           0 :             FatalError("this protocol tree does not use shmem");
     382           0 :             return MsgNotKnown;
     383             :         }
     384             :     }
     385             : }
     386             : 
     387           0 : auto PGMPServiceChild::OnMessageReceived(
     388             :         const Message& msg__,
     389             :         Message*& reply__) -> PGMPServiceChild::Result
     390             : {
     391           0 :     return MsgNotKnown;
     392             : }
     393             : 
     394           0 : auto PGMPServiceChild::OnCallReceived(
     395             :         const Message& msg__,
     396             :         Message*& reply__) -> PGMPServiceChild::Result
     397             : {
     398           0 :     MOZ_ASSERT_UNREACHABLE("message protocol not supported");
     399             :     return MsgNotKnown;
     400             : }
     401             : 
     402           0 : auto PGMPServiceChild::GetProtocolTypeId() -> int32_t
     403             : {
     404           0 :     return PGMPServiceMsgStart;
     405             : }
     406             : 
     407           0 : auto PGMPServiceChild::OnChannelClose() -> void
     408             : {
     409           0 :     DestroySubtree(NormalShutdown);
     410           0 :     DeallocSubtree();
     411           0 :     DeallocShmems();
     412           0 :     DeallocPGMPServiceChild();
     413           0 : }
     414             : 
     415           0 : auto PGMPServiceChild::OnChannelError() -> void
     416             : {
     417           0 :     DestroySubtree(AbnormalShutdown);
     418           0 :     DeallocSubtree();
     419           0 :     DeallocShmems();
     420           0 :     DeallocPGMPServiceChild();
     421           0 : }
     422             : 
     423           0 : auto PGMPServiceChild::ProtocolName() const -> const char*
     424             : {
     425           0 :     return "PGMPServiceChild";
     426             : }
     427             : 
     428           0 : auto PGMPServiceChild::DestroySubtree(ActorDestroyReason why) -> void
     429             : {
     430             :     // Reject owning pending promises.
     431           0 :     (GetIPCChannel())->RejectPendingPromisesForActor(this);
     432             : 
     433             :     // Finally, destroy "us".
     434           0 :     ActorDestroy(why);
     435           0 : }
     436             : 
     437           0 : auto PGMPServiceChild::DeallocSubtree() -> void
     438             : {
     439           0 : }
     440             : 
     441           0 : auto PGMPServiceChild::DeallocPGMPServiceChild() -> void
     442             : {
     443           0 : }
     444             : 
     445           0 : auto PGMPServiceChild::Write(
     446             :         const NodeIdData& v__,
     447             :         Message* msg__) -> void
     448             : {
     449           0 :     Write((v__).mOrigin(), msg__);
     450             :     // Sentinel = 'mOrigin'
     451           0 :     (msg__)->WriteSentinel(2379256900);
     452           0 :     Write((v__).mTopLevelOrigin(), msg__);
     453             :     // Sentinel = 'mTopLevelOrigin'
     454           0 :     (msg__)->WriteSentinel(1841310053);
     455           0 :     Write((v__).mGMPName(), msg__);
     456             :     // Sentinel = 'mGMPName'
     457           0 :     (msg__)->WriteSentinel(4228424074);
     458           0 : }
     459             : 
     460           0 : auto PGMPServiceChild::Read(
     461             :         NodeIdData* v__,
     462             :         const Message* msg__,
     463             :         PickleIterator* iter__) -> bool
     464             : {
     465           0 :     if ((!(Read((&((v__)->mOrigin())), msg__, iter__)))) {
     466           0 :         FatalError("Error deserializing 'mOrigin' (nsString) member of 'NodeIdData'");
     467           0 :         return false;
     468             :     }
     469             :     // Sentinel = 'mOrigin'
     470           0 :     if ((!((msg__)->ReadSentinel(iter__, 2379256900)))) {
     471           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'mOrigin' (nsString) member of 'NodeIdData'");
     472           0 :         return false;
     473             :     }
     474           0 :     if ((!(Read((&((v__)->mTopLevelOrigin())), msg__, iter__)))) {
     475           0 :         FatalError("Error deserializing 'mTopLevelOrigin' (nsString) member of 'NodeIdData'");
     476           0 :         return false;
     477             :     }
     478             :     // Sentinel = 'mTopLevelOrigin'
     479           0 :     if ((!((msg__)->ReadSentinel(iter__, 1841310053)))) {
     480           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'mTopLevelOrigin' (nsString) member of 'NodeIdData'");
     481           0 :         return false;
     482             :     }
     483           0 :     if ((!(Read((&((v__)->mGMPName())), msg__, iter__)))) {
     484           0 :         FatalError("Error deserializing 'mGMPName' (nsString) member of 'NodeIdData'");
     485           0 :         return false;
     486             :     }
     487             :     // Sentinel = 'mGMPName'
     488           0 :     if ((!((msg__)->ReadSentinel(iter__, 4228424074)))) {
     489           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'mGMPName' (nsString) member of 'NodeIdData'");
     490           0 :         return false;
     491             :     }
     492           0 :     return true;
     493             : }
     494             : 
     495             : 
     496             : 
     497             : } // namespace gmp
     498             : } // namespace mozilla

Generated by: LCOV version 1.13