- From: Jungkee Song <notifications@github.com>
- Date: Wed, 09 Aug 2017 00:09:52 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 9 August 2017 07:10:13 UTC
The current spec text > A user agent must maintain a separate job queue for each service worker registration keyed by its scope url. didn't mean to say a job queue is owned by a service worker registration. But I agree it'd clarify it if we introduced a scope-to-job-queue map rather than kept a prose like the above. And that's also what browsers implemented already. Re: the creation time of a map, I think we can just say a user agent has a scope-to-job-queue map though. It seems Chromium creates one when a ServiceWorkerContextCore is created, and Gecko creates one lazily (GetOrCreate style) when the first register job is triggered. I think it depends on implementations. > A per-origin map keyed on scope is enough for now. I understand what Gecko implemented. But I don't think we need to explicitly say it's *per-origin* map. Just *scope-to-job-queue map* should be fine, right? > unordered map. I think we can spec that in infra if it's needed. But I don't think we should specify it should be ordered or unordered. Chromium current uses std::map for example. I guess an unordered_map seems a better fit though. -- 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/issues/1180#issuecomment-321172637
Received on Wednesday, 9 August 2017 07:10:13 UTC