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

Unified Diff: net/socket/ssl_client_socket_nss.cc

Issue 1545034: Do not call NSS functions if NSS initialization failed.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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
« no previous file with comments | « net/base/x509_certificate_nss.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_nss.cc
===================================================================
--- net/socket/ssl_client_socket_nss.cc (revision 44427)
+++ net/socket/ssl_client_socket_nss.cc (working copy)
@@ -259,6 +259,8 @@
// Initialize the NSS SSL library in a threadsafe way. This also
// initializes the NSS base library.
EnsureNSSSSLInit();
+ if (!NSS_IsInitialized())
+ return ERR_UNEXPECTED;
#if !defined(OS_WIN)
// We must call EnsureOCSPInit() here, on the IO thread, to get the IO loop
// by MessageLoopForIO::current().
@@ -283,11 +285,13 @@
net_log.BeginEvent(NetLog::TYPE_SSL_CONNECT);
- if (Init() != OK) {
- NOTREACHED() << "Couldn't initialize nss";
+ int rv = Init();
+ if (rv != OK) {
+ net_log.EndEvent(NetLog::TYPE_SSL_CONNECT);
+ return rv;
}
- int rv = InitializeSSLOptions();
+ rv = InitializeSSLOptions();
if (rv != OK) {
net_log.EndEvent(NetLog::TYPE_SSL_CONNECT);
return rv;
« no previous file with comments | « net/base/x509_certificate_nss.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698