[Autofill Assistant] Avoid race conditions in graceful shutdown.
Before this patch, there were cases where the controller would enter graceful shutdown because of a script, with a successful message, and then notice an error, and change that message to an error. The error was usually caused by DidStartNavigation noticing an unexpected navigation event, triggered by an action run at the end of the last script. This patch attempts to avoid such case by: - only checking for unexpected navigation events in the PROMPT state. This specifically excludes the STOPPED and RUNNING states. - not reporting errors or accepting script updates (OnGetScript) in the STOPPED state - stopping script checks when entering the fatal error state Bug: 806868 Change-Id: I408d2652257d9524740e44c79b7fa5201ef7cc17 Reviewed-on: https://chromium-review.googlesource.com/c/1436047 Commit-Queue: Stephane Zermatten <szermatt@chromium.org> Reviewed-by:Mathias Carlen <mcarlen@chromium.org> Cr-Commit-Position: refs/heads/master@{#626937}
Showing
Please register or sign in to comment