Fix re-entrant crash for Android FIP
There has been a very long standing bug where FindToolbar#deactivate would crash because it was being called again during the initial processing. The cause of this (at least I think) is that deactivate causes some Android views to hide. That causes the parent view group to recalculate the desired focus target. In some cases, it finds the omnibox and triggers that to gain focus. When the omnibox gains focus, it tells FIP to hide itself, but since the focus happened in the original deactivate call, it has now re-entered deactivate and crashes. The solution (as proposed) is to introduce transitional states between active and deactive and handle them accordingly. If an activate call comes while processing deactive, it is postponed until the deactive fully finishes. BUG=830253,624332 Change-Id: I12eed279921667eb7340332ffb2991f256c12796 Reviewed-on: https://chromium-review.googlesource.com/1033484 Commit-Queue: Ted Choc <tedchoc@chromium.org> Reviewed-by:Theresa <twellington@chromium.org> Cr-Commit-Position: refs/heads/master@{#554593}
Showing
Please register or sign in to comment