Skip to content

fix(webkit): do not lose in-memory cache storage records on navigation#41647

Closed
1chooo wants to merge 1 commit into
microsoft:mainfrom
1chooo:fix-41618
Closed

fix(webkit): do not lose in-memory cache storage records on navigation#41647
1chooo wants to merge 1 commit into
microsoft:mainfrom
1chooo:fix-41618

Conversation

@1chooo

@1chooo 1chooo commented Jul 6, 2026

Copy link
Copy Markdown

Summary

  • WebKit's CacheStorageManager closes caches once no web process references them (e.g. on the process swap during reload); close() clears the records assuming they can be re-read from disk. Ephemeral contexts use the in-memory store, so records were silently lost while the cache name survived.
  • Keep live in-memory caches open in CacheStorageManager::removeUnusedCache().
  • Add a regression test, marked fixme on WebKit until the next browser roll.

Fixes #41618

CacheStorageManager closes caches that are no longer referenced by any
web process connection, e.g. when the process is swapped on reload.
CacheStorageCache::close() clears the records assuming they can be read
back from disk, but ephemeral contexts use an in-memory store, so the
records were silently lost while the cache name survived in the registry.
Keep live in-memory caches open instead.

Fixes: microsoft#41618
@yury-s

yury-s commented Jul 8, 2026

Copy link
Copy Markdown
Member

The fix is changing core behavior which is not right, and it should be done in playwright-browser repo anyway.

@yury-s yury-s closed this Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] WebKit: Cache Storage entry silently lost across page.reload() (container survives, entry does not)

2 participants