Fix crash when closing and reopening the Assistant UI.
This crash is hard to reproduce, but what happened was: - User sent a query ('volume up'). The response for this is rendered. - User sent another query (click in suggestion chip). This means we start fading out the response of the first query. - The response of the new query arrives before the fade-out is complete,so the response is postponed until the fade out is complete. - Now close the Assistant UI. Due to the bug, the previous response was not cleared but it remained queued. - Open the UI again, and send another query ('volume down'). - This fades out the initial text. If that completes before the new response arrives, the previous queued response was animated in. - When this animate in completed, the ui_element_container_view tried to access the current response, which is a nullptr and caused a crash. Note that this is not the crash described in the bug report. However I failed to reproduce that crash, and because it is a related area I am hoping that both have the same root cause. This will need to be monitored to ensure the bug is actually fixed. complexity involved I abandoned the effort. Bug: b:145136105 Change-Id: Ia512eb370c2b9f8ab506575f2252dc520471793a Tests: Manually tested. I tried adding unittests but given the Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1993114 Commit-Queue: Jeroen Dhollander <jeroendh@google.com> Reviewed-by:Xiaohui Chen <xiaohuic@chromium.org> Cr-Commit-Position: refs/heads/master@{#730233}
Showing
Please register or sign in to comment