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

@yoshisatoyanagisawa commented on this pull request.



> @@ -809,8 +809,9 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
         1. Let |promise| be a new <a>promise</a>.
         1. Run the following substeps <a>in parallel</a>:
             1. Let |registration| be the result of running <a>Match Service Worker Registration</a> given |storage key| and |clientURL|.

I am trying to understand the algorithm and just a question but, why you want to run "Let |registration| ..." step in parallel?
If it is within a queue, once |registration| is not null, it should be kept on non-null.  However, the current algorithm put it outside, during race condition, |promise| may be resolved undefined even after |promise| is resolved with the result.

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

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

Received on Monday, 17 February 2025 01:38:27 UTC