Make XPCOM_CHECK_THREADSAFE env. variable to actually be useful

This commit is contained in:
ruslan%netscape.com 2000-07-05 22:58:28 +00:00
Родитель 9e3c57923a
Коммит e8005c2d01
2 изменённых файлов: 10 добавлений и 2 удалений

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

@ -426,7 +426,11 @@ NS_CheckThreadSafe(void* owningThread, const char* msg)
{
static int check = -1;
if (check == -1) {
check = gCheckThreadSafeDefault || getenv("XPCOM_CHECK_THREADSAFE") != 0;
const char *eVar = getenv("XPCOM_CHECK_THREADSAFE");
if (eVar && *eVar == '0')
check = 0;
else
check = gCheckThreadSafeDefault || eVar != 0;
}
if (check) {
NS_ASSERTION(owningThread == NS_CurrentThread(), msg);

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

@ -426,7 +426,11 @@ NS_CheckThreadSafe(void* owningThread, const char* msg)
{
static int check = -1;
if (check == -1) {
check = gCheckThreadSafeDefault || getenv("XPCOM_CHECK_THREADSAFE") != 0;
const char *eVar = getenv("XPCOM_CHECK_THREADSAFE");
if (eVar && *eVar == '0')
check = 0;
else
check = gCheckThreadSafeDefault || eVar != 0;
}
if (check) {
NS_ASSERTION(owningThread == NS_CurrentThread(), msg);