Index: net/base/upload_data_stream.cc |
diff --git a/net/base/upload_data_stream.cc b/net/base/upload_data_stream.cc |
index a7542778ff5a0bf93968eca29888c835bfa3f6e8..d78a997be0342998bb7d65e2c83b17b16a2e9490 100644 |
--- a/net/base/upload_data_stream.cc |
+++ b/net/base/upload_data_stream.cc |
@@ -109,17 +109,18 @@ void UploadDataStream::OnInitCompleted(int result) { |
} |
void UploadDataStream::OnReadCompleted(int result) { |
- DCHECK_GE(result, 0); |
- DCHECK(initialized_successfully_); |
+ if (result > 0) { |
+ DCHECK(initialized_successfully_); |
mmenke
2016/06/06 16:22:33
I think this DCHECK can go before the if.
maksims (do not use this acc)
2016/06/21 11:09:25
Done.
|
- current_position_ += result; |
- if (!is_chunked_) { |
- DCHECK_LE(current_position_, total_size_); |
- if (current_position_ == total_size_) |
- is_eof_ = true; |
- } |
+ current_position_ += result; |
+ if (!is_chunked_) { |
+ DCHECK_LE(current_position_, total_size_); |
+ if (current_position_ == total_size_) |
+ is_eof_ = true; |
+ } |
- DCHECK(result > 0 || is_eof_); |
+ DCHECK(result > 0 || is_eof_); |
mmenke
2016/06/06 16:22:33
This DCHECK no longer does anything.
Suggest movi
maksims (do not use this acc)
2016/06/21 11:09:25
Done.
|
+ } |
if (!callback_.is_null()) |
base::ResetAndReturn(&callback_).Run(result); |