| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
std::vector<base::WeakPtr<WaylandWindow>> result;nit: could reserve space in this vector
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
nit: could reserve space in this vector
Good catch, thanks! Done.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
5 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: ui/ozone/platform/wayland/host/wayland_window_manager.cc
Insertions: 1, Deletions: 0.
@@ -338,6 +338,7 @@
std::vector<base::WeakPtr<WaylandWindow>>
WaylandWindowManager::GetAllWindowsAsWeakPtr() const {
std::vector<base::WeakPtr<WaylandWindow>> result;
+ result.reserve(window_map_.size());
for (auto& entry : window_map_) {
result.push_back(entry.second->AsWeakPtr());
}
```
[Ozone/Wayland]Add window manager GetAllWindowsAsWeakPtr()
A class of uaf are caused by direct/indirect delegate OnStatusUpdate()
calls. Notably iterating on GetAllWindows() while the delegate may
destroy the window and its descendant windows.
Add GetAllWindowsAsWeakPtr() for callers that need to check for
potential window destruction.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |