Fix UAF bug in FlingSchedulerAndroid. This CL fixes a bug where FlingSchedulerAndroid held a dangling pointer to BeginFrameSource after RootCompositorFrameSinkImpl was destroyed while a fling was ongoing at that instance. This change fixes this issue by explicitly updating FlingSchedulerAndroid (VizCompositor's side implementation of FlingScheduler) of changes in BeginFrameSource from Register/UnregisterFrameSinkHierarchy calls [1]. This CL also adds a unittest "FlingSchedulerTest.ResetStateOnBeginFrameSourceChange" to test this behavior. [1]: https://source.chromium.org/chromium/chromium/src/+/main:components/viz/service/frame_sinks/frame_sink_manager_impl.cc;l=343;drc=0577aa4f99f2f1b2a85ac99d7b129cf87aa104bc, https://source.chromium.org/chromium/chromium/src/+/main:components/viz/service/frame_sinks/frame_sink_manager_impl.cc;l=403-405;drc=0577aa4f99f2f1b2a85ac99d7b129cf87aa104bc Bug: 401501206 Change-Id: I779db47cfa06c65b8ab999bcf695212dd43ad81a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6396241 Commit-Queue: Aman Verma <amanvr@google.com> Reviewed-by: Stephen Nusko <nuskos@chromium.org> Reviewed-by: Jonathan Ross <jonross@chromium.org> Cr-Commit-Position: refs/heads/main@{#1447692}
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.