summaryrefslogtreecommitdiffstats
path: root/base/nss_util.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-27 00:05:47 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-27 00:05:47 +0000
commita8e4b5a8779bed7cb5afcfb7d28cf75486a0b110 (patch)
treee612561599b102cccd1bc6a7165c3ff7d192f0c8 /base/nss_util.cc
parentc9310561dcb25c863beaf7b76e8da89bd14fd757 (diff)
downloadchromium_src-a8e4b5a8779bed7cb5afcfb7d28cf75486a0b110.zip
chromium_src-a8e4b5a8779bed7cb5afcfb7d28cf75486a0b110.tar.gz
chromium_src-a8e4b5a8779bed7cb5afcfb7d28cf75486a0b110.tar.bz2
ThreadRestrictions: disallow blocking IO on the UI thread
This patch sets the "disallow IO" flag after the UI thread has started, and then whitelists in the many places where we're accidentally doing IO from the UI thread. (I've filed bugs on all of those cases.) BUG=59847,60630,60641,60211,60634,60643,24163,60825 Review URL: http://codereview.chromium.org/4146004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63986 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/nss_util.cc')
-rw-r--r--base/nss_util.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/base/nss_util.cc b/base/nss_util.cc
index 5c7cafd..95b0082 100644
--- a/base/nss_util.cc
+++ b/base/nss_util.cc
@@ -22,6 +22,7 @@
#include "base/logging.h"
#include "base/singleton.h"
#include "base/stringprintf.h"
+#include "base/thread_restrictions.h"
// USE_NSS means we use NSS for everything crypto-related. If USE_NSS is not
// defined, such as on Mac and Windows, we use NSS for SSL only -- we don't
@@ -310,6 +311,10 @@ void EnsureNSPRInit() {
}
void EnsureNSSInit() {
+ // 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<NSSInitSingleton>::get();
}