Bug 226947 - WebXR tests often fail due to running out of GraphicsContextGLs
Summary: WebXR tests often fail due to running out of GraphicsContextGLs
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebXR (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
Keywords: InRadar
Depends on:
Reported: 2021-06-11 18:07 PDT by Sam Weinig
Modified: 2021-06-13 11:43 PDT (History)
3 users (show)

See Also:

Patch (1.48 KB, patch)
2021-06-11 18:09 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2021-06-11 18:07:53 PDT
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.
Comment 1 Sam Weinig 2021-06-11 18:09:29 PDT
Created attachment 431247 [details]
Comment 2 Sam Weinig 2021-06-11 18:15:16 PDT
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%.
Comment 3 EWS 2021-06-13 11:42:52 PDT
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].
Comment 4 Radar WebKit Bug Importer 2021-06-13 11:43:19 PDT