[w3c/ServiceWorker] InstallEvent.addRoutes is resolving/rejecting the returned promise synchronously (Issue #1742)

addRoutes currently returns a promise without using the ability to resolve/reject the promise asynchronously.
Looking at Chromium implementation, it seems that the promise is resolved asynchronously (probably after storing the route out of process).

The spec could be written as follows:
1. Validate parameters synchronously, reject as needed (like current spec)
2. If parameters are valid, In parallel, try storing the new route
3. If storing the route fails, queue a task to reject the promise
4. Otherwise, queue a task to resolve the promise

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1742
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/issues/1742@github.com>

Received on Tuesday, 21 January 2025 07:56:18 UTC