commit | be0c33a335c267f3db77e33ef1e647f57e8d1f5d | [log] [tgz] |
---|---|---|
author | Drew Davenport <ddavenport@chromium.org> | Wed Apr 03 23:33:02 2024 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Apr 03 23:33:02 2024 |
tree | c954bf85c0b2bf7c6144dfddf83bd8182cd535ff | |
parent | ac0a440a3688c06e7c67a3b8ccf91c0a3758c40b [diff] |
ozone/drm: Release PageFlipRequest reference in tests If a pageflip is committed to FakeDrmDevice, and the pageflip callback is not cleared, this results in a reference cycle preventing the FakeDrmDevice from being deleted. - DrmOverlayPlane holds a scoped_refptr<DrmFramebuffer> - DrmFramebuffer holds a scoped_refptr<DrmDevice> - in HardwareDisplayController::SchedulePageFlip the vector<DrmOverlayPlane> is bound to a base::OnceCallback - PageFlipRequest takes ownership of the callback through TakeCallback - In FakeDrmDevice::CommitProperties, the FakeDrmDevice adds the PageFlipRequest to its internal queue, causing a reference cycle. For tests that run the callbacks via FakeDrmDevice::RunCallbacks, the PageFlipRequest reference will be dropped and the reference cycle broken. FakeDrmDevice::ClearCallbacks provides a mechanism to break the reference cycle while avoiding any unintended side effects of executing the callbacks. Bug: chromium:40263665 TEST: ozone_unittests with detect_leaks=1 Change-Id: I4404b6c339d6fa76da116e070cace36469a8cbbb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5410833 Reviewed-by: Gil Dekel <gildekel@chromium.org> Commit-Queue: Drew Davenport <ddavenport@chromium.org> Cr-Commit-Position: refs/heads/main@{#1282221}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.