You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a follow-up of the decision to not expose the reserved client, this change
added a filter exclude discarded client. This change also removes the
unnecessary branch that checks whether the environment's creation URL is
trustworthy as now we're dealing with only the clients that are execution ready.
(i.e. the clients must be an environment settings object at least.)
Related issue: #1245.
1. For each [=/service worker client=] |client| whose [=service worker client/origin=] is the [=same origin|same=] as the associated [=ServiceWorkerGlobalScope/service worker=]'s [=environment settings object/origin=]:
1184
-
1. If |client| is an [=environment settings object=], then:
1185
-
1. If |client| is not a [=secure context=], [=continue=].
1186
-
1. Else:
1187
-
1. If |client|’s [=creation URL=] is not a [=potentially trustworthy URL=], [=continue=].
1184
+
1. If |client|'s [=environment/execution ready flag=] is unset or |client|'s [=discarded flag=] is set, [=continue=].
1185
+
1. If |client| is not a [=secure context=], [=continue=].
1188
1186
1. If |options|["{{ClientQueryOptions/includeUncontrolled}}"] is false, and if |client|'s [=active service worker=] is not the associated [=ServiceWorkerGlobalScope/service worker=], [=continue=].
1189
-
1. If |client|'s [=environment/execution ready flag=] is unset, [=continue=].
1. For each [=/service worker client=] |client| whose [=service worker client/origin=] is the <a lt="same origin">same</a> as the [=ServiceWorkerGlobalScope/service worker=]'s [=environment settings object/origin=]:
1269
-
1. If |client| is an [=environment settings object=], then:
1270
-
1. If |client| is not a <a>secure context</a>, continue to the next iteration of the loop.
1271
-
1. Else:
1272
-
1. If |client|’s <a>creation URL</a> is not a <a>potentially trustworthy URL</a>, continue to the next iteration of the loop.
1266
+
1. If |client|'s [=environment/execution ready flag=] is unset or |client|'s [=discarded flag=] is set, [=continue=].
1267
+
1. If |client| is not a [=secure context=], [=continue=].
1273
1268
1. Let |registration| be the result of running <a>Match Service Worker Registration</a> algorithm passing |client|'s <a>creation URL</a> as the argument.
1274
-
1. If |registration| is not the [=ServiceWorkerGlobalScope/service worker=]'s <a>containing service worker registration</a>, continue to the next iteration of the loop.
1269
+
1. If |registration| is not the [=ServiceWorkerGlobalScope/service worker=]'s <a>containing service worker registration</a>, [=continue=].
1275
1270
1. If |client|'s <a>active service worker</a> is not the [=ServiceWorkerGlobalScope/service worker=], then:
1276
1271
1. Invoke <a>Handle Service Worker Client Unload</a> with |client| as the argument.
1277
1272
1. Set |client|'s <a>active service worker</a> to [=ServiceWorkerGlobalScope/service worker=].
1. For each [=/service worker client=] |client| whose [=service worker client/origin=] is the [=same origin|same=] as the associated [=ServiceWorkerGlobalScope/service worker=]'s [=environment settings object/origin=]:
1122
-
1. If |client| is an [=environment settings object=], then:
1123
-
1. If |client| is not a [=secure context=], [=continue=].
1124
-
1. Else:
1125
-
1. If |client|’s [=creation URL=] is not a [=potentially trustworthy URL=], [=continue=].
1122
+
1. If |client|'s [=environment/execution ready flag=] is unset or |client|'s [=discarded flag=] is set, [=continue=].
1123
+
1. If |client| is not a [=secure context=], [=continue=].
1126
1124
1. If |options|["{{ClientQueryOptions/includeUncontrolled}}"] is false, and if |client|'s [=active service worker=] is not the associated [=ServiceWorkerGlobalScope/service worker=], [=continue=].
1127
-
1. If |client|'s [=environment/execution ready flag=] is unset, [=continue=].
1. For each [=/service worker client=] |client| whose [=service worker client/origin=] is the <a lt="same origin">same</a> as the [=ServiceWorkerGlobalScope/service worker=]'s [=environment settings object/origin=]:
1207
-
1. If |client| is an [=environment settings object=], then:
1208
-
1. If |client| is not a <a>secure context</a>, continue to the next iteration of the loop.
1209
-
1. Else:
1210
-
1. If |client|’s <a>creation URL</a> is not a <a>potentially trustworthy URL</a>, continue to the next iteration of the loop.
1204
+
1. If |client|'s [=environment/execution ready flag=] is unset or |client|'s [=discarded flag=] is set, [=continue=].
1205
+
1. If |client| is not a [=secure context=], [=continue=].
1211
1206
1. Let |registration| be the result of running <a>Match Service Worker Registration</a> algorithm passing |client|'s <a>creation URL</a> as the argument.
1212
-
1. If |registration| is not the [=ServiceWorkerGlobalScope/service worker=]'s <a>containing service worker registration</a>, continue to the next iteration of the loop.
1207
+
1. If |registration| is not the [=ServiceWorkerGlobalScope/service worker=]'s <a>containing service worker registration</a>, [=continue=].
1213
1208
1. If |client|'s <a>active service worker</a> is not the [=ServiceWorkerGlobalScope/service worker=], then:
1214
1209
1. Invoke <a>Handle Service Worker Client Unload</a> with |client| as the argument.
1215
1210
1. Set |client|'s <a>active service worker</a> to [=ServiceWorkerGlobalScope/service worker=].
0 commit comments