зеркало из https://github.com/mozilla/gecko-dev.git
Bug 969165 - Convert Atomic<T> where T != bool but is used as a bool over to Atomic<bool>, now that it's supported, in security/manager/. r=bsmith
--HG-- extra : rebase_source : 3632af6471e41d099a0948542d26a7df527efaad
This commit is contained in:
Родитель
bb4b656c3b
Коммит
4e3e68dab2
|
@ -27,8 +27,8 @@ using mozilla::unused;
|
|||
|
||||
namespace {
|
||||
|
||||
static Atomic<int32_t> sCertOverrideSvcExists(0);
|
||||
static Atomic<int32_t> sCertDBExists(0);
|
||||
static Atomic<bool> sCertOverrideSvcExists(false);
|
||||
static Atomic<bool> sCertDBExists(false);
|
||||
|
||||
class MainThreadClearer : public SyncRunnableBase
|
||||
{
|
||||
|
@ -40,9 +40,9 @@ public:
|
|||
// is in progress. We want to avoid this, since they do not handle the situation well,
|
||||
// hence the flags to avoid instantiating the services if they don't already exist.
|
||||
|
||||
bool certOverrideSvcExists = (bool)sCertOverrideSvcExists.exchange(0);
|
||||
bool certOverrideSvcExists = sCertOverrideSvcExists.exchange(false);
|
||||
if (certOverrideSvcExists) {
|
||||
sCertOverrideSvcExists = 1;
|
||||
sCertOverrideSvcExists = true;
|
||||
nsCOMPtr<nsICertOverrideService> icos = do_GetService(NS_CERTOVERRIDE_CONTRACTID);
|
||||
if (icos) {
|
||||
icos->ClearValidityOverride(
|
||||
|
@ -51,9 +51,9 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool certDBExists = (bool)sCertDBExists.exchange(0);
|
||||
bool certDBExists = sCertDBExists.exchange(false);
|
||||
if (certDBExists) {
|
||||
sCertDBExists = 1;
|
||||
sCertDBExists = true;
|
||||
nsCOMPtr<nsIX509CertDB> certdb = do_GetService(NS_X509CERTDB_CONTRACTID);
|
||||
if (certdb) {
|
||||
nsCOMPtr<nsIRecentBadCerts> badCerts;
|
||||
|
@ -206,13 +206,13 @@ SharedSSLState::GlobalCleanup()
|
|||
/*static*/ void
|
||||
SharedSSLState::NoteCertOverrideServiceInstantiated()
|
||||
{
|
||||
sCertOverrideSvcExists = 1;
|
||||
sCertOverrideSvcExists = true;
|
||||
}
|
||||
|
||||
/*static*/ void
|
||||
SharedSSLState::NoteCertDBServiceInstantiated()
|
||||
{
|
||||
sCertDBExists = 1;
|
||||
sCertDBExists = true;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче