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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user