Open Bug 1841347 Opened 1 year ago Updated 4 months ago

Migrate `gfx_bindings::error::ErrorSource` to use `nsString` for its message field

Categories

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

defect

Tracking

()

People

(Reporter: ErichDonGubler, Unassigned, Mentored)

References

(Blocks 2 open bugs)

Details

The ErrorBuffer type is currently used to carry errors via FFI between dom/webgpu/ipc/WebGPUParent.cpp and gfx/wgpu_bindings/src/server.rs. It uses a fixed-size UTF-8 string buffer, which holds contents populated by the std::error::Error trait on the wgpu_bindings side. This means that errors that are "too long" are truncated! Eek!

Let's move this API to use nsString instead. This will have two benefits:

  1. We will no longer need to deal with fixed-size buffers for error messages and, by extension, truncate error messages.
  2. Greater consistency with other code around it.
Mentor: egubler
No longer depends on: webgpu-v1
You need to log in before you can comment on or make changes to this bug.