NS_WARN_IF_FALSE now by default puts the windows messagebox up on a tripped warning condition. Before it relied on the developer having an environment variable set. r=pink a=sdagley

This commit is contained in:
tbogard%aol.net 1999-11-10 04:32:33 +00:00
Родитель ace870622c
Коммит 60c2846eae
2 изменённых файлов: 8 добавлений и 8 удалений

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

@ -98,7 +98,7 @@
* always compiled in, in case some other module that uses it is
* compiled with debugging even if this library is not.
*/
static PRBool gWarningMessageBoxEnable;
static PRBool gWarningMessageBoxEnable = PR_TRUE;
static PRLogModuleInfo* gDebugLog;
static void InitLog(void)
@ -108,8 +108,8 @@ static void InitLog(void)
gDebugLog->level = PR_LOG_DEBUG;
#if defined(XP_UNIX) || defined(_WIN32)
if (getenv("MOZ_WARNING_MESSAGE_BOX")) {
gWarningMessageBoxEnable = PR_TRUE;
if (getenv("MOZ_WARNING_NO_MESSAGE_BOX")) {
gWarningMessageBoxEnable = PR_FALSE;
}
#endif
}
@ -166,7 +166,7 @@ NS_COM PRBool nsDebug::WarnIfFalse(const char* aStr, const char* aExpr,
char buf[1000];
PR_snprintf(buf, sizeof(buf),
"Warning: %s: '%s', file %s, line %d",
"WARNING: %s: '%s', file %s, line %d",
aStr, aExpr, aFile, aLine);
#if defined(_WIN32)

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

@ -98,7 +98,7 @@
* always compiled in, in case some other module that uses it is
* compiled with debugging even if this library is not.
*/
static PRBool gWarningMessageBoxEnable;
static PRBool gWarningMessageBoxEnable = PR_TRUE;
static PRLogModuleInfo* gDebugLog;
static void InitLog(void)
@ -108,8 +108,8 @@ static void InitLog(void)
gDebugLog->level = PR_LOG_DEBUG;
#if defined(XP_UNIX) || defined(_WIN32)
if (getenv("MOZ_WARNING_MESSAGE_BOX")) {
gWarningMessageBoxEnable = PR_TRUE;
if (getenv("MOZ_WARNING_NO_MESSAGE_BOX")) {
gWarningMessageBoxEnable = PR_FALSE;
}
#endif
}
@ -166,7 +166,7 @@ NS_COM PRBool nsDebug::WarnIfFalse(const char* aStr, const char* aExpr,
char buf[1000];
PR_snprintf(buf, sizeof(buf),
"Warning: %s: '%s', file %s, line %d",
"WARNING: %s: '%s', file %s, line %d",
aStr, aExpr, aFile, aLine);
#if defined(_WIN32)