mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
Issue #1467 - Part 1: Set up conditional NSS-SQL builds.
- Adds buildconfig option --enable-nss-sqlstore - Prefixes NSS dbinit with either sql: or dbm: depending on config - Pre-initializes mozStorage when NSS-SQL storage is used to prevent an sqlite3_config race in NSS Init
This commit is contained in:
parent
b6b9b0e3fa
commit
5efa1a9e43
3 changed files with 35 additions and 0 deletions
|
|
@ -12,6 +12,9 @@
|
|||
#include "SharedSSLState.h"
|
||||
#include "cert.h"
|
||||
#include "certdb.h"
|
||||
#ifdef NSS_SQLSTORE
|
||||
#include "mozStorageCID.h"
|
||||
#endif
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/Casting.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
|
@ -1970,6 +1973,14 @@ nsNSSComponent::Init()
|
|||
return NS_ERROR_NOT_SAME_THREAD;
|
||||
}
|
||||
|
||||
#ifdef NSS_SQLSTORE
|
||||
// To avoid an sqlite3_config race in NSS init, 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;
|
||||
}
|
||||
#endif
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("Beginning NSS initialization\n"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue