[omnibox] Fix a bug with OmniboxPopupModel::TriggerSelectionAction
OmniboxPopupModel::TriggerSelectionAction will definitely crash in the no-default-match edge case, which can definitely happen with certain enterprise policies. Additionally, it's possible that UI callers will pass in an invalid |selection|, as they are an external class that could potentially be stale. In practice, it doesn't SEEM possible for this to occur with Views, but I'm not sure. Philosophically, I think crashing when the UI code gets out of date isn't a good thing, and this code should be a bit more tolerant. Bug: 1085407, 1078183, 1052522 Change-Id: Ibe5a2b09340679d3bfb86c234bc799f0823fdaaf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2216605Reviewed-by:Justin Donnelly <jdonnelly@chromium.org> Commit-Queue: Tommy Li <tommycli@chromium.org> Cr-Commit-Position: refs/heads/master@{#772420}
Showing
Please register or sign in to comment