Bug 304237 Enable xpcom under windows debuggers to filter assertions the way it does without a debugger

to enable this feature,
 set XPCOM_DEBUG_DLG=1, or if you're already in the debugger, just poke the
 static to 2.
r=dougt
This commit is contained in:
timeless%mozdev.org 2005-08-12 23:11:35 +00:00
Родитель 9560fb68fc
Коммит aa089c5d09
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -174,8 +174,14 @@ nsDebugImpl::Assertion(const char *aStr, const char *aExpr, const char *aFile, P
char* assertBehavior = getenv("XPCOM_DEBUG_BREAK");
if (assertBehavior && strcmp(assertBehavior, "warn") == 0)
return NS_OK;
#ifndef WINCE // we really just want to crash for now
if(!InDebugger())
static int ignoreDebugger;
if (!ignoreDebugger) {
const char *shouldIgnoreDebugger = getenv("XPCOM_DEBUG_DLG");
ignoreDebugger = 1 + !(shouldIgnoreDebugger && strcmp(shouldIgnoreDebugger, "1"));
}
if((ignoreDebugger == 2) || !InDebugger())
{
DWORD code = IDRETRY;