- From: Monica Chintala <notifications@github.com>
- Date: Thu, 16 Jul 2026 14:06:18 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/ServiceWorker/pull/1838@github.com>
Updates to [cache-storage-match](https://w3c.github.io/ServiceWorker/#dom-cachestorage-match), [cache-storage-has](https://w3c.github.io/ServiceWorker/#dom-cachestorage-has), [cache-storage-open](https://w3c.github.io/ServiceWorker/#dom-cachestorage-open), [cache-storage-delete](https://w3c.github.io/ServiceWorker/#dom-cachestorage-delete), and [cache-storage-keys](https://w3c.github.io/ServiceWorker/#dom-cachestorage-keys).
Two issues addressed:
1. **Data race on the shared name-to-cache map.** Multiple `CacheStorage` objects across documents/workers share the same underlying map, so ad-hoc "in parallel" blocks that iterate and mutate the map could race. Introduce a dedicated `name to cache map parallel queue` on the map and route all five methods through it so reads and writes are serialized.
2. **Promise resolution from parallel context.** Each method resolved/rejected its promise directly from the parallel block. Wrap the resolves/rejects in a `Queue a task` on the promise's responsible event loop.
This is part 6/6 of #1740. Also closes #1831 (duplicate). Split out from #1755 for focused review.
<!--
This comment and the below content is programmatically generated.
You may add a comma-separated list of anchors you'd like a
direct link to below (e.g. #idl-serializers, #idl-sequence):
Don't remove this comment or modify anything below this line.
If you don't want a preview generated for this pull request,
just replace the whole of this comment's content by "no preview"
and remove what's below.
-->
***
<a href="https://pr-preview.s3.amazonaws.com/monica-ch/ServiceWorker/pull/1838.html" title="Last updated on Jul 16, 2026, 9:06 PM UTC (5b4781e)">Preview</a> | <a href="https://pr-preview.s3.amazonaws.com/w3c/ServiceWorker/1838/e91ddff...monica-ch:5b4781e.html" title="Last updated on Jul 16, 2026, 9:06 PM UTC (5b4781e)">Diff</a>
You can view, comment on, or merge this pull request online at:
https://github.com/w3c/ServiceWorker/pull/1838
-- Commit Summary --
* Editorial: serialize CacheStorage access on the name to cache map's parallel queue
-- File Changes --
M index.bs (42)
-- Patch Links --
https://github.com/w3c/ServiceWorker/pull/1838.patch
https://github.com/w3c/ServiceWorker/pull/1838.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1838
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/ServiceWorker/pull/1838@github.com>
Received on Thursday, 16 July 2026 21:06:23 UTC