зеркало из https://github.com/mozilla/gecko-dev.git
Add a stack-and-abort value of XPCOM_DEBUG_BREAK
This commit is contained in:
Родитель
f698a4093c
Коммит
cd296d3363
|
@ -182,7 +182,8 @@ enum nsAssertBehavior {
|
|||
NS_ASSERT_SUSPEND,
|
||||
NS_ASSERT_STACK,
|
||||
NS_ASSERT_TRAP,
|
||||
NS_ASSERT_ABORT
|
||||
NS_ASSERT_ABORT,
|
||||
NS_ASSERT_STACK_AND_ABORT
|
||||
};
|
||||
|
||||
static nsAssertBehavior GetAssertBehavior()
|
||||
|
@ -216,6 +217,9 @@ static nsAssertBehavior GetAssertBehavior()
|
|||
if (!strcmp(assertString, "trap") || !strcmp(assertString, "break"))
|
||||
return gAssertBehavior = NS_ASSERT_TRAP;
|
||||
|
||||
if (!strcmp(assertString, "stack-and-abort"))
|
||||
return gAssertBehavior = NS_ASSERT_STACK_AND_ABORT;
|
||||
|
||||
fprintf(stderr, "Unrecognized value of XPCOM_DEBUG_BREAK\n");
|
||||
return gAssertBehavior;
|
||||
}
|
||||
|
@ -342,6 +346,10 @@ NS_DebugBreak(PRUint32 aSeverity, const char *aStr, const char *aExpr,
|
|||
nsTraceRefcntImpl::WalkTheStack(stderr);
|
||||
return;
|
||||
|
||||
case NS_ASSERT_STACK_AND_ABORT:
|
||||
nsTraceRefcntImpl::WalkTheStack(stderr);
|
||||
// Fall through to abort
|
||||
|
||||
case NS_ASSERT_ABORT:
|
||||
Abort(buf.buffer);
|
||||
return;
|
||||
|
|
Загрузка…
Ссылка в новой задаче