Index: net/quic/quic_http_stream.cc |
diff --git a/net/quic/quic_http_stream.cc b/net/quic/quic_http_stream.cc |
index db671f22e925e3313ae37f648a0e7e762eac4f1b..196d8e961196fd1a6fe0ccbb59f81090b9cad61a 100644 |
--- a/net/quic/quic_http_stream.cc |
+++ b/net/quic/quic_http_stream.cc |
@@ -557,6 +557,13 @@ int QuicHttpStream::ProcessResponseHeaders(const SpdyHeaderBlock& headers) { |
int QuicHttpStream::ReadAvailableData(IOBuffer* buf, int buf_len) { |
int rv = stream_->Read(buf, buf_len); |
+ // TODO(rtenneti): Temporary fix for crbug.com/585591. Added a check for null |
+ // |stream_| to fix crash bug. Delete |stream_| check and histogram after fix |
+ // is merged. |
+ bool null_stream = stream_ == nullptr; |
+ UMA_HISTOGRAM_BOOLEAN("Net.QuicReadAvailableData.NullStream", null_stream); |
+ if (null_stream) |
+ return rv; |
if (stream_->IsDoneReading()) { |
stream_->SetDelegate(nullptr); |
stream_->OnFinRead(); |