commit | 4ee86ce73386261571a67de08a0832f995883b3e | [log] [tgz] |
---|---|---|
author | Tom Anderson <thomasanderson@chromium.org> | Thu Aug 31 01:37:23 2023 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Aug 31 01:37:23 2023 |
tree | 599574fe7fbb5cce5e7654d48f9afbbc4685b7a6 | |
parent | 21bfeb929795160117bb7e7b60622a784152f894 [diff] |
Fix leak in SelectFileDialogLinuxPortal Both SelectFileDialogLinuxPortal and DialogInfo were getting leaked. This is due to a reference cycle caused by SelectFileDialogLinuxPortal keeping a scoped_refptr to the DialogInfo, while the DialogInfo keeps 2 callbacks that bind to SelectFileDialogLinuxPortal methods. This CL breaks the reference cycle by switching the callbacks to use weak pointers. However, DialogInfo is still leaked with this change because dbus::Bus also has callbacks that bind do DialogInfo, so these are changed to weak pointers as well. R=sky Bug: None Change-Id: I4ee11c67f2181b2ec8cdbefdf2536e89116a42c4 Low-Coverage-Reason: Currently no tests for SelectFileDialogLinuxPortal Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4819611 Reviewed-by: Scott Violet <sky@chromium.org> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/main@{#1190471}
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.