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

Unified Diff: net/base/upload_file_element_reader.cc

Issue 12217165: net: Fix DCHECK failure on large file upload (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/upload_file_element_reader.cc
diff --git a/net/base/upload_file_element_reader.cc b/net/base/upload_file_element_reader.cc
index 5bc35337449e37b55f2ffb352cfd5e5635bc483e..f0cf74c34287d74567b2ca5d7d661cc219d557a6 100644
--- a/net/base/upload_file_element_reader.cc
+++ b/net/base/upload_file_element_reader.cc
@@ -222,7 +222,7 @@ void UploadFileElementReader::OnReadCompleted(
int result) {
file_stream_.swap(file_stream);
if (result > 0) {
- DCHECK_GE(static_cast<int>(bytes_remaining_), result);
+ DCHECK_GE(bytes_remaining_, static_cast<uint64>(result));
bytes_remaining_ -= result;
}
if (!callback.is_null())
@@ -281,7 +281,7 @@ int UploadFileElementReaderSync::Read(IOBuffer* buf,
const int result = ReadInternal(buf, buf_length, BytesRemaining(),
file_stream_.get());
if (result > 0) {
- DCHECK_GE(static_cast<int>(bytes_remaining_), result);
+ DCHECK_GE(bytes_remaining_, static_cast<uint64>(result));
bytes_remaining_ -= result;
}
return result;
« 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