Commit a6bb22bc authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Add some debugging info for a PDF crash.

It is not obvious what's going wrong, so save some data into the crash
dumps to help with the investigation.

Bug: 1108574
Change-Id: I4a9bbc147e2d47ca901e7ff35b44f7edf05de975
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315080Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791498}
parent 66090858
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "base/auto_reset.h" #include "base/auto_reset.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/check_op.h" #include "base/check_op.h"
#include "base/debug/alias.h"
#include "base/feature_list.h" #include "base/feature_list.h"
#include "base/notreached.h" #include "base/notreached.h"
#include "base/stl_util.h" #include "base/stl_util.h"
...@@ -1932,6 +1933,13 @@ bool PDFiumEngine::SelectFindResult(bool forward) { ...@@ -1932,6 +1933,13 @@ bool PDFiumEngine::SelectFindResult(bool forward) {
// If the result is not in view, scroll to it. // If the result is not in view, scroll to it.
pp::Rect bounding_rect; pp::Rect bounding_rect;
pp::Rect visible_rect = GetVisibleRect(); pp::Rect visible_rect = GetVisibleRect();
// TODO(crbug.com/1108574): Remove after fixing the issue.
size_t find_results_size = find_results_.size();
base::debug::Alias(&find_results_size);
size_t current_find_index_value = current_find_index_.value();
base::debug::Alias(&current_find_index_value);
// Use zoom of 1.0 since |visible_rect| is without zoom. // Use zoom of 1.0 since |visible_rect| is without zoom.
const std::vector<pp::Rect>& rects = const std::vector<pp::Rect>& rects =
find_results_[current_find_index_.value()].GetScreenRects( find_results_[current_find_index_.value()].GetScreenRects(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment