Re: [w3c/ServiceWorker] Improve.ready and Activate (#1277)

jungkees commented on this pull request.



> -        1. Let |client| be the <a>context object</a>'s [=ServiceWorkerContainer/service worker client=].
-        1. Let |clientURL| be |client|'s <a>creation URL</a>.
-        1. Run the following substeps <a>in parallel</a>:
-            1. *CheckRegistration*: Let |registration| be the result of running <a>Match Service Worker Registration</a> algorithm with |clientURL|.
-            1. If |registration| is null, then:
-                1. Wait until <a>scope to registration map</a> has a new entry.
-                1. Jump to the step labeled *CheckRegistration*.
-            1. If |registration|'s <a>active worker</a> is null, wait until |registration|'s <a>active worker</a> changes.
-
-                Note: Implementers should consider this condition is met when the corresponding registration request gets to the step 6 of <a>Activate</a> algorithm.
-
-            1. Resolve <a>context object</a>'s [=ServiceWorkerContainer/ready promise=] with the {{ServiceWorkerRegistration}} object which represents |registration|.
-        1. Return <a>context object</a>'s [=ServiceWorkerContainer/ready promise=].
+        1. Let |readyPromise| be the [=context object=]'s [=ServiceWorkerContainer/ready promise=].
+        1. If |readyPromise| is pending, then:
+            1. Let |registration| be the result of running [=Match Service Worker Registration=] with the [=context object=]'s [=ServiceWorkerContainer/service worker client=]'s [=creation URL=].

Right. I made it run in parallel and queue a task to check out the ready promise.

-- 
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/1277#discussion_r167473811

Received on Monday, 12 February 2018 06:13:33 UTC