Bug 313736
| Summary: | Digital Credentials: reject and resolve paths must queue a global task per spec | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Marcos Caceres <marcosc> |
| Component: | WebCore Misc. | Assignee: | Marcos Caceres <marcosc> |
| Status: | RESOLVED FIXED | ||
| 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
The spec's "reject the credential request with" algorithm (https://w3c-fedid.github.io/digital-credentials/#reject-the-credential-request) requires:
"Queue a global task on the DOM manipulation task source given |promise|'s relevant global object to perform the following steps:
- [cleanup abort signal/algorithm]
- Reject |promise| with |error|
- Set active promise to null
- Set interaction state to idle"
Similarly, the success path in "initiate the credential request" (step 3e.iii) also requires:
"Queue a global task on the DOM manipulation task source given |document|'s relevant global object to perform the following steps:
- [parse JSON, create DigitalCredential, resolve promise]
- Set active promise to null
- Set interaction state to idle"
WebKit's dismissPickerAndSettle() does not queue a global task — it runs the rejection/resolution inside the dismissDigitalCredentialsPicker completion callback. Similarly, the success path in handleDigitalCredentialsPickerResult resolves synchronously.
Both paths need to be restructured to queue a global task on the DOM manipulation task source.
Note: Bug 311790 covers the specific case of the non-idle rejection in "prepare credential requests" step 2. This bug is broader — it covers the shared reject algorithm and the success path, which are used by all error and success code paths.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Marcos Caceres
<rdar://problem/174308268>
Marcos Caceres
Pull request: https://github.com/WebKit/WebKit/pull/64153
Marcos Caceres
Pull request: https://github.com/WebKit/WebKit/pull/69509
Marcos Caceres
<rdar://problem/182678875>
EWS
Committed 319421@main (04257c5b7055): <https://commits.webkit.org/319421@main>
Reviewed commits have been landed. Closing PR #69509 and removing active labels.