diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-19 20:32:47 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-19 20:32:47 +0000 |
commit | 8fa0c6d88d5d1745f41ab0edc6799c027e2f68a2 (patch) | |
tree | 6989b6f4030a4ed6138f2b59453d4c653916c799 /net/ocsp | |
parent | 3f0d936cc3b7ad45cd5941c07057b412ec605bac (diff) | |
download | chromium_src-8fa0c6d88d5d1745f41ab0edc6799c027e2f68a2.zip chromium_src-8fa0c6d88d5d1745f41ab0edc6799c027e2f68a2.tar.gz chromium_src-8fa0c6d88d5d1745f41ab0edc6799c027e2f68a2.tar.bz2 |
Revert "Revert "Revert "net: add OCSP tests."""
This reverts commit r127518.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127520 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/ocsp')
-rw-r--r-- | net/ocsp/nss_ocsp.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/ocsp/nss_ocsp.cc b/net/ocsp/nss_ocsp.cc index 80f9db0..07cd019 100644 --- a/net/ocsp/nss_ocsp.cc +++ b/net/ocsp/nss_ocsp.cc @@ -49,8 +49,6 @@ class OCSPIOLoop { void StartUsing() { base::AutoLock autolock(lock_); used_ = true; - io_loop_ = MessageLoopForIO::current(); - DCHECK(io_loop_); } // Called on IO loop. @@ -458,7 +456,8 @@ class OCSPServerSession { OCSPIOLoop::OCSPIOLoop() : shutdown_(false), used_(false), - io_loop_(NULL) { + io_loop_(MessageLoopForIO::current()) { + DCHECK(io_loop_); } OCSPIOLoop::~OCSPIOLoop() { @@ -513,6 +512,13 @@ void OCSPIOLoop::AddRequest(OCSPRequestSession* request) { } void OCSPIOLoop::RemoveRequest(OCSPRequestSession* request) { + { + // Ignore if we've already shutdown. + base::AutoLock auto_lock(lock_); + if (shutdown_) + return; + } + DCHECK(ContainsKey(requests_, request)); requests_.erase(request); } |