summaryrefslogtreecommitdiffstats
path: root/net/socket/ssl_client_socket_nss.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-22 22:41:51 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-22 22:41:51 +0000
commit88328f582694565b00ea445c4541f37fa73f3539 (patch)
tree49f8d1db6ef50042e88e8fbde68bddc3663b6565 /net/socket/ssl_client_socket_nss.cc
parent2c40ca906d025d38855eac463c17cb8e9b7b412e (diff)
downloadchromium_src-88328f582694565b00ea445c4541f37fa73f3539.zip
chromium_src-88328f582694565b00ea445c4541f37fa73f3539.tar.gz
chromium_src-88328f582694565b00ea445c4541f37fa73f3539.tar.bz2
Thread IO safety: annotate file_util, and block IO thread from doing IO
- Mark functions in file_util_posix as requiring permission to perform disk actions. - Mark the IO thread as disallowed from performing disk actions. - Temporarily work around the protections in places where we currently have bugs. BUG=59847,59849,60207,60211 TEST=no dchecks in debug builds Review URL: http://codereview.chromium.org/3872002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/ssl_client_socket_nss.cc')
-rw-r--r--net/socket/ssl_client_socket_nss.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index 136f138..324f50c 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -71,6 +71,7 @@
#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
+#include "base/thread_restrictions.h"
#include "base/values.h"
#include "net/base/address_list.h"
#include "net/base/cert_status_flags.h"
@@ -176,6 +177,11 @@ class NSSSSLInitSingleton {
// thread-safe, and the NSS SSL library will only ever be initialized once.
// The NSS SSL library will be properly shut down on program exit.
void EnsureNSSSSLInit() {
+ // Initializing SSL causes us to do blocking IO.
+ // Temporarily allow it until we fix
+ // http://code.google.com/p/chromium/issues/detail?id=59847
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+
Singleton<NSSSSLInitSingleton>::get();
}