Re: [w3c/ServiceWorker] Editorial: Queue a task to resolve/reject promise or when fire an event. (PR #1755)

@yoshisatoyanagisawa commented on this pull request.



> @@ -1384,8 +1388,8 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
             1. For each [=/service worker client=] |client| where the result of running [=obtain a storage key=] given |client| [=storage key/equals=] the associated [=ServiceWorkerGlobalScope/service worker=]'s [=containing service worker registration=]'s [=service worker registration/storage key=]:
                 1. If |client|'s [=environment/id=] is not |id|, [=continue=].
                 1. Wait for either |client|'s [=environment/execution ready flag=] to be set or for |client|'s [=discarded flag=] to be set.
-                1. If |client|'s [=environment/execution ready flag=] is set, then invoke [=Resolve Get Client Promise=] with |client| and |promise|, and abort these steps.
-            1. Resolve |promise| with undefined.
+                1. If |client|'s [=environment/execution ready flag=] is set, [=queue a task=] on |promise|'s [=relevant settings object=]'s [=responsible event loop=], using the [=DOM manipulation task source=], to invoke [=Resolve Get Client Promise=] with |client| and |promise|, and abort these steps.
+            1. [=Queue a task=] to resolve |promise| with undefined.

For Client API, it might affect not only service worker but also clients.  Do we need a parallel queue that covers both instead of the event loop for ServiceWorker itself?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1755#discussion_r1957647038
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/pull/1755/review/2620076583@github.com>

Received on Monday, 17 February 2025 05:43:46 UTC