Skip to content

Commit d84b93e

Browse files
authored
Merge pull request #1019 from w3c/skipwaiting-fix
Change behavior of skipWaiting()
2 parents 2d3f068 + 669e786 commit d84b93e

File tree

4 files changed

+248
-290
lines changed

4 files changed

+248
-290
lines changed

docs/index.bs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -814,8 +814,6 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
814814
1. Let |promise| be a new <a>promise</a>.
815815
1. Run the following substeps <a>in parallel</a>:
816816
1. Set [=/service worker=]'s <a>skip waiting flag</a>.
817-
1. If [=/service worker=]'s <a>state</a> is *installed*, then:
818-
1. Run <a>Activate</a> algorithm passing [=/service worker=]'s [=service worker/registration=] as the argument.
819817
1. Resolve |promise| with undefined.
820818
1. Return |promise|.
821819
</section>
@@ -2589,13 +2587,10 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
25892587
1. Run the <a>Update Registration State</a> algorithm passing |registration|, "<code>installing</code>" and null as the arguments.
25902588
1. Run the <a>Update Worker State</a> algorithm passing |registration|'s <a>waiting worker</a> and *installed* as the arguments.
25912589
1. If |redundantWorker| is not null, run the <a>Update Worker State</a> algorithm passing |redundantWorker| and *redundant* as the arguments.
2592-
1. If |registration|'s <a>waiting worker</a>'s <a>skip waiting flag</a> is set, then:
2593-
1. Run <a>Activate</a> algorithm passing |registration| as the argument.
2594-
1. Invoke <a>Finish Job</a> with |job| and abort these steps.
25952590
1. Invoke <a>Finish Job</a> with |job|.
25962591
1. Wait for all the <a>tasks</a> <a lt="queue a task">queued</a> by <a>Update Worker State</a> invoked in this algorithm have executed.
25972592
1. Wait until no [=/service worker client=] is <a>using</a> |registration| or |registration|'s <a>waiting worker</a>'s <a>skip waiting flag</a> is set.
2598-
1. If |registration|'s <a>waiting worker</a> |waitingWorker| is not null and |waitingWorker|'s <a>skip waiting flag</a> is not set, invoke <a>Activate</a> algorithm with |registration| as its argument.
2593+
1. If |registration|'s <a>waiting worker</a> is not null, invoke <a>Activate</a> algorithm with |registration| as its argument.
25992594
</section>
26002595

26012596
<section algorithm>

0 commit comments

Comments
 (0)