Clear pending program linking in Context::onDestroy When destroying Context, ANGLE resets any internal state before releasing allocated objects, such as Programs and Shaders. When destroying a program, any pending program linking is resolved via Program::resolveLink. This results in trying to access the Context state that’s just been reset. To work around this, we ensure there are no pending links before resetting the Context state. Bug: angleproject:8380 Change-Id: I599c7e5a82b0e6bf14df1263006e10d8a9cb0b38 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4957715 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>