LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - PProcessHangMonitor.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 8 145 5.5 %
Date: 2017-07-14 16:53:18 Functions: 3 33 9.1 %
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/PProcessHangMonitor.h"
       8             : 
       9             : namespace mozilla {
      10             : namespace PProcessHangMonitor {
      11             : 
      12             : nsresult
      13           2 : CreateEndpoints(
      14             :         base::ProcessId aParentDestPid,
      15             :         base::ProcessId aChildDestPid,
      16             :         mozilla::ipc::Endpoint<mozilla::PProcessHangMonitorParent>* aParent,
      17             :         mozilla::ipc::Endpoint<mozilla::PProcessHangMonitorChild>* aChild)
      18             : {
      19           2 :     return mozilla::ipc::CreateEndpoints(mozilla::ipc::PrivateIPDLInterface(), aParentDestPid, aChildDestPid, PProcessHangMonitorMsgStart, PProcessHangMonitorMsgStartChild, aParent, aChild);
      20             : }
      21             : void
      22           4 : Transition(
      23             :         MessageType msg,
      24             :         State* next)
      25             : {
      26           4 :     switch ((*(next))) {
      27             :     case __Null:
      28           4 :         break;
      29             :     case __Dead:
      30           0 :         mozilla::ipc::LogicError("__delete__()d actor");
      31           0 :         break;
      32             :     default:
      33           0 :         mozilla::ipc::LogicError("corrupted actor state");
      34           0 :         break;
      35             :     }
      36           4 : }
      37             : IPC::Message*
      38           0 : Msg_HangEvidence(int32_t routingId)
      39             : {
      40           0 :     return new IPC::Message(routingId, Msg_HangEvidence__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PProcessHangMonitor::Msg_HangEvidence", true);
      41             : }
      42             : IPC::Message*
      43           0 : Msg_ClearHang(int32_t routingId)
      44             : {
      45           0 :     return new IPC::Message(routingId, Msg_ClearHang__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PProcessHangMonitor::Msg_ClearHang", true);
      46             : }
      47             : IPC::Message*
      48           0 : Msg_TerminateScript(int32_t routingId)
      49             : {
      50           0 :     return new IPC::Message(routingId, Msg_TerminateScript__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PProcessHangMonitor::Msg_TerminateScript", true);
      51             : }
      52             : IPC::Message*
      53           0 : Msg_BeginStartingDebugger(int32_t routingId)
      54             : {
      55           0 :     return new IPC::Message(routingId, Msg_BeginStartingDebugger__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PProcessHangMonitor::Msg_BeginStartingDebugger", true);
      56             : }
      57             : IPC::Message*
      58           0 : Msg_EndStartingDebugger(int32_t routingId)
      59             : {
      60           0 :     return new IPC::Message(routingId, Msg_EndStartingDebugger__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PProcessHangMonitor::Msg_EndStartingDebugger", true);
      61             : }
      62             : IPC::Message*
      63           2 : Msg_ForcePaint(int32_t routingId)
      64             : {
      65           2 :     return new IPC::Message(routingId, Msg_ForcePaint__ID, 0, IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, "PProcessHangMonitor::Msg_ForcePaint", true);
      66             : }
      67             : 
      68             : } // namespace PProcessHangMonitor
      69             : } // namespace mozilla
      70             : 
      71             : //-----------------------------------------------------------------------------
      72             : // Method definitions for the IPDL type |struct SlowScriptData|
      73             : //
      74             : namespace mozilla {
      75           0 : MOZ_IMPLICIT SlowScriptData::SlowScriptData() :
      76             :     tabId_(),
      77           0 :     filename_()
      78             : {
      79           0 :     Init();
      80           0 : }
      81             : 
      82           0 : SlowScriptData::~SlowScriptData()
      83             : {
      84           0 : }
      85             : 
      86           0 : auto SlowScriptData::operator==(const SlowScriptData& _o) const -> bool
      87             : {
      88           0 :     if ((!((tabId()) == ((_o).tabId())))) {
      89           0 :         return false;
      90             :     }
      91           0 :     if ((!((filename()) == ((_o).filename())))) {
      92           0 :         return false;
      93             :     }
      94           0 :     return true;
      95             : }
      96             : 
      97           0 : auto SlowScriptData::operator!=(const SlowScriptData& _o) const -> bool
      98             : {
      99           0 :     return (!(operator==(_o)));
     100             : }
     101             : 
     102           0 : auto SlowScriptData::Init() -> void
     103             : {
     104           0 : }
     105             : 
     106           0 : auto SlowScriptData::Assign(
     107             :         const TabId& _tabId,
     108             :         const nsCString& _filename) -> void
     109             : {
     110           0 :     tabId_ = _tabId;
     111           0 :     filename_ = _filename;
     112           0 : }
     113             : 
     114             : } // namespace mozilla
     115             : 
     116             : //-----------------------------------------------------------------------------
     117             : // Method definitions for the IPDL type |struct PluginHangData|
     118             : //
     119             : namespace mozilla {
     120           0 : MOZ_IMPLICIT PluginHangData::PluginHangData() :
     121             :     pluginId_(),
     122           0 :     contentProcessId_()
     123             : {
     124           0 :     Init();
     125           0 : }
     126             : 
     127           0 : PluginHangData::~PluginHangData()
     128             : {
     129           0 : }
     130             : 
     131           0 : auto PluginHangData::operator==(const PluginHangData& _o) const -> bool
     132             : {
     133           0 :     if ((!((pluginId()) == ((_o).pluginId())))) {
     134           0 :         return false;
     135             :     }
     136           0 :     if ((!((contentProcessId()) == ((_o).contentProcessId())))) {
     137           0 :         return false;
     138             :     }
     139           0 :     return true;
     140             : }
     141             : 
     142           0 : auto PluginHangData::operator!=(const PluginHangData& _o) const -> bool
     143             : {
     144           0 :     return (!(operator==(_o)));
     145             : }
     146             : 
     147           0 : auto PluginHangData::Init() -> void
     148             : {
     149           0 : }
     150             : 
     151           0 : auto PluginHangData::Assign(
     152             :         const uint32_t& _pluginId,
     153             :         const ProcessId& _contentProcessId) -> void
     154             : {
     155           0 :     pluginId_ = _pluginId;
     156           0 :     contentProcessId_ = _contentProcessId;
     157           0 : }
     158             : 
     159             : } // namespace mozilla
     160             : 
     161             : //-----------------------------------------------------------------------------
     162             : // Method definitions for the IPDL type |union HangData|
     163             : //
     164             : namespace mozilla {
     165           0 : auto HangData::MaybeDestroy(Type aNewType) -> bool
     166             : {
     167           0 :     if ((mType) == (T__None)) {
     168           0 :         return true;
     169             :     }
     170           0 :     if ((mType) == (aNewType)) {
     171           0 :         return false;
     172             :     }
     173           0 :     switch (mType) {
     174             :     case TSlowScriptData:
     175             :         {
     176           0 :             (ptr_SlowScriptData())->~SlowScriptData__tdef();
     177           0 :             break;
     178             :         }
     179             :     case TPluginHangData:
     180             :         {
     181           0 :             (ptr_PluginHangData())->~PluginHangData__tdef();
     182           0 :             break;
     183             :         }
     184             :     default:
     185             :         {
     186           0 :             mozilla::ipc::LogicError("not reached");
     187           0 :             break;
     188             :         }
     189             :     }
     190           0 :     return true;
     191             : }
     192             : 
     193           0 : MOZ_IMPLICIT HangData::HangData(const SlowScriptData& aOther)
     194             : {
     195           0 :     new (mozilla::KnownNotNull, ptr_SlowScriptData()) SlowScriptData(aOther);
     196           0 :     mType = TSlowScriptData;
     197           0 : }
     198             : 
     199           0 : MOZ_IMPLICIT HangData::HangData(const PluginHangData& aOther)
     200             : {
     201           0 :     new (mozilla::KnownNotNull, ptr_PluginHangData()) PluginHangData(aOther);
     202           0 :     mType = TPluginHangData;
     203           0 : }
     204             : 
     205           0 : MOZ_IMPLICIT HangData::HangData(const HangData& aOther)
     206             : {
     207           0 :     (aOther).AssertSanity();
     208           0 :     switch ((aOther).type()) {
     209             :     case TSlowScriptData:
     210             :         {
     211           0 :             new (mozilla::KnownNotNull, ptr_SlowScriptData()) SlowScriptData((aOther).get_SlowScriptData());
     212           0 :             break;
     213             :         }
     214             :     case TPluginHangData:
     215             :         {
     216           0 :             new (mozilla::KnownNotNull, ptr_PluginHangData()) PluginHangData((aOther).get_PluginHangData());
     217           0 :             break;
     218             :         }
     219             :     case T__None:
     220             :         {
     221           0 :             break;
     222             :         }
     223             :     default:
     224             :         {
     225           0 :             mozilla::ipc::LogicError("unreached");
     226           0 :             return;
     227             :         }
     228             :     }
     229           0 :     mType = (aOther).type();
     230             : }
     231             : 
     232           0 : HangData::~HangData()
     233             : {
     234           0 :     static_cast<void>(MaybeDestroy(T__None));
     235           0 : }
     236             : 
     237           0 : auto HangData::operator=(const SlowScriptData& aRhs) -> HangData&
     238             : {
     239           0 :     if (MaybeDestroy(TSlowScriptData)) {
     240           0 :         new (mozilla::KnownNotNull, ptr_SlowScriptData()) SlowScriptData;
     241             :     }
     242           0 :     (*(ptr_SlowScriptData())) = aRhs;
     243           0 :     mType = TSlowScriptData;
     244           0 :     return (*(this));
     245             : }
     246             : 
     247           0 : auto HangData::operator=(const PluginHangData& aRhs) -> HangData&
     248             : {
     249           0 :     if (MaybeDestroy(TPluginHangData)) {
     250           0 :         new (mozilla::KnownNotNull, ptr_PluginHangData()) PluginHangData;
     251             :     }
     252           0 :     (*(ptr_PluginHangData())) = aRhs;
     253           0 :     mType = TPluginHangData;
     254           0 :     return (*(this));
     255             : }
     256             : 
     257           0 : auto HangData::operator=(const HangData& aRhs) -> HangData&
     258             : {
     259           0 :     (aRhs).AssertSanity();
     260           0 :     Type t = (aRhs).type();
     261           0 :     switch (t) {
     262             :     case TSlowScriptData:
     263             :         {
     264           0 :             if (MaybeDestroy(t)) {
     265           0 :                 new (mozilla::KnownNotNull, ptr_SlowScriptData()) SlowScriptData;
     266             :             }
     267           0 :             (*(ptr_SlowScriptData())) = (aRhs).get_SlowScriptData();
     268           0 :             break;
     269             :         }
     270             :     case TPluginHangData:
     271             :         {
     272           0 :             if (MaybeDestroy(t)) {
     273           0 :                 new (mozilla::KnownNotNull, ptr_PluginHangData()) PluginHangData;
     274             :             }
     275           0 :             (*(ptr_PluginHangData())) = (aRhs).get_PluginHangData();
     276           0 :             break;
     277             :         }
     278             :     case T__None:
     279             :         {
     280           0 :             static_cast<void>(MaybeDestroy(t));
     281           0 :             break;
     282             :         }
     283             :     default:
     284             :         {
     285           0 :             mozilla::ipc::LogicError("unreached");
     286           0 :             break;
     287             :         }
     288             :     }
     289           0 :     mType = t;
     290           0 :     return (*(this));
     291             : }
     292             : 
     293           0 : auto HangData::operator==(const SlowScriptData& aRhs) const -> bool
     294             : {
     295           0 :     return (get_SlowScriptData()) == (aRhs);
     296             : }
     297             : 
     298           0 : auto HangData::operator==(const PluginHangData& aRhs) const -> bool
     299             : {
     300           0 :     return (get_PluginHangData()) == (aRhs);
     301             : }
     302             : 
     303           0 : auto HangData::operator==(const HangData& aRhs) const -> bool
     304             : {
     305           0 :     if ((type()) != ((aRhs).type())) {
     306           0 :         return false;
     307             :     }
     308             : 
     309           0 :     switch (type()) {
     310             :     case TSlowScriptData:
     311             :         {
     312           0 :             return (get_SlowScriptData()) == ((aRhs).get_SlowScriptData());
     313             :         }
     314             :     case TPluginHangData:
     315             :         {
     316           0 :             return (get_PluginHangData()) == ((aRhs).get_PluginHangData());
     317             :         }
     318             :     default:
     319             :         {
     320           0 :             mozilla::ipc::LogicError("unreached");
     321           0 :             return false;
     322             :         }
     323             :     }
     324             : }
     325             : 
     326           0 : auto HangData::get(SlowScriptData* aOutValue) const -> void
     327             : {
     328           0 :     (*(aOutValue)) = get_SlowScriptData();
     329           0 : }
     330             : 
     331           0 : auto HangData::get(PluginHangData* aOutValue) const -> void
     332             : {
     333           0 :     (*(aOutValue)) = get_PluginHangData();
     334           0 : }
     335             : 
     336             : } // namespace mozilla

Generated by: LCOV version 1.13