RESOLVED WORKSFORME 285476
Credential Management API should reject with abort signal's reason
https://bugs.webkit.org/show_bug.cgi?id=285476
Summary Credential Management API should reject with abort signal's reason
Marcos Caceres
Reported 2025-01-06 14:55:58 PST
The current implementation assumes that rejection will always be done with a DOMPromiseDeferred, which only accepts excepts either BasicCredential (or derivatives of) or DOMExceptions. However, the Credential Manager API Spec supports AbortController, which means that it should reject exceptions sometimes with the AbortSignal's .reason() (which can be any JS Value). See updated tests at: https://github.com/web-platform-tests/wpt/commit/6aa5d8bfd8d8caa663ec170825327a0f00f25c29#diff-d96723e6eeba9e92b6cccbef2991a62545677a26d85e889dfeeeffbd153e9cadR149 We should really probably just use DeferredPromise.
Attachments
Radar WebKit Bug Importer
Comment 1 2025-01-06 14:57:26 PST
Marcos Caceres
Comment 2 2025-01-30 00:04:03 PST
Figured out that one can use `promise.rejectType<IDLAny>(reason.getValue());`
Note You need to log in before you can comment on or make changes to this bug.