[bedrock] Address dangling refs in ExtensionsToolbarButton Currently ExtensionsToolbarButton can host an anchored extension menu bubble widget, which is opened / closed via ExtensionsToolbarButton::ToggleExtensionsMenu(). However this method will show the Widget synchronously but close it asynchronously. If closed while the toolbar and its Browser remains alive this is fine, however it can be the case that if the bubble is closed async as the Browser and toolbar are destroyed sync there is a risk of dangling pointers. This CL mitigates this risk by synchronously closing the extensions menu if open when the button is destroyed. It also cleans up the manually managed observation with a ScopedObservation. Bug: 413168662 Change-Id: If52de8a577502a2e11b8ec5ed3c0a8cd62c3beb1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6853423 Commit-Queue: Tom Lukaszewicz <tluk@chromium.org> Reviewed-by: Fred Shih <ffred@chromium.org> Cr-Commit-Position: refs/heads/main@{#1502483}
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.