Re: [w3c/ServiceWorker] Clients.get: block on reserved clients. (#1323)

mattto commented on this pull request.



> @@ -222,6 +222,13 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
 
     A <dfn export id="dfn-service-worker-client" for="">service worker client</dfn> is an [=environment=].
 
+    A [=/service worker client=] has an associated <dfn export>discarded flag</dfn>. It is initially unset.
+
+   Each [=/service worker client=] has the following [=environment discarding steps=]:
+        1. Set |client|'s [=discarded flag=].
+
+    Note: Implementations can discard clients whose [=discarded flag=] is set.

@jungkees I think implementations would resolve any open clients.get(id) promise with undefined, then completely forget about that id. If clients.get(id) were called again, it would resolve with undefined immediately because the id wouldn't be found. So they don't need to keep state of the client around. The flag is just to make the spec algorithm work.

Sounds like I should just remove the note.

-- 
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/1323#discussion_r195253415

Received on Wednesday, 13 June 2018 22:19:03 UTC