Open Bug 1836359 Opened 11 months ago Updated 1 month ago

Switch to weak-ref parent links (instead of strong-refs) for webgpu objects (where possible)

Categories

(Core :: Graphics: WebGPU, task, P3)

task

Tracking

()

People

(Reporter: jgilbert, Assigned: jgilbert)

References

(Blocks 2 open bugs)

Details

Holding strong-refs to parent objects is simple and (when CC traversal is hooked up properly) viable, but it complicates the CC graph more than we need, and also means that e.g. GPUTextures hold open their GPUDevice, even if there's no great way to use a Texture without a reference to its Device.

Instead, we can use weak-refs, reduce CC traversal work, and reduce risk of messing up CC, and also collect orphaned objects more eagerly.

Going to tentatively mark this as being prioritized for after our V1/ride-the-trains milestone.

Depends on: webgpu-v1
Severity: -- → S4
Priority: -- → P3
No longer depends on: webgpu-v1
Assignee: nobody → jgilbert
Blocks: 1886808
You need to log in before you can comment on or make changes to this bug.