Commit 10682844 authored by rsleevi's avatar rsleevi Committed by Commit bot

Make the OCSP Init Singleton Lazy

As the OCSP Init code (for NSS) is a non-leaky Singleton, but
the other NSS code is, we end up calling into it during shutdown
while other requests may still be pending. Since the code is,
unfortunately, not exactly the most thread safe, the right answer
is to just not attempt to cleanup on shutdown, same as all the
other NSS code.

BUG=572727

Review URL: https://codereview.chromium.org/1550853002

Cr-Commit-Position: refs/heads/master@{#367024}
parent aca8ba5b
...@@ -171,7 +171,7 @@ class OCSPNSSInitialization { ...@@ -171,7 +171,7 @@ class OCSPNSSInitialization {
DISALLOW_COPY_AND_ASSIGN(OCSPNSSInitialization); DISALLOW_COPY_AND_ASSIGN(OCSPNSSInitialization);
}; };
base::LazyInstance<OCSPNSSInitialization> g_ocsp_nss_initialization = base::LazyInstance<OCSPNSSInitialization>::Leaky g_ocsp_nss_initialization =
LAZY_INSTANCE_INITIALIZER; LAZY_INSTANCE_INITIALIZER;
// Concrete class for SEC_HTTP_REQUEST_SESSION. // Concrete class for SEC_HTTP_REQUEST_SESSION.
...@@ -594,10 +594,6 @@ OCSPNSSInitialization::OCSPNSSInitialization() { ...@@ -594,10 +594,6 @@ OCSPNSSInitialization::OCSPNSSInitialization() {
} }
OCSPNSSInitialization::~OCSPNSSInitialization() { OCSPNSSInitialization::~OCSPNSSInitialization() {
SECStatus status = CERT_RegisterAlternateOCSPAIAInfoCallBack(NULL, NULL);
if (status != SECSuccess) {
LOG(ERROR) << "Error unregistering OCSP: " << PR_GetError();
}
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment