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

Unified Diff: net/quic/quic_http_stream.cc

Issue 2044923003: QUIC/cronet - Fix crash bug b/28676259. Handle session_ being a nullptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_http_stream.cc
diff --git a/net/quic/quic_http_stream.cc b/net/quic/quic_http_stream.cc
index 803f84c7b54a8848281f520454d7d26c7f630545..78b793cbcaf3c53b91062a261c92ab3afa7bdba0 100644
--- a/net/quic/quic_http_stream.cc
+++ b/net/quic/quic_http_stream.cc
@@ -175,6 +175,12 @@ int QuicHttpStream::InitializeStream(const HttpRequestInfo* request_info,
}
int QuicHttpStream::DoStreamRequest() {
+ if (session_.get() == nullptr) {
xunjieli 2016/06/07 23:46:25 Could just do "if (!session_)". It's more consiste
ramant (doing other things) 2016/06/07 23:58:32 Regarding WeakPtr, the following discussion could
ramant (doing other things) 2016/06/18 00:18:05 Uploaded CL: https://codereview.chromium.org/20733
+ // TODO(rtenneti) Bug: b/28676259 - a temporary fix until we find out why
+ // |session_| could be a nullptr.
+ return was_handshake_confirmed_ ? ERR_CONNECTION_CLOSED
+ : ERR_QUIC_HANDSHAKE_FAILED;
+ }
int rv = stream_request_.StartRequest(
session_, &stream_,
base::Bind(&QuicHttpStream::OnStreamReady, weak_factory_.GetWeakPtr()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698