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

"Keeping the worker alive" is a browser implementation detail, no?  The whole grace timer mechanism just falls into the spec's "browser can kill the worker whenever it wants" language.

In FF we currently avoid this by conveniently not setting self.registration.active, etc.  So its impossible to self `postMessage()` right now.  When we implement that, though, I was planning to just inspect the source of the message event.  If it was the same worker that was being posted to, then we would not increment the keep-alive reference count.

-- 
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-248623891

Received on Wednesday, 21 September 2016 14:11:47 UTC