Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2075)

Unified Diff: net/cert/multi_threaded_cert_verifier.cc

Issue 1808963004: Adding macro to enable changing SSL library (Part 1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove remoting_nacl change. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/ev_root_ca_metadata.cc ('k') | net/cert/test_root_certs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
-
« no previous file with comments | « net/cert/ev_root_ca_metadata.cc ('k') | net/cert/test_root_certs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698