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

Unified Diff: android_webview/native/state_serializer.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/input_stream_impl.cc ('k') | android_webview/renderer/aw_render_view_ext.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/state_serializer.cc
diff --git a/android_webview/native/state_serializer.cc b/android_webview/native/state_serializer.cc
index 9b013a17710e7728edff61f7af7d89a7486dbbbb..b9698835ddd13ef8cbf4feac327f0c44a5782cde 100644
--- a/android_webview/native/state_serializer.cc
+++ b/android_webview/native/state_serializer.cc
@@ -50,9 +50,9 @@ bool WriteToPickle(const content::WebContents& web_contents,
web_contents.GetController();
const int entry_count = controller.GetEntryCount();
const int selected_entry = controller.GetCurrentEntryIndex();
- DCHECK(entry_count >= 0);
- DCHECK(selected_entry >= -1); // -1 is valid
- DCHECK(selected_entry < entry_count);
+ DCHECK_GE(entry_count, 0);
+ DCHECK_GE(selected_entry, -1); // -1 is valid
+ DCHECK_LT(selected_entry, entry_count);
if (!pickle->WriteInt(entry_count))
return false;
« no previous file with comments | « android_webview/native/input_stream_impl.cc ('k') | android_webview/renderer/aw_render_view_ext.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698