Skip to content

Commit 9a74fc0

Browse files
Removing failed registrations (#1434)
* Removing failed registrations * Fixing ref
1 parent 7e17924 commit 9a74fc0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/index.bs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2575,7 +2575,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
25752575

25762576
Note: This will do nothing if [=Reject Job Promise=] was previously invoked with "{{SecurityError}}" {{DOMException}}.
25772577

2578-
1. If |newestWorker| is null, invoke <a>Clear Registration</a> algorithm passing |registration| as its argument.
2578+
1. If |newestWorker| is null, then [=map/remove=] [=scope to registration map=][|scopeURL|, [=URL serializer|serialized=]].
25792579
1. Invoke <a>Finish Job</a> with |job| and abort these steps.
25802580

25812581
Else, continue the rest of these steps after the algorithm's asynchronous completion, with |script| being the asynchronous completion value.
@@ -2592,7 +2592,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
25922592
1. Let |runResult| be the result of running the [=Run Service Worker=] algorithm with |worker| and |forceBypassCache|.
25932593
1. If |runResult| is *failure* or an [=abrupt completion=], then:
25942594
1. Invoke [=Reject Job Promise=] with |job| and `TypeError`.
2595-
1. If |newestWorker| is null, invoke [=Clear Registration=] algorithm passing |registration| as its argument.
2595+
1. If |newestWorker| is null, then [=map/remove=] [=scope to registration map=][|registration|'s [=service worker registration/scope url=], [[=URL serializer|serialized=]].
25962596
1. Invoke [=Finish Job=] with |job|.
25972597
1. Else, invoke [=Install=] algorithm with |job|, |worker|, and |registration| as its arguments.
25982598
</section>
@@ -2661,7 +2661,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
26612661
1. If |installFailed| is true, then:
26622662
1. Run the <a>Update Worker State</a> algorithm passing |registration|'s [=installing worker=] and "`redundant`" as the arguments.
26632663
1. Run the <a>Update Registration State</a> algorithm passing |registration|, "<code>installing</code>" and null as the arguments.
2664-
1. If |newestWorker| is null, invoke <a>Clear Registration</a> algorithm passing |registration| as its argument.
2664+
1. If |newestWorker| is null, then [=map/remove=] [=scope to registration map=][|registration|'s [=service worker registration/scope url=], [[=URL serializer|serialized=]].
26652665
1. Invoke <a>Finish Job</a> with |job| and abort these steps.
26662666
1. Let |map| be |registration|'s [=installing worker=]'s [=script resource map=].
26672667
1. Let |usedSet| be |registration|'s [=installing worker=]'s [=set of used scripts=].

docs/v1/index.bs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,7 +2397,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
23972397

23982398
Note: This will do nothing if [=Reject Job Promise=] was previously invoked with "{{SecurityError}}" {{DOMException}}.
23992399

2400-
1. If |newestWorker| is null, invoke <a>Clear Registration</a> algorithm passing |registration| as its argument.
2400+
1. If |newestWorker| is null, then [=map/remove=] [=scope to registration map=][|scopeURL|, [=URL serializer|serialized=]].
24012401
1. Invoke <a>Finish Job</a> with |job| and abort these steps.
24022402

24032403
Else, continue the rest of these steps after the algorithm's asynchronous completion, with |script| being the asynchronous completion value.
@@ -2414,7 +2414,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
24142414
1. Let |runResult| be the result of running the [=Run Service Worker=] algorithm with |worker| and |forceBypassCache|.
24152415
1. If |runResult| is *failure* or an [=abrupt completion=], then:
24162416
1. Invoke [=Reject Job Promise=] with |job| and `TypeError`.
2417-
1. If |newestWorker| is null, invoke [=Clear Registration=] algorithm passing |registration| as its argument.
2417+
1. If |newestWorker| is null, then [=map/remove=] [=scope to registration map=][|registration|'s [=service worker registration/scope url=], [[=URL serializer|serialized=]].
24182418
1. Invoke [=Finish Job=] with |job|.
24192419
1. Else, invoke [=Install=] algorithm with |job|, |worker|, and |registration| as its arguments.
24202420
</section>
@@ -2482,7 +2482,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
24822482
1. If |installFailed| is true, then:
24832483
1. Run the <a>Update Worker State</a> algorithm passing |registration|'s [=installing worker=] and "`redundant`" as the arguments.
24842484
1. Run the <a>Update Registration State</a> algorithm passing |registration|, "<code>installing</code>" and null as the arguments.
2485-
1. If |newestWorker| is null, invoke <a>Clear Registration</a> algorithm passing |registration| as its argument.
2485+
1. If |newestWorker| is null, then [=map/remove=] [=scope to registration map=][|registration|'s [=service worker registration/scope url=], [[=URL serializer|serialized=]].
24862486
1. Invoke <a>Finish Job</a> with |job| and abort these steps.
24872487
1. If |registration|'s <a>waiting worker</a> is not null, then:
24882488
1. [=Terminate Service Worker|Terminate=] |registration|'s [=waiting worker=].

0 commit comments

Comments
 (0)