Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Unified Diff: net/http/http_stream_parser.cc

Issue 3107036: Fix a crash where we are checking IsConnected(). If you look into the ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: nits, extra EXPECTS() in test cases added Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_proxy_client_socket.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_parser.cc
===================================================================
--- net/http/http_stream_parser.cc (revision 57023)
+++ net/http/http_stream_parser.cc (working copy)
@@ -579,7 +579,8 @@
void HttpStreamParser::GetSSLInfo(SSLInfo* ssl_info) {
if (request_->url.SchemeIs("https")) {
- CHECK(connection_->socket()->IsConnected());
+ if (!connection_->socket() || !connection_->socket()->IsConnected())
eroman 2010/08/25 05:26:47 we weren't previously checking to see if socket is
Mike Belshe 2010/08/25 06:22:32 It's not really valid. I was just making it the s
+ return;
SSLClientSocket* ssl_socket =
static_cast<SSLClientSocket*>(connection_->socket());
ssl_socket->GetSSLInfo(ssl_info);
@@ -591,7 +592,6 @@
if (request_->url.SchemeIs("https")) {
if (!connection_->socket() || !connection_->socket()->IsConnected())
return;
- CHECK(connection_->socket()->IsConnected());
SSLClientSocket* ssl_socket =
static_cast<SSLClientSocket*>(connection_->socket());
ssl_socket->GetSSLCertRequestInfo(cert_request_info);
« no previous file with comments | « net/http/http_proxy_client_socket.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698