コード例 #1
0
ファイル: CrashReporterChild.cpp プロジェクト: 70599/Waterfox
/*static*/
PCrashReporterChild*
CrashReporterChild::GetCrashReporter()
{
  const ManagedContainer<PCrashReporterChild>* reporters = nullptr;
  switch (XRE_GetProcessType()) {
    case GeckoProcessType_Content: {
      ContentChild* child = ContentChild::GetSingleton();
      reporters = &child->ManagedPCrashReporterChild();
      break;
    }
    case GeckoProcessType_Plugin: {
      PluginModuleChild* child = PluginModuleChild::GetChrome();
      reporters = &child->ManagedPCrashReporterChild();
      break;
    }
    default:
      break;
  }
  if (!reporters) {
    return nullptr;
  }
  return LoneManagedOrNull(*reporters);
}
コード例 #2
0
/*static*/
PCrashReporterChild*
CrashReporterChild::GetCrashReporter()
{
  const InfallibleTArray<PCrashReporterChild*>* reporters = nsnull;
  switch (XRE_GetProcessType()) {
    case GeckoProcessType_Content: {
      ContentChild* child = ContentChild::GetSingleton();
      reporters = &child->ManagedPCrashReporterChild();
      break;
    }
    case GeckoProcessType_Plugin: {
      PluginModuleChild* child = PluginModuleChild::current();
      reporters = &child->ManagedPCrashReporterChild();
      break;
    }
    default:
      break;
  }
  if (reporters && reporters->Length() > 0) {
    return reporters->ElementAt(0);
  }
  return nsnull;
}