summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 23:40:24 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 23:40:24 +0000
commit92d9cade98d356a2f12be8c633f8de1e750b876b (patch)
treee8a846deabbef8bcd7b2cded5f79500d62a27b2e /net/http
parent6a3d3e6c7511c586128b11901310b0475b2b982a (diff)
downloadchromium_src-92d9cade98d356a2f12be8c633f8de1e750b876b.zip
chromium_src-92d9cade98d356a2f12be8c633f8de1e750b876b.tar.gz
chromium_src-92d9cade98d356a2f12be8c633f8de1e750b876b.tar.bz2
Fix a crash in net::SSLClientSocketWin::OnIOComplete(int) when
an HttpNetworkTransaction is destroyed while its SSLClientSocket is verifying a certificate. Document that ClientSocket::Disconnect aborts any pending IO and prevents completion callback from running, like a cancel method. Change the verifier_ member of SSLClientSocket to a scoped_ptr so that we can destroy the CertVerifier object in the Disconnect method. (CertVerifier doesn't have a cancel method, so we cancel pending certificate verification by destroying the CertVerifier object.) R=willchan BUG=http://crbug.com/13981 TEST=none. I can only reproduce this crash by modifying the source code to create that condition. Review URL: http://codereview.chromium.org/147159 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19307 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_network_transaction.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index a343151..8d2821b 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -399,8 +399,8 @@ uint64 HttpNetworkTransaction::GetUploadProgress() const {
}
HttpNetworkTransaction::~HttpNetworkTransaction() {
- // If we still have an open socket, then make sure to disconnect it so we
- // don't try to reuse it later on.
+ // If we still have an open socket, then make sure to disconnect it so it
+ // won't call us back and we don't try to reuse it later on.
if (connection_.is_initialized())
connection_.socket()->Disconnect();