It's possible to destroy the underlying GraphicsContextGL before WebXROpaqueFramebuffer's destructor runs. For example, when creating too WebGL contexts, the context associated with a WebXROpaqueFramebuffer will be lost. The GCGLOwned objects exist to catch when the user forgets to clean up. In this case, where the GraphicsContextGL is NULL at destruction time, there's nothing to do but reset the GCGLOwned objects, preventing their destructors from asserting in debug builds.
rdar://102173321
Pull request: https://github.com/WebKit/WebKit/pull/6755
Committed 256981@main (d2dc5ce72fbe): <https://commits.webkit.org/256981@main> Reviewed commits have been landed. Closing PR #6755 and removing active labels.