mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
Remove base conditional code for crash reporter and injector.
This commit is contained in:
parent
87fa26d31e
commit
434f3590e3
131 changed files with 39 additions and 4139 deletions
|
|
@ -242,30 +242,6 @@ XRE_SetProcessType(const char* aProcessTypeString)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
// FIXME/bug 539522: this out-of-place function is stuck here because
|
||||
// IPDL wants access to this crashreporter interface, and
|
||||
// crashreporter is built in such a way to make that awkward
|
||||
bool
|
||||
XRE_TakeMinidumpForChild(uint32_t aChildPid, nsIFile** aDump,
|
||||
uint32_t* aSequence)
|
||||
{
|
||||
return CrashReporter::TakeMinidumpForChild(aChildPid, aDump, aSequence);
|
||||
}
|
||||
|
||||
bool
|
||||
XRE_SetRemoteExceptionHandler(const char* aPipe/*= 0*/)
|
||||
{
|
||||
#if defined(XP_WIN) || defined(XP_MACOSX)
|
||||
return CrashReporter::SetRemoteExceptionHandler(nsDependentCString(aPipe));
|
||||
#elif defined(OS_LINUX)
|
||||
return CrashReporter::SetRemoteExceptionHandler();
|
||||
#else
|
||||
# error "OOP crash reporter unsupported on this platform"
|
||||
#endif
|
||||
}
|
||||
#endif // if defined(MOZ_CRASHREPORTER)
|
||||
|
||||
#if defined(XP_WIN)
|
||||
void
|
||||
SetTaskbarGroupId(const nsString& aId)
|
||||
|
|
@ -293,22 +269,6 @@ SetTaskbarGroupId(const nsString& aId)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
#if defined(MOZ_CONTENT_SANDBOX) && !defined(MOZ_WIDGET_GONK)
|
||||
void
|
||||
AddContentSandboxLevelAnnotation()
|
||||
{
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
int level = Preferences::GetInt("security.sandbox.content.level");
|
||||
nsAutoCString levelString;
|
||||
levelString.AppendInt(level);
|
||||
CrashReporter::AnnotateCrashReport(
|
||||
NS_LITERAL_CSTRING("ContentSandboxLevel"), levelString);
|
||||
}
|
||||
}
|
||||
#endif /* MOZ_CONTENT_SANDBOX && !MOZ_WIDGET_GONK */
|
||||
#endif /* MOZ_CRASHREPORTER */
|
||||
|
||||
nsresult
|
||||
XRE_InitChildProcess(int aArgc,
|
||||
char* aArgv[],
|
||||
|
|
@ -462,33 +422,6 @@ XRE_InitChildProcess(int aArgc,
|
|||
|
||||
SetupErrorHandling(aArgv[0]);
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
if (aArgc < 1)
|
||||
return NS_ERROR_FAILURE;
|
||||
const char* const crashReporterArg = aArgv[--aArgc];
|
||||
|
||||
# if defined(XP_WIN) || defined(XP_MACOSX)
|
||||
// on windows and mac, |crashReporterArg| is the named pipe on which the
|
||||
// server is listening for requests, or "-" if crash reporting is
|
||||
// disabled.
|
||||
if (0 != strcmp("-", crashReporterArg) &&
|
||||
!XRE_SetRemoteExceptionHandler(crashReporterArg)) {
|
||||
// Bug 684322 will add better visibility into this condition
|
||||
NS_WARNING("Could not setup crash reporting\n");
|
||||
}
|
||||
# elif defined(OS_LINUX)
|
||||
// on POSIX, |crashReporterArg| is "true" if crash reporting is
|
||||
// enabled, false otherwise
|
||||
if (0 != strcmp("false", crashReporterArg) &&
|
||||
!XRE_SetRemoteExceptionHandler(nullptr)) {
|
||||
// Bug 684322 will add better visibility into this condition
|
||||
NS_WARNING("Could not setup crash reporting\n");
|
||||
}
|
||||
# else
|
||||
# error "OOP crash reporting unsupported on this platform"
|
||||
# endif
|
||||
#endif // if defined(MOZ_CRASHREPORTER)
|
||||
|
||||
gArgv = aArgv;
|
||||
gArgc = aArgc;
|
||||
|
||||
|
|
@ -667,12 +600,6 @@ XRE_InitChildProcess(int aArgc,
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#if defined(XP_WIN) || defined(XP_MACOSX)
|
||||
CrashReporter::InitChildProcessTmpDir();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(XP_WIN)
|
||||
// Set child processes up such that they will get killed after the
|
||||
// chrome process is killed in cases where the user shuts the system
|
||||
|
|
@ -688,12 +615,6 @@ XRE_InitChildProcess(int aArgc,
|
|||
|
||||
OverrideDefaultLocaleIfNeeded();
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
#if defined(MOZ_CONTENT_SANDBOX) && !defined(MOZ_WIDGET_GONK)
|
||||
AddContentSandboxLevelAnnotation();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Run the UI event loop on the main thread.
|
||||
uiMessageLoop.MessageLoop::Run();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue