Skip to content

[deno] Rework error and device loss handling #7693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

andyleiserson
Copy link
Contributor

The goal of these changes is to make the CTS work again under deno, see #6838 and #7675.

There are two things happening here:

  1. As was already noted by a TODO, reading device.lost should always return the same promise.
  2. Handling errors in an async task without coordinating with the v8 runtime seemed to make things unhappy. I'm not sure exactly why -- the process was exiting silently. With this change, deno's V8TaskSpawner is used to schedule error handling through the runtime.

Testing
Tested using the webgpu:api,operation,device,lost:* and webgpu:api,operation,uncapturederror:* CTS tests. However, additional changes are needed to get the CTS to work, so until the rest of those changes are made, there isn't a mechanism to test this in the wgpu tree (that I'm aware of).

Squash or Rebase? Squash

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

@andyleiserson andyleiserson requested review from crowlKats and a team as code owners May 14, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant