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
1. Invoke [=Resolve Job Promise=] with |job| and |registration|.
2723
2728
1. Invoke [=Finish Job=] with |job| and abort these steps.
2724
2729
1. Let |worker| be a new [=/service worker=].
2725
-
1. Set |worker|'s [=service worker/script url=] to |job|'s [=job/script url=], |worker|'s [=script resource=] to |script|, |worker|'s [=service worker/type=] to |job|'s [=worker type=], and |worker|'s [=script resource map=] to |updatedResourceMap|.
2730
+
1. Set |worker|'s [=service worker/script url=] to |job|'s [=job/script url=], |worker|'s [=script resource=] to |script|, |worker|'s [=service worker/type=] to |job|'s [=worker type=], |worker|'s [=script resource map=] to |updatedResourceMap|, and |worker|'s [=service worker/embedder policy=] to |embedderPolicy|.
2726
2731
1. Append |url| to |worker|'s [=set of used scripts=].
2727
2732
1. Set |worker|'s <a>script resource</a>'s [=script resource/policy container=] to |policyContainer|.
2728
2733
1. Let |forceBypassCache| be true if |job|'s [=job/force bypass cache flag=] is set, and false otherwise.
1. Let |script| be |serviceWorker|'s [=service worker/script resource=].
2902
2907
1. Assert: |script| is not null.
2903
2908
1. Let |startFailed| be false.
2904
-
1. Let |agent| be the result of [=obtain a service worker agent|obtaining a service worker agent=], and run the following steps in that context:
2909
+
1. Let |agent| be the result of [=obtain a service worker agent|obtaining a service worker agent=].
2910
+
1. If |serviceWorker|'s [=service worker/embedder policy=]'s [=embedder policy/value=] is `"require-corp"`, set |agent|'s agent cluster's [=agent cluster/cross-origin isolation mode=] to `"logical"` or `"concrete"`. The one chosen is [=implementation-defined=].
2911
+
1. Run the following steps in |agent|:
2905
2912
1. Let |realmExecutionContext| be the result of [=create a new JavaScript realm|creating a new JavaScript realm=] given |agent| and the following customizations:
2906
2913
* For the global object, create a new {{ServiceWorkerGlobalScope}} object. Let |workerGlobalScope| be the created object.
2907
2914
1. Set |serviceWorker|'s [=service worker/global object=] to |workerGlobalScope|.
1. Set |workerGlobalScope|'s [=WorkerGlobalScope/url=] to |serviceWorker|'s [=service worker/script url=].
2925
2932
1. Set |workerGlobalScope|'s [=WorkerGlobalScope/policy container=] to |serviceWorker|'s <a>script resource</a>'s [=script resource/policy container=].
2926
2933
1. Set |workerGlobalScope|'s [=WorkerGlobalScope/type=] to |serviceWorker|'s [=service worker/type=].
2934
+
1. Set |workerGlobalScope|'s [=WorkerGlobalScope/embedder policy=] to |serviceWorker|'s [=service worker/embedder policy=].
2935
+
1. Set |workerGlobalScope|'s [=WorkerGlobalScope/cross-origin isolated capability=] to true if |agent|'s agent cluster's [=agent cluster/cross-origin isolation mode=] is `"concrete"`.
2927
2936
1. Set |workerGlobalScope|'s [=ServiceWorkerGlobalScope/force bypass cache for import scripts flag=] if |forceBypassCache| is true.
2928
2937
1. Create a new {{WorkerLocation}} object and associate it with |workerGlobalScope|.
2929
2938
1. If the <a>run CSP initialization for a global object</a> algorithm returns "<code>Blocked</code>" when executed upon |workerGlobalScope|, set |startFailed| to true and abort these steps.
0 commit comments