SimulatedXRDevice::shutDownTrackingAndRendering() should clear its GraphicsContextGL to ensure the resource is cleaned up quickly, and doesn't wait for GC to be reclaimed. Without this, we can run out of GraphicsContextGLs (e.g. GraphicsContextGLOpenGLManager::hasTooManyContexts()) and fail tests if GC happens to be running a bit behind.
Created attachment 431247 [details]
The test I used for this was:
`run-webkit-tests imported/w3c/web-platform-tests/webxr/xrDevice_requestSession_immersive.https.html --repeat=40`
Prior to this change it would fail periodically, now it passes 100%.
Committed r278820 (238773@main): <https://commits.webkit.org/238773@main>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 431247 [details].