Patch NT startup crash when chrome registry is not ready yet. r,a=scc

This commit is contained in:
tao%netscape.com 2000-06-09 03:09:20 +00:00
Родитель 01697d8926
Коммит 282658530c
2 изменённых файлов: 10 добавлений и 0 удалений

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

@ -1296,6 +1296,11 @@ NS_IMETHODIMP nsChromeRegistry::SelectLocale(const PRUnichar* aLocale,
NS_IMETHODIMP nsChromeRegistry::GetSelectedLocale(const PRUnichar *aPackageName,
PRUnichar **_retval)
{
// check if mChromeDataSource is null; do we need to apply this to every instance?
// is there a better way to test if the data source is ready?
if (!mChromeDataSource) {
return NS_ERROR_FAILURE;
}
nsString packageStr(aPackageName);
nsCAutoString resourceStr("urn:mozilla:package:");

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

@ -1296,6 +1296,11 @@ NS_IMETHODIMP nsChromeRegistry::SelectLocale(const PRUnichar* aLocale,
NS_IMETHODIMP nsChromeRegistry::GetSelectedLocale(const PRUnichar *aPackageName,
PRUnichar **_retval)
{
// check if mChromeDataSource is null; do we need to apply this to every instance?
// is there a better way to test if the data source is ready?
if (!mChromeDataSource) {
return NS_ERROR_FAILURE;
}
nsString packageStr(aPackageName);
nsCAutoString resourceStr("urn:mozilla:package:");