bug 534922: quick and dirty hack to make NS_RUNTIMEABORT trigger the crashreporter on windows. r=bsmedberg

This commit is contained in:
Chris Jones 2009-12-15 15:40:30 -06:00
parent 1df0a1390e
commit d00615ff66

View File

@ -361,10 +361,19 @@ NS_DebugBreak(PRUint32 aSeverity, const char *aStr, const char *aExpr,
}
}
static void
TouchBadMemory()
{
// XXX this should use the frame poisoning code
gAssertionCount += *((PRInt32 *) 0); // TODO annotation saying we know
// this is crazy
}
static void
Abort(const char *aMsg)
{
#if defined(_WIN32)
TouchBadMemory();
#ifndef WINCE
//This should exit us
@ -386,9 +395,7 @@ Abort(const char *aMsg)
#endif
// Still haven't aborted? Try dereferencing null.
// (Written this way to lessen the likelihood of it being optimized away.)
gAssertionCount += *((PRInt32 *) 0); // TODO annotation saying we know
// this is crazy
TouchBadMemory();
// Still haven't aborted? Try _exit().
PR_ProcessExit(127);