make sure nsCryptoHash/PSM is initialized on the main thread in the url classifier. b=390324, r=tony

git-svn-id: svn://10.0.0.236/trunk@231759 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dcamp%mozilla.com 2007-08-09 22:33:04 +00:00
parent 4abaf2e122
commit e9f8911ed5

View File

@ -2083,6 +2083,11 @@ nsUrlClassifierDBService::Init()
do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
// Force PSM to be loaded on the main thread.
nsCOMPtr<nsICryptoHash> hash =
do_CreateInstance(NS_CRYPTO_HASH_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
// Start the background thread.
rv = NS_NewThread(&gDbBackgroundThread);
if (NS_FAILED(rv))