Bug 1380706, PSM should depend on mozStorage, as a workaround for a sqlite3_config race, r=keeler

This commit is contained in:
Kai Engert 2017-07-14 15:31:30 +02:00
parent ef1cebc1b4
commit 10b5520799

View File

@ -13,6 +13,7 @@
#include "SharedSSLState.h"
#include "cert.h"
#include "certdb.h"
#include "mozStorageCID.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/Assertions.h"
#include "mozilla/Casting.h"
@ -2032,6 +2033,14 @@ nsNSSComponent::Init()
return NS_ERROR_NOT_AVAILABLE;
}
// To avoid a sqlite3_config race in NSS init, as a workaround for
// bug 730495, we require the storage service to get initialized first.
nsCOMPtr<nsISupports> storageService =
do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID);
if (!storageService) {
return NS_ERROR_NOT_AVAILABLE;
}
MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("Beginning NSS initialization\n"));
nsresult rv = InitializePIPNSSBundle();