- From: Ben Kelly <notifications@github.com>
- Date: Fri, 14 Jan 2022 14:03:56 -0800
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/ServiceWorker/pull/1526/review/853419020@github.com>
@wanderview commented on this pull request.
> @@ -615,7 +631,9 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
The <dfn method for="ServiceWorkerRegistration"><code>unregister()</code></dfn> method steps are:
1. Let |promise| be [=a new promise=].
- 1. Let |job| be the result of running [=Create Job=] with *unregister*, the [=service worker registration/scope url=] of the [=ServiceWorkerRegistration/service worker registration=], null, |promise|, and [=this=]'s <a>relevant settings object</a>.
+ 1. Let |newestWorker| be the result of running <a>Get Newest Worker</a> algorithm passing |registration| as its argument.
+ 1. If |newestWorker| is null, return [=a promise rejected with=] an "{{InvalidStateError}}" {{DOMException}} and abort these steps.
I don't think we can just resolve the promise here because it leaves the registration object in the map.
That being said, though, I don't see why we need `|newestWorker|` here at all. I think I was previously trying to get the scope from it to pass to the unregister job, but I don't think we need it. I'm going to remove the `|newerWorker|` stuff here.
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1526#discussion_r785196626
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/ServiceWorker/pull/1526/review/853419020@github.com>
Received on Friday, 14 January 2022 22:04:08 UTC