| commit | ce92dcad8ac2466282d80056962a1b97438db5ed | [log] [tgz] |
|---|---|---|
| author | Piotr Wrótniak <piotrwrotniak@google.com> | Wed Nov 06 14:05:53 2024 |
| committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Nov 06 14:05:53 2024 |
| tree | 93ebcba640dab11221ceca3b044e0de550ff7a11 | |
| parent | 69fcb67dd15dc34580fe1c0f97e09af0dacffb23 [diff] |
Use ScopedObservation to avoid dangling references.
Adds removing:
- references to sources in observer during sources destruction
explicitly,
- references to observer in sources during observer destruction
using scoped observation.
Previously this logic was missing potentially leading to dangling
references in outliving sources/observer depending on the order of
destruction.
Bug: 40258491
Change-Id: I650fe6aa6b12c53d89be0e4e63521d9a9849ef06
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5937909
Auto-Submit: Piotr Wrótniak <piotrwrotniak@google.com>
Reviewed-by: Christoph Schwering <schwering@google.com>
Reviewed-by: Jan Keitel <jkeitel@google.com>
Commit-Queue: Piotr Wrótniak <piotrwrotniak@google.com>
Cr-Commit-Position: refs/heads/main@{#1378964}
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.