Re: [w3c/ServiceWorker] Check for Run Service Worker failure and disallow starting redundant workers. (#1419)

jakearchibald commented on this pull request.



>  
+      <div class="note">
+        Note: This algorithm typically blocks until the service worker is [=running=]. Most callsites can check for success or failure by checking if the service worker is [=running=] after this algorithm returns.
+
+        This specification generally treats an [=abrupt completion=] due to an uncaught exception the same as a normal completion. That is, if the worker throws an exception during initial script evaluation, it is still considering running and can receive events. Some callsites distinguish between these scenarios by examining the [=start status=] of the [=running=] worker.

Would it be cleaner to return *failure* or the start status from this algorithm?

That means callers could use

1. If the result of invoking [=Run Service Worker=] with |someServiceWorker| is *failure*, then return.

Or:

1. If the result of invoking [=Run Service Worker=] with |someServiceWorker| is *failure* or an [=abrupt completion=], then….



-- 
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/pull/1419#pullrequestreview-247011906

Received on Friday, 7 June 2019 10:02:03 UTC