RC: Perform state transitions asynchronously.
Previously, when an event could cause a state transition (e.g. change of tab visiblity, tab finishes loading...), we called TabManager::PerformStateTransitions() synchronously. Unfortunately, the call wasn't always made in a context where performing the state transition was safe (e.g. can't discard when we are doing a tab switch, because both the tab switch and the discard touch the TabStripModel). With this CL, we schedule asynchronous calls to PerformStateTransitions() when an event could cause a state transition instead of calling it synchronously, to ensure that state transitions always occur in a safe context. Bug: 855053 Change-Id: I5c4f00fb9c4b58393ea7792a05f588614c68f62c Reviewed-on: https://chromium-review.googlesource.com/1115367 Commit-Queue: François Doray <fdoray@chromium.org> Reviewed-by:Sébastien Marchand <sebmarchand@chromium.org> Cr-Commit-Position: refs/heads/master@{#570517}
Showing
This diff is collapsed.
Please register or sign in to comment