commit | b21f3c4c85ec0f7064f4c6b2c02499990da00e32 | [log] [tgz] |
---|---|---|
author | Ashley Newson <ashleynewson@chromium.org> | Fri Jan 12 19:52:10 2024 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jan 12 19:52:10 2024 |
tree | a143f21672d3e413eb219e6a301edca02416ab3e | |
parent | 5c584619aadd1111cafbe10e310c12005c9df3e3 [diff] |
[Code Health] Avoid TabStatsTracker outliving local_state TabStatsTracker contains a raw_ptr to pref_service, which would become leaked dangling as TabStatsTracker was never destroyed, despite various comments stating that pref_service must outlive it. This change adds a PostDestroyThreads method to tear TabStatsTracker down (mirroring its creation in PreCreateThreads). This change also makes progress towards fixing a leaked dangling pointer in components/metrics/daily_event.h, but does not fix all additional cases unrelated to TabStatsTracker. Bug: 1462034 Bug: 1462055 Change-Id: I78e61c663da2d21110da06dd1f9cc98d22e2a1ec Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5089188 Commit-Queue: Ashley Newson <ashleynewson@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Reviewed-by: Luc Nguyen <lucnguyen@google.com> Reviewed-by: Olivier Li Shing Tat-Dupuis <olivierli@google.com> Cr-Commit-Position: refs/heads/main@{#1246613}
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.