bug 339929: force storage service to init on main thread

r+a=darin


git-svn-id: svn://10.0.0.236/trunk@198814 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tony%ponderer.org
2006-06-01 18:18:54 +00:00
parent 0bf2ec7ef9
commit d2f5a39474

View File

@@ -476,8 +476,15 @@ nsUrlClassifierDBService::Init()
if (!gUrlClassifierDbServiceLog)
gUrlClassifierDbServiceLog = PR_NewLogModule("UrlClassifierDbService");
#endif
// Force the storage service to be created on the main thread.
nsresult rv;
nsCOMPtr<mozIStorageService> storageService =
do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
// Start the background thread.
nsresult rv = NS_NewThread(&gDbBackgroundThread);
rv = NS_NewThread(&gDbBackgroundThread);
if (NS_FAILED(rv))
return rv;