Bug 318414
| Summary: | Digital Credentials: a pending "wait" request is not aborted when its requesting document becomes non-fully-active | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Marcos Caceres <marcosc> |
| Component: | WebDriver | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bburg, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 26 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 268516 | ||
Marcos Caceres
The Digital Credentials specification's "request a digital credential" algorithm requires that if the requesting document stops being fully active, the credential request is aborted with an AbortError DOMException (w3c-fedid.github.io/digital-credentials/, "If document stops being fully active, abort the credential request with an AbortError").
WebKit does not abort a request that is parked pending when the requesting document — such as a subframe — becomes non-fully-active (e.g. the iframe is removed or navigated). The promise is left unsettled indefinitely.
This is observable with the virtual-wallet "wait" behavior used for automated testing: a pending request in a subframe that is then removed never settles. WebPageProxy::abortPendingDigitalCredentialWaitHandlers currently fires only on page close, page reset, and chooser dismissal — not when a subframe's document becomes non-fully-active.
A WPT regression test (digital-credentials/wait-non-fully-active.https.html) times out because of this; it should be landed together with the fix.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/181201101>
Marcos Caceres
Fixed by 319421@main. A pending request now belongs to a per-document DigitalCredentialsSession, so when the requesting document is stopped the session rejects the promise with an AbortError instead of leaving it unsettled indefinitely.
digital-credentials/get-non-fully-active.https.html covers the rejection directly — its second subtest, "Promise rejects with DOMException when the document becomes non-fully active", now passes. digital-credentials/concurrent-requests.https.html separately covers the coordinator returning to idle: it parks a "wait" request in a subframe, removes the subframe, then requires a subsequent top-level request to be served.