Bug 248264

Summary: [WebXR] Disarm GCGLOwned object destructors when GraphicsContextGL is NULL
Product: WebKit Reporter: Dan Glastonbury <djg>
Component: WebXRAssignee: Dan Glastonbury <djg>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   

Description Dan Glastonbury 2022-11-23 00:24:38 PST
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.
Comment 1 Dan Glastonbury 2022-11-23 00:25:20 PST
rdar://102173321
Comment 2 Dan Glastonbury 2022-11-23 00:29:48 PST
Pull request: https://github.com/WebKit/WebKit/pull/6755
Comment 3 EWS 2022-11-23 18:32:46 PST
Committed 256981@main (d2dc5ce72fbe): <https://commits.webkit.org/256981@main>

Reviewed commits have been landed. Closing PR #6755 and removing active labels.