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

Unified Diff: net/spdy/spdy_session_pool.cc

Issue 2862027: Fix crash in GetSpdySessionFromSSLSocket in the case where the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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/spdy/spdy_session_pool.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_pool.cc
===================================================================
--- net/spdy/spdy_session_pool.cc (revision 50644)
+++ net/spdy/spdy_session_pool.cc (working copy)
@@ -51,20 +51,22 @@
return spdy_session;
}
-scoped_refptr<SpdySession> SpdySessionPool::GetSpdySessionFromSSLSocket(
+net::Error SpdySessionPool::GetSpdySessionFromSSLSocket(
const HostPortPair& host_port_pair,
HttpNetworkSession* session,
ClientSocketHandle* connection,
- const BoundNetLog& net_log) {
+ const BoundNetLog& net_log,
+ scoped_refptr<SpdySession>& spdy_session) {
+ // Create the SPDY session and add it to the pool.
+ spdy_session = (new SpdySession(host_port_pair, session, net_log.net_log()));
SpdySessionList* list = GetSessionList(host_port_pair);
if (!list)
list = AddSessionList(host_port_pair);
DCHECK(list->empty());
- scoped_refptr<SpdySession> spdy_session(
- new SpdySession(host_port_pair, session, net_log.net_log()));
- spdy_session->InitializeWithSSLSocket(connection);
list->push_back(spdy_session);
- return spdy_session;
+
+ // Now we can initialize the session with the SSL socket.
+ return spdy_session->InitializeWithSSLSocket(connection);
}
bool SpdySessionPool::HasSession(const HostPortPair& host_port_pair) const {
« no previous file with comments | « net/spdy/spdy_session_pool.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698