<?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>309386</bug_id>
          
          <creation_ts>2026-03-06 15:00:25 -0800</creation_ts>
          <short_desc>[IndexedDB] Recover IndexedDB connections after network process crash without page reload</short_desc>
          <delta_ts>2026-03-30 07:21:48 -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>Safari 26</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brandon">brandonstewart</reporter>
          <assigned_to name="Brandon">brandonstewart</assigned_to>
          <cc>joshkel</cc>
    
    <cc>lincolnbaxter</cc>
    
    <cc>nisala</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2187915</commentid>
    <comment_count>0</comment_count>
    <who name="Brandon">brandonstewart</who>
    <bug_when>2026-03-06 15:00:25 -0800</bug_when>
    <thetext>When the NetworkProcess crashes, IndexedDB becomes permanently broken for the
lifetime of the page. Documents and workers cache an IDBConnectionProxy pointing                                                                                                            
to a dead IDBConnectionToServer (m_serverConnectionIsValid == false), and the                                                                                                             
DOMWindowIndexedDatabase/WorkerGlobalScopeIndexedDatabase supplements cache an
IDBFactory bound to that dead proxy. New indexedDB.open() calls fail with
&quot;Connection to Indexed Database server lost&quot; until the page is reloaded.

Fix this by clearing the stale proxy caches when the network process connection
is lost:

- Document::clearIDBConnectionProxy() nulls m_idbConnectionProxy so the next
  idbConnectionProxy() call lazily fetches a fresh proxy from Page::idbConnection(),
  and removes the DOMWindowIndexedDatabase supplement so the IDBFactory is recreated.

- Page::clearIDBConnectionOnAllDocuments() clears the page-level IDBConnectionToServer
  and all document proxies.

- For workers, Page::refreshIDBConnectionForWorkers() creates a new IDBConnectionToServer
  and distributes its proxy to all worker threads via
  WorkerGlobalScope::replaceIDBConnectionProxyOnAllWorkers(), which iterates
  allWorkerGlobalScopeIdentifiers and posts a task to each worker to replace its
  cached proxy and remove its WorkerGlobalScopeIndexedDatabase supplement.

- NetworkProcessConnection::didClose() calls refreshIDBConnectionForWorkers() after
  connectionToServerLost() finishes tearing down the old connection, so workers
  receive the new proxy after all error notifications from the old connection.

- Supplementable::removeSupplement() is added to support clearing cached supplements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2187916</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-03-06 15:00:32 -0800</bug_when>
    <thetext>&lt;rdar://problem/171932720&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2187920</commentid>
    <comment_count>2</comment_count>
    <who name="Brandon">brandonstewart</who>
    <bug_when>2026-03-06 15:03:49 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/60094</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2188987</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-03-10 21:36:37 -0700</bug_when>
    <thetext>Committed 309032@main (3c147a650200): &lt;https://commits.webkit.org/309032@main&gt;

Reviewed commits have been landed. Closing PR #60094 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2191207</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-03-17 18:46:11 -0700</bug_when>
    <thetext>Committed 305413.508@safari-7624-branch (cc2e57e63f48): &lt;https://commits.webkit.org/305413.508@safari-7624-branch&gt;

Reviewed commits have been landed. Closing PR #4665 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2194404</commentid>
    <comment_count>5</comment_count>
    <who name="Sihui Liu">sihui_liu</who>
    <bug_when>2026-03-27 11:31:10 -0700</bug_when>
    <thetext>*** Bug 277615 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2195157</commentid>
    <comment_count>6</comment_count>
    <who name="Lincoln Baxter, III">lincolnbaxter</who>
    <bug_when>2026-03-30 07:21:00 -0700</bug_when>
    <thetext>THANK YOU. IT&apos;S BEEN YEARS. Looking forward to the release. Very happy to see regression tests added :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2195158</commentid>
    <comment_count>7</comment_count>
    <who name="Lincoln Baxter, III">lincolnbaxter</who>
    <bug_when>2026-03-30 07:21:48 -0700</bug_when>
    <thetext>Brandon is a hero.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>