Bug 285476
| Summary: | Credential Management API should reject with abort signal's reason | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Marcos Caceres <marcosc> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | Normal | CC: | marcosc, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 268516 | ||
Marcos Caceres
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/142440568>
Marcos Caceres
Figured out that one can use `promise.rejectType<IDLAny>(reason.getValue());`