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

Unified Diff: net/base/x509_certificate_mac.cc

Issue 1769010: [Mac] Add locking as speculative fix for X509Certificate crashes. (Closed)
Patch Set: Created 10 years, 8 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
« net/base/x509_certificate.h ('K') | « net/base/x509_certificate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_certificate_mac.cc
diff --git a/net/base/x509_certificate_mac.cc b/net/base/x509_certificate_mac.cc
index a4c37baab0076212828eee03fac29687114d7ba8..e55648bce83b5a548f41805d683d47c8938e8b6d 100644
--- a/net/base/x509_certificate_mac.cc
+++ b/net/base/x509_certificate_mac.cc
@@ -447,6 +447,9 @@ int X509Certificate::Verify(const std::string& hostname, int flags,
for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i)
CFArrayAppendValue(cert_array, intermediate_ca_certs_[i]);
+ // From here on, only one thread can be active at a time.
wtc 2010/04/27 00:06:43 It would be nice to explain why you break the Veri
+ AutoLock lock(lock_);
+
SecTrustRef trust_ref = NULL;
status = SecTrustCreateWithCertificates(cert_array, ssl_policy, &trust_ref);
if (status)
« net/base/x509_certificate.h ('K') | « net/base/x509_certificate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698