Commit 5aaa402cb366dba371881bcfb8120d425192c7e8

Mohan Maiya 2022-03-30T06:13:02

Fix Surface use-after-free bug In Display::destroyContext we would incorrectly destroy current surfaces while trying to makeCurrent the context to be destroyed. Introduce ScopedSurfaceRef, mirroring ScopedContextRef, to keep the surfaces alive while destroying the context. Bug: angleproject:7141 Test: EGLSurfaceTest.SurfaceUseAfterFreeBug* Change-Id: Ie9b3d7841e5ee561d96c13bfee9c7c87b40cc39d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3561354 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>