[Android] Fix a crash in SuggestionMenuTimeoutCallback()
The possible crash senario is like following: 1) Regular SuggestionMarker with suggestions get clicked, timeout triggered. 2) IME removes original SuggestionMarker, then added another SuggestionMarker with no suggestion. 3) SuggestionMenuTimeoutCallback() get called. 4) Crash happens because we are getting the first suggestion in suggestion_infos vector. This CL checks if suggestion_infos is empty to avoid the crash. Bug: 901135, 869261 Change-Id: I5949c370e3cbc2c760502f7357ba5463c7d909bb Reviewed-on: https://chromium-review.googlesource.com/c/1314130 Commit-Queue: Shimi Zhang <ctzsm@chromium.org> Reviewed-by:Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:
Changwan Ryu <changwan@chromium.org> Cr-Commit-Position: refs/heads/master@{#605003}
Showing
Please register or sign in to comment