[Find-in-Page] Ensure timeout check in TextFinder::ScopeStringMatches()
The function's main loop is supposed to halt after timeout, but contains a branch that continues directly without checking timeout, which leads to renderer hang in some edge/buggy cases. This patch implements yoichio's idea (https://goo.gl/EQED8Y) to fix the issue, by rewriting loop conditions and ensuring timeout checking in all branches. Note: no test in this patch, because the only repro case we have hits a DCHECK earlier before entering the problematic branch. Bug: 862648 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: I050909bd625f122c0df7ed905184c32e133170ce Reviewed-on: https://chromium-review.googlesource.com/1148645Reviewed-by:Yoichi Osato <yoichio@chromium.org> Reviewed-by:
Rakina Zata Amni <rakina@chromium.org> Reviewed-by:
Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#577918}
Showing
Please register or sign in to comment