Open Bug 1889424 Opened 2 years ago Updated 2 years ago

Handle GPU process crashes better

Categories

(Core :: Graphics: WebGPU, enhancement)

enhancement

Tracking

()

People

(Reporter: aosmond, Unassigned)

References

(Blocks 1 open bug)

Details

When the GPU process crashes, we will resolve the lost promise correctly:
https://searchfox.org/mozilla-central/rev/d7c5387a43bda5163afcb9e65e17c476c6ecf625/dom/webgpu/ipc/WebGPUChild.cpp#255

But if the app tries to recreate its adapter/device before the new GPU process has been brought back up, then we will either throw inline, or reject the promise:
https://searchfox.org/mozilla-central/rev/d7c5387a43bda5163afcb9e65e17c476c6ecf625/dom/webgpu/Instance.cpp#90

Probably adding some sort of hook into the CanvasShutdownManager to call into webgpu::Instance to resolve pending promises waiting for the compositor process to be restored would be a good idea:
https://searchfox.org/mozilla-central/rev/d7c5387a43bda5163afcb9e65e17c476c6ecf625/gfx/ipc/CanvasShutdownManager.cpp#149

Without this, an app would need to retry requesting a new device on some sort of timer.

You need to log in before you can comment on or make changes to this bug.