| commit | b1d27bd3468289a2f15d57ff2fb65e50e01c1217 | [log] [tgz] |
|---|---|---|
| author | Andy Paicu <andypaicu@chromium.org> | Mon Oct 21 10:14:22 2024 |
| committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Oct 21 10:14:22 2024 |
| tree | fd0f1b2af002afc53f2d309aafeabe568cdaf457 | |
| parent | f2564925a456c8faf9eaf0d85418c1f3a816d6b5 [diff] |
[PEPC] Fix race condition between permission status and prompt result The introduction of the ":granted" selector which allows the permission element to be hidden when the is granted has brought to the surface the fact that there is a race condition between OnPermissionStatusChange and OnEmbeddedPermissionsDecided which can result in the element being detached but with "aggregated_permission_status_" being set to "GRANTED". This breaks the assumption that the permission status should only be tracked when the element is attached to the tree. But the element should now also need to track its permission status even when not attached to the tree, because it needs to update the ":granted" pseudo-class state which has the potential to attach it back to the tree. This CL therefore makes the permission element follow permission status updates even when detached from the tree and removes CHECKS that were assuming otherwise. Fixed: 374034614 Change-Id: I82f93ba046fc56c40da091ce93e1181bbea923d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5937899 Commit-Queue: Andy Paicu <andypaicu@chromium.org> Reviewed-by: Thomas Nguyen <tungnh@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Cr-Commit-Position: refs/heads/main@{#1371274}
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.