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

Unified Diff: android_webview/native/input_stream_impl.cc

Issue 337473004: aw: Use comparison DCHECKs where appropriate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « android_webview/native/aw_web_resource_response_impl.cc ('k') | android_webview/native/state_serializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/input_stream_impl.cc
diff --git a/android_webview/native/input_stream_impl.cc b/android_webview/native/input_stream_impl.cc
index fca6a29cc8378aca2bb107f430abb0773f2b2458..48afbf6f622e34d471ec9e1d4f1a19da7827d22d 100644
--- a/android_webview/native/input_stream_impl.cc
+++ b/android_webview/native/input_stream_impl.cc
@@ -124,7 +124,8 @@ bool InputStreamImpl::Read(net::IOBuffer* dest, int length, int* bytes_read) {
dest_write_ptr += transfer_length;
}
// bytes_read can be strictly less than the req. length if EOF is encountered.
- DCHECK(remaining_length >= 0 && remaining_length <= length);
+ DCHECK_GE(remaining_length, 0);
+ DCHECK_LE(remaining_length, length);
*bytes_read = length - remaining_length;
return true;
}
« no previous file with comments | « android_webview/native/aw_web_resource_response_impl.cc ('k') | android_webview/native/state_serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698