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