Skip to content

Commit

Permalink
Bug 628885: Note in minidumps when we generate them by RUNTIMEABORT()…
Browse files Browse the repository at this point in the history
…ing. r=ted a=a

--HG--
extra : rebase_source : f5f0783b0bbf594cb7fd3a761bb3354b6859ecdd
  • Loading branch information
joneschrisg committed Feb 1, 2011
1 parent 7c4911f commit 7b32eff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions toolkit/crashreporter/test/unit/test_crash_runtimeabort.js
Expand Up @@ -12,6 +12,7 @@ function run_test()
},
function(mdump, extra) {
do_check_eq(extra.TestKey, "TestValue");
do_check_true(/xpcom_runtime_abort/.test(extra.Notes));
},
// process will exit with a zero exit status
true);
Expand Down
14 changes: 13 additions & 1 deletion xpcom/base/nsDebugImpl.cpp
Expand Up @@ -40,6 +40,10 @@

#include "nsDebugImpl.h"
#include "nsDebug.h"
#ifdef MOZ_CRASHREPORTER
# include "nsExceptionHandler.h"
#endif
#include "nsStringGlue.h"
#include "prprf.h"
#include "prlog.h"
#include "prinit.h"
Expand Down Expand Up @@ -329,14 +333,22 @@ NS_DebugBreak(PRUint32 aSeverity, const char *aStr, const char *aExpr,
Break(buf.buffer);
return;

case NS_DEBUG_ABORT:
case NS_DEBUG_ABORT: {
#ifdef MOZ_CRASHREPORTER
nsCString note("xpcom_runtime_abort(");
note += buf.buffer;
note += ")";
CrashReporter::AppendAppNotesToCrashReport(note);
#endif // MOZ_CRASHREPORTER

#if defined(DEBUG) && defined(_WIN32)
RealBreak();
#endif
nsTraceRefcntImpl::WalkTheStack(stderr);
Abort(buf.buffer);
return;
}
}

// Now we deal with assertions
PR_AtomicIncrement(&gAssertionCount);
Expand Down

0 comments on commit 7b32eff

Please sign in to comment.