Re: [w3c/ServiceWorker] Editorial: queue a task in NavigationPreloadManager (PR #1834)

@yoshisatoyanagisawa commented on this pull request.



> @@ -1026,7 +1029,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
             1. Let |state| be a new {{NavigationPreloadState}} dictionary.
             1. If |registration|'s [=navigation preload enabled flag=] is set, set |state|["{{NavigationPreloadState/enabled}}"] to true.
             1. Set |state|["{{NavigationPreloadState/headerValue}}"] to |registration|'s [=navigation preload header value=].
-            1. Resolve |promise| with |state|.
+            1. [=Queue a task=] on |promise|'s [=relevant settings object=]'s [=responsible event loop=], using the [=DOM manipulation task source=] to resolve |promise| with |state|.

I suggest to change other cases with this style.  I mean Queue a resolve/reject task and leave other parts without queue so that others are executed in parallel.  I assume |registration|'s flag flip is atomic operation, and we do not need queueing for reading/writing it.

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

Message ID: <w3c/ServiceWorker/pull/1834/review/4723723239@github.com>

Received on Friday, 17 July 2026 14:53:07 UTC