Fix for 57733.

This commit is contained in:
hyatt%netscape.com 2000-10-25 03:03:08 +00:00
parent c1aa1c70d5
commit 7662270ea6
2 changed files with 6 additions and 10 deletions

View File

@ -657,7 +657,7 @@ nsChromeRegistry::FindProvider(const nsCString& aPackage,
rv = SelectPackageInProvider(packageList, aPackage, aProvider, providerName,
aArc, aSelectedProvider);
if (NS_FAILED(rv)) return rv;
if (aSelectedProvider)
if (*aSelectedProvider)
return NS_OK;
}
}
@ -718,16 +718,14 @@ nsChromeRegistry::SelectPackageInProvider(nsIRDFResource *aPackageList,
rv = nsChromeRegistry::FollowArc(mChromeDataSource, packageName, package, mName);
if (NS_FAILED(rv)) continue; // don't fail if package has not yet been installed
// select provider assuming it comes from the install directory.
// XXX we really should be keeping track of whether it's from there,
// or from the profile
if (packageName.Equals(aPackage)) {
nsAutoString providerNameUC;
nsAutoString packageNameUC;
providerNameUC.AssignWithConversion(aProviderName);
packageNameUC.AssignWithConversion(packageName);
PRBool useProfile = !mProfileRoot.IsEmpty();
rv = SelectProviderForPackage(aProvider, providerNameUC.GetUnicode(),
packageNameUC.GetUnicode(), aArc, PR_FALSE, PR_TRUE);
packageNameUC.GetUnicode(), aArc, useProfile, PR_TRUE);
if (NS_FAILED(rv)) return rv;
*aSelectedProvider = kid;
NS_ADDREF(*aSelectedProvider);

View File

@ -657,7 +657,7 @@ nsChromeRegistry::FindProvider(const nsCString& aPackage,
rv = SelectPackageInProvider(packageList, aPackage, aProvider, providerName,
aArc, aSelectedProvider);
if (NS_FAILED(rv)) return rv;
if (aSelectedProvider)
if (*aSelectedProvider)
return NS_OK;
}
}
@ -718,16 +718,14 @@ nsChromeRegistry::SelectPackageInProvider(nsIRDFResource *aPackageList,
rv = nsChromeRegistry::FollowArc(mChromeDataSource, packageName, package, mName);
if (NS_FAILED(rv)) continue; // don't fail if package has not yet been installed
// select provider assuming it comes from the install directory.
// XXX we really should be keeping track of whether it's from there,
// or from the profile
if (packageName.Equals(aPackage)) {
nsAutoString providerNameUC;
nsAutoString packageNameUC;
providerNameUC.AssignWithConversion(aProviderName);
packageNameUC.AssignWithConversion(packageName);
PRBool useProfile = !mProfileRoot.IsEmpty();
rv = SelectProviderForPackage(aProvider, providerNameUC.GetUnicode(),
packageNameUC.GetUnicode(), aArc, PR_FALSE, PR_TRUE);
packageNameUC.GetUnicode(), aArc, useProfile, PR_TRUE);
if (NS_FAILED(rv)) return rv;
*aSelectedProvider = kid;
NS_ADDREF(*aSelectedProvider);