Added sanity check to insure that a valid JSRuntime was found before passing it to JS_NewContext. Bug 73491. r=mcafee,timeless. sr=alefc.

This commit is contained in:
bnesse%netscape.com 2001-05-17 22:17:03 +00:00
Родитель 0c67ee0fe1
Коммит 0c13062832
2 изменённых файлов: 8 добавлений и 0 удалений

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

@ -283,7 +283,11 @@ PRBool PREF_Init(const char *filename)
return PR_FALSE;
if (!gMochaTaskState)
{
gMochaTaskState = PREF_GetJSRuntime();
if (!gMochaTaskState)
return PR_FALSE;
}
if (!gMochaContext)
{

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

@ -283,7 +283,11 @@ PRBool PREF_Init(const char *filename)
return PR_FALSE;
if (!gMochaTaskState)
{
gMochaTaskState = PREF_GetJSRuntime();
if (!gMochaTaskState)
return PR_FALSE;
}
if (!gMochaContext)
{