dougt%netscape.com 2000-07-06 02:05:51 +00:00
Родитель 0beb9ebea4
Коммит c5f75a46b4
1 изменённых файлов: 23 добавлений и 8 удалений

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

@ -1451,6 +1451,8 @@ extern "C" JSBool pref_InitInitialObjects()
{ {
JSBool funcResult; JSBool funcResult;
nsresult rv; nsresult rv;
PRBool exists;
NS_WITH_SERVICE(nsIFileLocator, locator, kFileLocatorCID, &rv); NS_WITH_SERVICE(nsIFileLocator, locator, kFileLocatorCID, &rv);
if (NS_FAILED(rv)) if (NS_FAILED(rv))
return JS_TRUE; return JS_TRUE;
@ -1500,14 +1502,23 @@ extern "C" JSBool pref_InitInitialObjects()
goto done; goto done;
} }
worked = (JSBool)(pref_OpenFileSpec( if (NS_FAILED(specialChild->Exists(&exists)))
specialChild, {
PR_FALSE, funcResult = JS_FALSE;
PR_FALSE, goto done;
PR_FALSE, }
PR_FALSE) == PREF_NOERROR);
NS_ASSERTION(worked, "initpref.js not parsed successfully"); if (exists)
// Keep this child {
worked = (JSBool)(pref_OpenFileSpec(
specialChild,
PR_FALSE,
PR_FALSE,
PR_FALSE,
PR_FALSE) == PREF_NOERROR);
NS_ASSERTION(worked, "initpref.js not parsed successfully");
}
// Keep this child
#ifdef DEBUG_prefs #ifdef DEBUG_prefs
printf("Parsing default JS files.\n"); printf("Parsing default JS files.\n");
@ -1604,10 +1615,14 @@ extern "C" JSBool pref_InitInitialObjects()
if (NS_FAILED(specialChild2->AppendRelativeUnixPath((char*)specialFiles[k]))) if (NS_FAILED(specialChild2->AppendRelativeUnixPath((char*)specialFiles[k])))
continue; continue;
#ifdef DEBUG_prefs #ifdef DEBUG_prefs
printf("Parsing %s\n", specialFiles[k]); printf("Parsing %s\n", specialFiles[k]);
#endif /* DEBUG_prefs */ #endif /* DEBUG_prefs */
if (NS_FAILED(specialChild2->Exists(&exists)))
continue;
worked = (JSBool)(pref_OpenFileSpec( worked = (JSBool)(pref_OpenFileSpec(
specialChild2, specialChild2,
PR_FALSE, PR_FALSE,