summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-03 18:55:46 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-03 18:55:46 +0000
commitc115da380cebdcd5a9d5e4b96fe6ab43776867f2 (patch)
treedab5463b2917053f79129de7f2d6c1c297d189b9 /net
parent12f198b6b27851b9b74784ff7065af0db01c6c7e (diff)
downloadchromium_src-c115da380cebdcd5a9d5e4b96fe6ab43776867f2.zip
chromium_src-c115da380cebdcd5a9d5e4b96fe6ab43776867f2.tar.gz
chromium_src-c115da380cebdcd5a9d5e4b96fe6ab43776867f2.tar.bz2
Do not set io_loop_ to NULL until we have deleted request_ and set
request_ to NULL, otherwise Cancel() may fail to post a CancelURLRequest task because io_loop_ is NULL but request_ is not NULL. (That task adds a reference to the OCSPRequestSession object to ensure that it lives longer than the URLRequest object.) R=ukai BUG=28526 TEST=none Review URL: http://codereview.chromium.org/460040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33698 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/ocsp/nss_ocsp.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/ocsp/nss_ocsp.cc b/net/ocsp/nss_ocsp.cc
index a82f141..e48edc10 100644
--- a/net/ocsp/nss_ocsp.cc
+++ b/net/ocsp/nss_ocsp.cc
@@ -216,16 +216,15 @@ class OCSPRequestSession
} while (request_->Read(buffer_, kRecvBufferSize, &bytes_read));
if (!request_->status().is_io_pending()) {
- MessageLoop* io_loop = io_loop_;
+ delete request_;
+ request_ = NULL;
+ io_loop_->RemoveDestructionObserver(this);
{
AutoLock autolock(lock_);
finished_ = true;
io_loop_ = NULL;
}
cv_.Signal();
- delete request_;
- request_ = NULL;
- io_loop->RemoveDestructionObserver(this);
}
}