Bug 1419959 - Unbreak build on Tier3 platforms after
bug 1402519. r=gsvelto
MozReview-Commit-ID: 8NNtuRkfbJe
--- a/toolkit/crashreporter/nsDummyExceptionHandler.cpp
+++ b/toolkit/crashreporter/nsDummyExceptionHandler.cpp
@@ -307,37 +307,37 @@ InitChildProcessTmpDir(nsIFile* aDirOver
#if defined(XP_WIN)
bool
SetRemoteExceptionHandler(const nsACString& crashPipe)
{
return false;
}
-#elif defined(XP_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+#elif defined(XP_MACOSX)
+
+bool
+SetRemoteExceptionHandler(const nsACString& crashPipe)
+{
+ return false;
+}
+
+#else
bool
CreateNotificationPipeForChild(int* childCrashFd, int* childCrashRemapFd)
{
return false;
}
bool
SetRemoteExceptionHandler()
{
return false;
}
-
-#elif defined(XP_MACOSX)
-
-bool
-SetRemoteExceptionHandler(const nsACString& crashPipe)
-{
- return false;
-}
#endif // XP_WIN
bool
TakeMinidumpForChild(uint32_t childPid, nsIFile** dump, uint32_t* aSequence)
{
return false;
}
--- a/toolkit/crashreporter/nsExceptionHandler.h
+++ b/toolkit/crashreporter/nsExceptionHandler.h
@@ -262,17 +262,17 @@ public:
void InjectCrashReporterIntoProcess(DWORD processID, InjectorCrashCallback* cb);
void UnregisterInjectorCallback(DWORD processID);
#endif
// Child-side API
bool SetRemoteExceptionHandler(const nsACString& crashPipe);
void InitChildProcessTmpDir(nsIFile* aDirOverride = nullptr);
-# elif defined(XP_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+# else
// Parent-side API for children
// Set the outparams for crash reporter server's fd (|childCrashFd|)
// and the magic fd number it should be remapped to
// (|childCrashRemapFd|) before exec() in the child process.
// |SetRemoteExceptionHandler()| in the child process expects to find
// the server at |childCrashRemapFd|. Return true iff successful.
//
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
@@ -278,20 +278,18 @@ XRE_TakeMinidumpForChild(uint32_t aChild
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)
+#else
return CrashReporter::SetRemoteExceptionHandler();
-#else
-# error "OOP crash reporter unsupported on this platform"
#endif
}
#if defined(XP_WIN)
void
SetTaskbarGroupId(const nsString& aId)
{
if (FAILED(SetCurrentProcessExplicitAppUserModelID(aId.get()))) {
@@ -488,26 +486,24 @@ XRE_InitChildProcess(int aArgc,
// 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)
+#else
// 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
}
// For Init/Shutdown thread name annotations in the crash reporter.
CrashReporter::InitThreadAnnotationRAII annotation;
gArgv = aArgv;
gArgc = aArgc;