-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ozone/wayland: Fix dangling ptr in WaylandDataDragController
This makes WaylandDataDragController hold the image data for the drag icon as a gfx::ImageSkia instead of raw_ptr<const SkBitmap>. The bitmap pointer is only valid until views::MenuController::StartDrag() returns (which happens after the drag loop is done), and we held onto it until ui::WaylandDataDragController::OnDataSourceFinish(). The timing of when exactly this latter method is called depends on when we process which drag-related compositor events, and it's possible that the drag loop ends before that. I was only able to reproduce this using a WIP implementation of the new ui-controls protocol instead of weston-test and then running BookmarkBarViewTest22.CloseSourceBrowserDuringDrag, i.e. on ToT it's probably not possible, or at least very hard, to hit this, but we should fix it nonetheless. Bug: 1022722 Change-Id: Ieb05f5b87f61b225c964977a62254c833d72f32d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4780713 Reviewed-by: Nick Yamane <nickdiego@igalia.com> Commit-Queue: Max Ihlenfeldt <max@igalia.com> Cr-Commit-Position: refs/heads/main@{#1190738}
- Loading branch information
1 parent
def90f9
commit 1199847
Showing
2 changed files
with
18 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters