commit | ae93e74c544dcfcd588c44734e5eb0e646e97a0a | [log] [tgz] |
---|---|---|
author | Joshua Hood <jdh@chromium.org> | Mon Mar 24 20:36:16 2025 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Mar 24 20:36:16 2025 |
tree | 51e4d3ce715e7cd1f460e9053b52aad307d9137d | |
parent | bb6c43770764ca4f42b74db4a17d7696128709ac [diff] |
Fix/prevent race condition on profile re-loading This CL switches to using `CreateTaskRunnerForResource()` when the BTM service is using a persistent/on-disk database, avoiding a scenario where a new (different) task runner is used to open the BTM db while the original task runner is in the process of closing it. `CreateTaskRunnerForResource()` prevents this by only creating a new task runner if there isn't already one associated with the db file. If there is already a task runner associated with the db file, it returns a reference to that one. Reusing the same task runner means the task to open the db won't start until the task to close it has completed. Bug: 369635654 Change-Id: I780ceced23d01c3e1441f0ad8c1802ade4a59c0e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6386752 Reviewed-by: Ryan Tarpine <rtarpine@chromium.org> Commit-Queue: Joshua Hood <jdh@chromium.org> Cr-Commit-Position: refs/heads/main@{#1437050}
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.