summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-24 07:36:07 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-24 07:36:07 +0000
commite87089dbddd82041c1cceab2a886e8cf1f528931 (patch)
treee159e0a374e079a5b5842e880f4ddb6e2c76186f /net
parent2674d8c7778f9f48942617234cb16b571c83bd72 (diff)
downloadchromium_src-e87089dbddd82041c1cceab2a886e8cf1f528931.zip
chromium_src-e87089dbddd82041c1cceab2a886e8cf1f528931.tar.gz
chromium_src-e87089dbddd82041c1cceab2a886e8cf1f528931.tar.bz2
Fix a bug in quic_stream_factory where a QuicStreamRequest::Request could return OK without actually having a stream ready
TBR=jar@chromium.org Review URL: https://chromiumcodereview.appspot.com/17587005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208168 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/quic/quic_stream_factory.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 9dea357..72c4455 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -184,10 +184,13 @@ int QuicStreamRequest::Request(
} else {
factory_ = NULL;
}
+ if (rv == OK)
+ DCHECK(stream_);
return rv;
}
void QuicStreamRequest::set_stream(scoped_ptr<QuicHttpStream> stream) {
+ DCHECK(stream);
stream_ = stream.Pass();
}
@@ -273,6 +276,7 @@ int QuicStreamFactory::Create(const HostPortProxyPair& host_port_proxy_pair,
}
if (rv == OK) {
DCHECK(HasActiveSession(host_port_proxy_pair));
+ request->set_stream(CreateIfSessionExists(host_port_proxy_pair, net_log));
}
return rv;
}
@@ -282,6 +286,7 @@ void QuicStreamFactory::OnJobComplete(Job* job, int rv) {
// Create all the streams, but do not notify them yet.
for (RequestSet::iterator it = job_requests_map_[job].begin();
it != job_requests_map_[job].end() ; ++it) {
+ DCHECK(HasActiveSession(job->host_port_proxy_pair()));
(*it)->set_stream(CreateIfSessionExists(job->host_port_proxy_pair(),
(*it)->net_log()));
}
@@ -308,6 +313,7 @@ scoped_ptr<QuicHttpStream> QuicStreamFactory::CreateIfSessionExists(
const HostPortProxyPair& host_port_proxy_pair,
const BoundNetLog& net_log) {
if (!HasActiveSession(host_port_proxy_pair)) {
+ DLOG(INFO) << "No active session";
return scoped_ptr<QuicHttpStream>();
}