Re: [w3c/ServiceWorker] Ensure the addRoutes() to be called within the install event (PR #1744)

Changes look good.
A few thoughts:
- Before resolving the promise, we need to queue a task to actually resolve the promise in the service worker thread.
- In theory, the in parallel steps could fail (say quota error), in which case the installation of the service worker would fail if we reject the addRoutes promise. One possibility would be to call `add lifetime promise` with another promise that gets resolved as soon as the addRoutes promise gets settled. This other promise would never be rejected.
- With this PR, addRoutes can only succeed if called synchronously in the install event handler (point 1 of above discussion). Wdyt about this point?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1744#issuecomment-2609127066
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/pull/1744/c2609127066@github.com>

Received on Thursday, 23 January 2025 08:17:35 UTC