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

Unified Diff: net/quic/quic_http_stream.cc

Issue 1769713002: Revert of "Revert '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 0a006e2c1803cdf877ec27eaf1ded0a077c5c210..e733319dbb41545b9d40672af24644be815e4ec7 100644
--- a/net/quic/quic_http_stream.cc
+++ b/net/quic/quic_http_stream.cc
@@ -708,6 +708,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