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