diff --git a/toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp b/toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp index fa408505b01..ff189cfd400 100644 --- a/toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp +++ b/toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp @@ -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 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))