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

Unified Diff: net/third_party/nss/ssl/sslsock.c

Issue 10539144: Always initialize session cache locks lazily. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove unrelated cleanup Created 8 years, 6 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/third_party/nss/ssl/sslsnce.c ('K') | « net/third_party/nss/ssl/sslsnce.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/third_party/nss/ssl/sslsock.c
===================================================================
--- net/third_party/nss/ssl/sslsock.c (revision 142005)
+++ net/third_party/nss/ssl/sslsock.c (working copy)
@@ -1397,6 +1397,18 @@
return NULL;
}
+ /*
+ * The session cache locks (cacheLock in sslnonce.c and symWrapKeysLock
+ * in ssl3con.c) are always used when there is an sslSocket 'ss',
+ * except for SSL_ClearSessionCache and SSL3_ShutdownServerCache. So
+ * we can lazily initialize the session cache locks right before we
+ * create an sslSocket.
+ */
Ryan Sleevi 2012/06/14 01:23:34 See my other comment - I don't think this is corre
+ status = ssl_InitSessionCacheLocks();
+ if (status != SECSuccess) {
+ return NULL;
+ }
+
if (model == NULL) {
/* Just create a default socket if we're given NULL for the model */
ns = ssl_NewSocket((PRBool)(!ssl_defaults.noLocks), variant);
« net/third_party/nss/ssl/sslsnce.c ('K') | « net/third_party/nss/ssl/sslsnce.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698