зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
9560fb68fc
Коммит
aa089c5d09
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче