Change information
Commit message:
[M144-LTS][Ozone/X11] Guard against synchronous deletion in OnWindowMapped
Maximize() may synchronously delete X11Window via OnBoundsChanged bounds
changes notifications. MapNotify dispatch path (which routes to
OnWindowMapped()) is not covered by the standard EventDispatcher
weak_this guard, leading to a UAF upon stack unwinding.
This CL introduces a weak_this guard in X11Window::OnWindowMapped() to
safely abort execution if the window is synchronously deleted.
(cherry picked from commit 6674e8db67016bbed31d9491e5caa47ba3e4fc5a)
Fixed: 517050585
Change-Id: I3ab1ae86cc0c16d08c359d18076c6815ef6fb061
Cr-Original-Commit-Position: refs/heads/main@{#1637736}
Cr-Commit-Position: refs/branch-heads/7559@{#5238}
Cr-Branched-From: 223dfbac1c7542a06b422390d954afe5b560b607-refs/heads/main@{#1552494}
Files:
- M ui/ozone/platform/x11/x11_window.cc
- M ui/ozone/platform/x11/x11_window_ozone_unittest.cc
Change size: M
Delta: 2 files changed, 106 insertions(+), 0 deletions(-)
Branch: refs/branch-heads/7559
Submit Requirements:
Code-Review: +1 by Thomas Anderson, +1 by Artem Sumaneev