Bug 311790
| Summary: | Digital Credentials: prepare credential requests rejects with wrong error code and synchronously instead of queuing a task | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Marcos Caceres <marcosc> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 268516 | ||
Marcos Caceres
When a credential request is already in progress, the spec (https://w3c-fedid.github.io/digital-credentials/ — "prepare credential requests" step 2) says:
"Queue a global task on the DOM manipulation task source given |global| to reject |promise| with a "NotAllowedError" DOMException."
WebKit's implementation (CredentialRequestCoordinator.cpp:128–129) does two things wrong:
1. Rejects with `InvalidStateError` instead of `NotAllowedError`.
2. Rejects synchronously instead of queuing a task on the DOM manipulation task source.
Fix: replace the synchronous `promise.reject(ExceptionCode::InvalidStateError, ...)` with a queued task that rejects with `NotAllowedError`.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/174895437>