| Commit-Queue | +1 |
I need to learn to stop clicking accept on the LLM-generated `weak_this` fixes.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
const gfx::Rect current_bounds = GetBoundsInPixels();Save the result and reuse?
const gfx::Rect bounds = GetBoundsInPixels();Reuse
const gfx::Rect bounds = GetBoundsInPixels();Reuse
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
: window_(window) {}Thomas AndersonAdd: `CHECK(window_);`
Done
const gfx::Rect current_bounds = GetBoundsInPixels();Save the result and reuse?
Done
const gfx::Rect bounds = GetBoundsInPixels();Thomas AndersonReuse
Done
const gfx::Rect bounds = GetBoundsInPixels();Thomas AndersonReuse
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. |
2 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/x11/x11_window.cc
Insertions: 9, Deletions: 6.
@@ -556,10 +556,11 @@
gfx::Rect new_bounds_in_pixels(bounds.origin(),
AdjustSizeForDisplay(bounds.size()));
+ const gfx::Rect current_bounds = GetBoundsInPixels();
const bool size_changed =
- GetBoundsInPixels().size() != new_bounds_in_pixels.size();
+ current_bounds.size() != new_bounds_in_pixels.size();
const bool origin_changed =
- GetBoundsInPixels().origin() != new_bounds_in_pixels.origin();
+ current_bounds.origin() != new_bounds_in_pixels.origin();
// Assume that the resize will go through as requested, which should be the
// case if we're running without a window manager. If there's a window
@@ -915,10 +916,11 @@
}
void X11Window::MoveCursorTo(const gfx::Point& location_px) {
+ const gfx::Rect bounds = GetBoundsInPixels();
connection_->WarpPointer(x11::WarpPointerRequest{
.dst_window = x_root_window_,
- .dst_x = static_cast<int16_t>(GetBoundsInPixels().x() + location_px.x()),
- .dst_y = static_cast<int16_t>(GetBoundsInPixels().y() + location_px.y()),
+ .dst_x = static_cast<int16_t>(bounds.x() + location_px.x()),
+ .dst_y = static_cast<int16_t>(bounds.y() + location_px.y()),
});
// The cached cursor location is no longer valid.
X11EventSource::GetInstance()->ClearLastCursorLocation();
@@ -1981,8 +1983,9 @@
x11::SizeHints size_hints = {};
connection_->GetWmNormalHints(xwindow_, &size_hints);
size_hints.flags |= x11::SIZE_HINT_P_POSITION;
- size_hints.x = GetBoundsInPixels().x();
- size_hints.y = GetBoundsInPixels().y();
+ const gfx::Rect bounds = GetBoundsInPixels();
+ size_hints.x = bounds.x();
+ size_hints.y = bounds.y();
// Set STATIC_GRAVITY so that the window position is not affected by the
// frame width when running with window manager.
size_hints.flags |= x11::SIZE_HINT_P_WIN_GRAVITY;
```
```
The name of the file: ui/base/x/x11_desktop_window_move_client.cc
Insertions: 4, Deletions: 1.
@@ -4,6 +4,7 @@
#include "ui/base/x/x11_desktop_window_move_client.h"
+#include "base/check.h"
#include "base/functional/callback_helpers.h"
#include "ui/base/x/x11_util.h"
#include "ui/events/event.h"
@@ -14,7 +15,9 @@
X11DesktopWindowMoveClient::Delegate::~Delegate() = default;
X11DesktopWindowMoveClient::X11DesktopWindowMoveClient(Delegate* window)
- : window_(window) {}
+ : window_(window) {
+ CHECK(window_);
+}
X11DesktopWindowMoveClient::~X11DesktopWindowMoveClient() = default;
```
[Ozone/X11] Revert workaround UAF guards for GeometryCache synchronous dispatch
Now that GeometryCache::GetBoundsPx() peeks at X11 server responses
instead of calling DispatchNow(), event processing and bounds-changed
callbacks no longer execute synchronously during bounds calculation.
This change reverts the temporary WeakPtr liveness guards and unit tests
that were added to handle re-entrancy during GetBoundsPx() /
GetBoundsInPixels():
- Revert "Harden X11DesktopWindowMoveClient against synchronous destruction"
- Revert "Fix use-after-free in DesktopWindowTreeHostPlatform::CenterWindow"
- Revert "ozone/x11: Fix potential UAF in X11Window::DispatchEvent"
- Revert "Ozone: Fix UAF in X11Window::DispatchUiEvent via weak_ptr tracking"
- Revert "Fix UAF in X11Window::SetOverrideRedirect and BrowserDesktopWindowTreeHostLinux"
- Revert "[Ozone/X11] Guard against synchronous deletion in OnWindowMapped"
- Revert "ozone/x11: Fix UAF inside X11Window::GetBoundsInPixels()"
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |