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

Unified Diff: net/quic/chromium/quic_chromium_client_stream.cc

Issue 2854363003: Remove confusing logic in QuicChromiumClientStream::Read (Closed)
Patch Set: Created 3 years, 8 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/chromium/quic_chromium_client_stream.cc
diff --git a/net/quic/chromium/quic_chromium_client_stream.cc b/net/quic/chromium/quic_chromium_client_stream.cc
index d224e1d761f1dabe7e591b24f8540db08a356d7b..2a3e0c04c2b312ae5d6b6f2ab2fc66a8bf018901 100644
--- a/net/quic/chromium/quic_chromium_client_stream.cc
+++ b/net/quic/chromium/quic_chromium_client_stream.cc
@@ -216,10 +216,8 @@ int QuicChromiumClientStream::Read(IOBuffer* buf, int buf_len) {
iov.iov_base = buf->data();
iov.iov_len = buf_len;
size_t bytes_read = Readv(&iov, 1);
- // If no more body bytes and trailers are to be delivered, return
- // ERR_IO_PENDING now because onDataAvailable() will be called after trailers.
- if (bytes_read == 0 && !FinishedReadingTrailers())
- return ERR_IO_PENDING;
+ // Since HasBytesToRead is true, Readv() must of read some data.
+ DCHECK_NE(0u, bytes_read);
return bytes_read;
}
« 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