summaryrefslogtreecommitdiffstats
path: root/pdf/out_of_process_instance.cc
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2014-11-03 17:00:14 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-04 01:00:38 +0000
commit4da86e9519681acee27ec47c63685eb2804d7144 (patch)
tree0d6783286ce8dcbff1b92bfa34c9d13889f57ce8 /pdf/out_of_process_instance.cc
parent63d3aa3c66b77df08c0143e18f983bb6747967e0 (diff)
downloadchromium_src-4da86e9519681acee27ec47c63685eb2804d7144.zip
chromium_src-4da86e9519681acee27ec47c63685eb2804d7144.tar.gz
chromium_src-4da86e9519681acee27ec47c63685eb2804d7144.tar.bz2
PDF: Fix potential bad indexes in find results.
Add a new FindTextData class to store the index to avoid all the size_t to int casts. BUG=416696 Review URL: https://codereview.chromium.org/691273003 Cr-Commit-Position: refs/heads/master@{#302532}
Diffstat (limited to 'pdf/out_of_process_instance.cc')
-rw-r--r--pdf/out_of_process_instance.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index 6f1b23d..bfbcb93 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -906,6 +906,7 @@ void OutOfProcessInstance::NotifyNumberOfFindResultsChanged(int total,
void OutOfProcessInstance::NotifySelectedFindResultChanged(
int current_find_index) {
+ DCHECK_GE(current_find_index, 0);
SelectedFindResultChanged(current_find_index);
}