Bug 1049275 - Don't use IPC for crash reporting after NS_ABORT (r=bsmedberg)

This commit is contained in:
Bill McCloskey 2014-09-12 11:44:38 -07:00
parent a399ede263
commit e66e5b55bb

View File

@ -15,6 +15,7 @@
# include "nsExceptionHandler.h" # include "nsExceptionHandler.h"
#endif #endif
#include "nsString.h" #include "nsString.h"
#include "nsXULAppAPI.h"
#include "prprf.h" #include "prprf.h"
#include "prlog.h" #include "prlog.h"
#include "nsError.h" #include "nsError.h"
@ -413,12 +414,17 @@ NS_DebugBreak(uint32_t aSeverity, const char* aStr, const char* aExpr,
case NS_DEBUG_ABORT: { case NS_DEBUG_ABORT: {
#if defined(MOZ_CRASHREPORTER) #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_GetProcessType() == GeckoProcessType_Default) {
nsCString note("xpcom_runtime_abort("); nsCString note("xpcom_runtime_abort(");
note += buf.buffer; note += buf.buffer;
note += ")"; note += ")";
CrashReporter::AppendAppNotesToCrashReport(note); CrashReporter::AppendAppNotesToCrashReport(note);
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AbortMessage"), CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AbortMessage"),
nsDependentCString(buf.buffer)); nsDependentCString(buf.buffer));
}
#endif // MOZ_CRASHREPORTER #endif // MOZ_CRASHREPORTER
#if defined(DEBUG) && defined(_WIN32) #if defined(DEBUG) && defined(_WIN32)