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

Unified Diff: net/quic/quic_reliable_client_stream.cc

Issue 371213002: Fixes for re-enabling more MSVC level 4 warnings: net/quic/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile Created 6 years, 5 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
Index: net/quic/quic_reliable_client_stream.cc
diff --git a/net/quic/quic_reliable_client_stream.cc b/net/quic/quic_reliable_client_stream.cc
index 4eb74d6a31d8382e50b1f3678e318786a8684ac7..98b09cba8689aa02bb6b232dc90e6f3f4a7f433e 100644
--- a/net/quic/quic_reliable_client_stream.cc
+++ b/net/quic/quic_reliable_client_stream.cc
@@ -27,8 +27,10 @@ QuicReliableClientStream::~QuicReliableClientStream() {
uint32 QuicReliableClientStream::ProcessData(const char* data,
uint32 data_len) {
// TODO(rch): buffer data if we don't have a delegate.
+ // !!! Callers seem to assume this will return 0 (or some value less than
+ // |data_len|) on error! Returning a very large positive value may be wrong?
if (!delegate_)
- return ERR_ABORTED;
+ return static_cast<uint32>(ERR_ABORTED);
Ryan Hamilton 2014/07/08 03:37:08 Yes, this seems problematic. :> It should probably
Peter Kasting 2014/07/08 06:26:46 So do you want me to just remove the comment and l
Ryan Hamilton 2014/07/08 18:00:57 Either way. The comment is a good reminder in any
Peter Kasting 2014/07/08 18:16:46 I think what I'll do, then, is change to something
Ryan Hamilton 2014/07/08 18:24:01 Sure, that's fine. Or you can simply do: if (!d
Peter Kasting 2014/07/08 18:44:45 Ah! I'd rather let you make the functional change
int rv = delegate_->OnDataReceived(data, data_len);
if (rv != OK) {

Powered by Google App Engine
This is Rietveld 408576698