Don't create providers if context is lost
CanvasResourceProvider::CreateSharedImageProvider receives a weak pointer to the ContextProviderWrapper and returns nullptr if it does not exist. Unfortunately SharedGpuContext::IsGpuCompositingEnabled can re-create the ContextProviderWrapper after this check happens, leading to potential use-after-frees. To me it simply makes the most sense to not create a CRP if context is lost, as the created provider would be invalid and nullptr would get returned anyway. Bug: 1126424 Change-Id: Ic92709d7a38d94e5e7529efac3a09405d64eaa34 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2417097Reviewed-by:Juanmi Huertas <juanmihd@chromium.org> Reviewed-by:
Fernando Serboncini <fserb@chromium.org> Commit-Queue: Aaron Krajeski <aaronhk@chromium.org> Cr-Commit-Position: refs/heads/master@{#809327}
Showing
Please register or sign in to comment