[Ozone/Wayland]Add window manager GetAllWindowsAsWeakPtr() [chromium/src : main]

0 views
Skip to first unread message

Kramer Ge (Gerrit)

unread,
Jul 10, 2026, 5:06:39 PM (13 days ago) Jul 10
to Thomas Anderson, Chromium LUCI CQ, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Thomas Anderson

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Thomas Anderson
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I06109f25e6a1d9588fb55e930bc5ba81e82f6267
Gerrit-Change-Number: 8072281
Gerrit-PatchSet: 5
Gerrit-Owner: Kramer Ge <fang...@chromium.org>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Attention: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Comment-Date: Fri, 10 Jul 2026 21:06:24 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Thomas Anderson (Gerrit)

unread,
Jul 10, 2026, 6:01:15 PM (13 days ago) Jul 10
to Kramer Ge, Chromium LUCI CQ, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Kramer Ge

Thomas Anderson voted and added 1 comment

Votes added by Thomas Anderson

Code-Review+1

1 comment

File ui/ozone/platform/wayland/host/wayland_window_manager.cc
Line 340, Patchset 5 (Latest): std::vector<base::WeakPtr<WaylandWindow>> result;
Thomas Anderson . unresolved

nit: could reserve space in this vector

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I06109f25e6a1d9588fb55e930bc5ba81e82f6267
    Gerrit-Change-Number: 8072281
    Gerrit-PatchSet: 5
    Gerrit-Owner: Kramer Ge <fang...@chromium.org>
    Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
    Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
    Gerrit-Attention: Kramer Ge <fang...@chromium.org>
    Gerrit-Comment-Date: Fri, 10 Jul 2026 22:00:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Kramer Ge (Gerrit)

    unread,
    Jul 13, 2026, 1:02:11 PM (10 days ago) Jul 13
    to Thomas Anderson, Chromium LUCI CQ, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org

    Kramer Ge voted and added 1 comment

    Votes added by Kramer Ge

    Commit-Queue+2

    1 comment

    File ui/ozone/platform/wayland/host/wayland_window_manager.cc
    Line 340, Patchset 5: std::vector<base::WeakPtr<WaylandWindow>> result;
    Thomas Anderson . resolved

    nit: could reserve space in this vector

    Kramer Ge

    Good catch, thanks! Done.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I06109f25e6a1d9588fb55e930bc5ba81e82f6267
      Gerrit-Change-Number: 8072281
      Gerrit-PatchSet: 6
      Gerrit-Owner: Kramer Ge <fang...@chromium.org>
      Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
      Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
      Gerrit-Comment-Date: Mon, 13 Jul 2026 17:01:55 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Thomas Anderson <thomasa...@chromium.org>
      satisfied_requirement
      open
      diffy

      Kramer Ge (Gerrit)

      unread,
      Jul 13, 2026, 2:38:34 PM (10 days ago) Jul 13
      to Thomas Anderson, Chromium LUCI CQ, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org

      Kramer Ge voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I06109f25e6a1d9588fb55e930bc5ba81e82f6267
      Gerrit-Change-Number: 8072281
      Gerrit-PatchSet: 7
      Gerrit-Owner: Kramer Ge <fang...@chromium.org>
      Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
      Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
      Gerrit-Comment-Date: Mon, 13 Jul 2026 18:38:21 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Jul 13, 2026, 4:25:55 PM (10 days ago) Jul 13
      to Kramer Ge, Thomas Anderson, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org

      Chromium LUCI CQ submitted the change with unreviewed changes

      Unreviewed changes

      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());
      }
      ```

      Change information

      Commit message:
      [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.
      Bug: 532925350
      Change-Id: I06109f25e6a1d9588fb55e930bc5ba81e82f6267
      Reviewed-by: Thomas Anderson <thomasa...@chromium.org>
      Commit-Queue: Kramer Ge <fang...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1661337}
      Files:
      • M ui/ozone/platform/wayland/host/wayland_buffer_manager_host.cc
      • M ui/ozone/platform/wayland/host/wayland_output_manager.cc
      • M ui/ozone/platform/wayland/host/wayland_window_manager.cc
      • M ui/ozone/platform/wayland/host/wayland_window_manager.h
      • M ui/ozone/platform/wayland/host/wayland_window_manager_unittest.cc
      • M ui/ozone/platform/wayland/wayland_buffer_manager_unittest.cc
      Change size: M
      Delta: 6 files changed, 109 insertions(+), 7 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Thomas Anderson
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I06109f25e6a1d9588fb55e930bc5ba81e82f6267
      Gerrit-Change-Number: 8072281
      Gerrit-PatchSet: 8
      Gerrit-Owner: Kramer Ge <fang...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
      Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages