[bg tab loading] Change when has_restored_tabs_to_load_ is updated. has_restored_tabs_to_load_ is updated by UpdateHasRestoredTabsToLoad() at key moments when whether there are restored tabs to load may have changed. It is important not to call UpdateHasRestoredTabsToLoad() in the middle of a state transition (e.g. when a page has been removed from page_nodes_to_load_ but not added to page_nodes_loading_), otherwise the wrong state may be calculated. This CL changes when UpdateHasRestoredTabsToLoad() is called to ensure that it is not called in the middle of a state transition, which previously caused a CHECK failure (see test added in this CL). Bug: 437957111 Change-Id: Ia022f616e316650655be47b63a3851a9ff813830 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6839289 Reviewed-by: Francois Pierre Doray <fdoray@chromium.org> Reviewed-by: Alison Gale <agale@chromium.org> Commit-Queue: Jian Lin <jianlin1@Microsoft.com> Cr-Commit-Position: refs/heads/main@{#1504785}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.