Re: [w3c/ServiceWorker] postMessage keeps service workers alive indefinitely (#980)

I guess I would be happy to see the spec say something like:

1. The service worker has a `lifetime budget`.  When the budget is exhausted the service worker is killed even if there are pending extension promises.
2. The `lifetime budget` is updated per https://github.com/w3c/ServiceWorker/issues/980#issuecomment-248920422
3. The `lifetime budget` may also be dependent on the existence of a controlled client.  For example, if a FetchEvent grants a large/infinite budget, but then the user closes the requesting window, then the SW should have that infinite budget reduced.

We can leave the exact budget values as an implementation detail for now since it seems some tuning is still happening.

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

Received on Tuesday, 11 July 2017 15:48:20 UTC