Bug 248264 - [WebXR] Disarm GCGLOwned object destructors when GraphicsContextGL is NULL
Summary: [WebXR] Disarm GCGLOwned object destructors when GraphicsContextGL is NULL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebXR (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dan Glastonbury
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-23 00:24 PST by Dan Glastonbury
Modified: 2022-11-23 18:32 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.