commit | 5c1946331b4c352475b5b6cf0432cc6dbb20ef7b | [log] [tgz] |
---|---|---|
author | Keren Zhu <kerenzhu@chromium.org> | Tue Sep 13 15:54:07 2022 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Sep 13 15:54:07 2022 |
tree | e6cce9a8826e342f417df773ef7246467b29a9b0 | |
parent | 99792f007d7887254519115b06a2af3a1bc440f0 [diff] |
views: use WeakPtr to track a widget's parent A widget's parent might be destroyed before itself, make sure that Widget::parent() returns nullptr at this time. This might happen during shutdown on a desktop widget with a non-desktop parent. For a concrete case, see test ExtensionsMenuViewInteractiveUITest.ClickingContextMenuButton on Linux and lacros ChromeOS. This will fix a UAF issue in Widget Layering (crbug.com/1355904) where a widget will make access to its parent to do some cleanup during shutdown. Bug: 1355904 Change-Id: I8993fa7e24ddc56d69863ba8c669f20c2b8c36ab Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3891481 Reviewed-by: Allen Bauer <kylixrd@chromium.org> Commit-Queue: Keren Zhu <kerenzhu@chromium.org> Cr-Commit-Position: refs/heads/main@{#1046392}
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.