<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>322092</bug_id>
          
          <creation_ts>2026-08-19 00:40:06 -0700</creation_ts>
          <short_desc>Digital Credentials: coordinator can be left permanently in the Requesting state if the session stops during construction</short_desc>
          <delta_ts>2026-08-20 20:04:04 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>268516</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Marcos Caceres">marcosc</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2241720</commentid>
    <comment_count>0</comment_count>
    <who name="Marcos Caceres">marcosc</who>
    <bug_when>2026-08-19 00:40:06 -0700</bug_when>
    <thetext>CredentialRequestCoordinator::prepareCredentialRequests sets the interaction state to Requesting, then creates a DigitalCredentialsSession, and only assigns m_activeSession after create() returns.

DigitalCredentialsSession::create() calls suspendIfNeeded(). If the requesting context is already stopped, ScriptExecutionContext::suspendActiveDOMObjectIfNeeded calls the session&apos;s stop() during construction. stop() calls abandon(), which calls CredentialRequestCoordinator::sessionDidFinish(). That early-returns because m_activeSession does not yet point at this session, so the state is never returned to Idle. Control then returns to prepareCredentialRequests, which assigns m_activeSession to a session that has already finished.

The coordinator is per-Page, so the result is that the page is left in the Requesting state permanently and every subsequent navigator.credentials.get() on it rejects with NotAllowedError for the lifetime of the page.

Reachability is not established. CredentialsContainer::get rejects with InvalidStateError when the document is not fully active, before the coordinator is reached, and I could not construct a document that is stopped but still fully active. The ordering is wrong regardless of whether web content can currently reach it.

Found by two independent code reviews of the change that landed as 319421@main.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2241721</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-08-19 00:40:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/185291471&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>