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

Unified Diff: net/quic/quic_http_stream.cc

Issue 1684353002: QUIC - check for null stream_ before calling stream_'s IsDoneReading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | tools/metrics/histograms/histograms.xml » ('j') | 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 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();
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698