| Index: net/cert/multi_threaded_cert_verifier.cc
|
| diff --git a/net/cert/multi_threaded_cert_verifier.cc b/net/cert/multi_threaded_cert_verifier.cc
|
| index 714b291b2bb0ba10e7b815dea899243b0dbaf236..f900a1f89b56ae3f4e7f85ad12122d9efdb1230a 100644
|
| --- a/net/cert/multi_threaded_cert_verifier.cc
|
| +++ b/net/cert/multi_threaded_cert_verifier.cc
|
| @@ -29,7 +29,7 @@
|
| #include "net/cert/x509_certificate_net_log_param.h"
|
| #include "net/log/net_log.h"
|
|
|
| -#if defined(USE_NSS_CERTS) || defined(OS_IOS)
|
| +#if defined(USE_NSS_VERIFIER)
|
| #include <private/pprthred.h> // PR_DetachThread
|
| #endif
|
|
|
| @@ -237,15 +237,15 @@ void DoVerifyOnWorkerThread(const scoped_refptr<CertVerifyProc>& verify_proc,
|
| *error = verify_proc->Verify(cert.get(), hostname, ocsp_response, flags,
|
| crl_set.get(), additional_trust_anchors, result);
|
|
|
| -#if defined(USE_NSS_CERTS) || defined(OS_IOS)
|
| - // Detach the thread from NSPR.
|
| - // Calling NSS functions attaches the thread to NSPR, which stores
|
| - // the NSPR thread ID in thread-specific data.
|
| - // The threads in our thread pool terminate after we have called
|
| - // PR_Cleanup. Unless we detach them from NSPR, net_unittests gets
|
| - // segfaults on shutdown when the threads' thread-specific data
|
| - // destructors run.
|
| - PR_DetachThread();
|
| +#if defined(USE_NSS_VERIFIER)
|
| + // Detach the thread from NSPR.
|
| + // Calling NSS functions attaches the thread to NSPR, which stores
|
| + // the NSPR thread ID in thread-specific data.
|
| + // The threads in our thread pool terminate after we have called
|
| + // PR_Cleanup. Unless we detach them from NSPR, net_unittests gets
|
| + // segfaults on shutdown when the threads' thread-specific data
|
| + // destructors run.
|
| + PR_DetachThread();
|
| #endif
|
| }
|
|
|
| @@ -591,4 +591,3 @@ CertVerifierJob* MultiThreadedCertVerifier::FindJob(const RequestParams& key) {
|
| }
|
|
|
| } // namespace net
|
| -
|
|
|