Remove base conditional code for crash reporter and injector.

This commit is contained in:
wolfbeast 2018-03-30 08:50:58 +02:00 committed by Roy Tam
commit 434f3590e3
131 changed files with 39 additions and 4139 deletions

View file

@ -11,9 +11,6 @@
#include "nsDebugImpl.h"
#include "nsDebug.h"
#ifdef MOZ_CRASHREPORTER
# include "nsExceptionHandler.h"
#endif
#include "nsString.h"
#include "nsXULAppAPI.h"
#include "prprf.h"
@ -380,22 +377,6 @@ NS_DebugBreak(uint32_t aSeverity, const char* aStr, const char* aExpr,
return;
case NS_DEBUG_ABORT: {
#if defined(MOZ_CRASHREPORTER)
// Updating crash annotations in the child causes us to do IPC. This can
// really cause trouble if we're asserting from within IPC code. So we
// have to do without the annotations in that case.
if (XRE_IsParentProcess()) {
// Don't include the PID in the crash report annotation to
// allow faceting on crash-stats.mozilla.org.
nsCString note("xpcom_runtime_abort(");
note += nonPIDBuf.buffer;
note += ")";
CrashReporter::AppendAppNotesToCrashReport(note);
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AbortMessage"),
nsDependentCString(nonPIDBuf.buffer));
}
#endif // MOZ_CRASHREPORTER
#if defined(DEBUG) && defined(_WIN32)
RealBreak();
#endif
@ -600,8 +581,5 @@ NS_ErrorAccordingToNSPR()
void
NS_ABORT_OOM(size_t aSize)
{
#if defined(MOZ_CRASHREPORTER)
CrashReporter::AnnotateOOMAllocationSize(aSize);
#endif
MOZ_CRASH("OOM");
}