Avoid Duplicate Surface Destruction in GarbageCollectSurfaces
Destroying surfaces has the potential to add other surfaces to the |surfaces_to_destroy_| set. This can cause problems when a surface is pending destruction (already pulled out of |surfaces_to_destroy_|) and is then re-added to the list, leading to a double deletion. This change makes deletion robust against this pattern, in order to have a merge-safe fix. A future change will make surface destruction idempotent, so we don't need to worry about these cases. Bug: 934674 Change-Id: Ie08505ef37d4a6e2ca48462372e3e09d3d49bc58 Reviewed-on: https://chromium-review.googlesource.com/c/1484354 Commit-Queue: Eric Karl <ericrk@chromium.org> Reviewed-by:Fady Samuel <fsamuel@chromium.org> Reviewed-by:
Antoine Labour <piman@chromium.org> Cr-Commit-Position: refs/heads/master@{#634988}
Showing
Please register or sign in to comment