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. Create a new {{WorkerLocation}} object and associate it with |workerGlobalScope|.
2931
2937
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.
2932
2938
1. If |serviceWorker| is an <a>active worker</a>, and there are any <a>tasks</a> queued in |serviceWorker|'s <a>containing service worker registration</a>'s [=service worker registration/task queues=], <a lt="queue a task">queue</a> them to |serviceWorker|'s <a>event loop</a>'s [=/task queues=] in the same order using their original <a>task sources</a>.
2933
-
1. Let |evaluationStatus| be the result of <a lt="run a classic script">running the classic script</a> |script| if |script| is a <a>classic script</a>, otherwise, the result of <a lt="run a module script">running the module script</a> |script| if |script| is a [=module script=].
2934
-
1. If |evaluationStatus|.\[[Value]] is empty, this means the script was not evaluated. Set |startFailed| to true and abort these steps.
2939
+
1. Let |evaluationStatus| be null.
2940
+
1. If |script| is a [=classic script=], then:
2941
+
1. Set |evaluationStatus| to the result of [=run a classic script|running the classic script=] |script|.
2942
+
1. If |evaluationStatus|.\[[Value]] is empty, this means the script was not evaluated. Set |startFailed| to true and abort these steps.
2943
+
1. Otherwise, if |script| is a [=module script=], then:
2944
+
1. Let |evaluationPromise| be the result of [=run a module script|running the module script=] |script|, with report errors set to false.
2945
+
1. Assert: |evaluationPromise|.\[[PromiseState]] is not "pending".
2946
+
1. If |evaluationPromise|.\[[PromiseState]] is "rejected":
2947
+
1. Set |evaluationStatus| to [$ThrowCompletion$](|evaluationPromise|.\[[PromiseResult]]).
2948
+
1. Otherwise:
2949
+
1. Set |evaluationStatus| to [$NormalCompletion$](undefined).
2935
2950
1. If the script was aborted by the [=Terminate Service Worker=] algorithm, set |startFailed| to true and abort these steps.
2936
2951
1. Set |serviceWorker|'s [=start status=] to |evaluationStatus|.
2937
2952
1. If |script|'s <a>has ever been evaluated flag</a> is unset, then:
Note: When an exception is [=throw|thrown=], the implementation does undo (roll back) any changes made to the cache storage during the batch operation job.
1. If |record| is not a [=Cyclic Module Record=], then:
3624
+
1. Return false.
3625
+
1. If |record|.\[[Async]] is true, then:
3626
+
1. Return true.
3627
+
1. [=list/For each=] string |requested| of |record|.\[[RequestedModules]]:
3628
+
1. Let |url| be the result of [=resolve a module specifier|resolving a module specifier=] given |base| and |requested|.
3629
+
1. Assert: |url| is never failure, because [=resolve a module specifier|resolving a module specifier=] must have been previously successful with these same two arguments.
3630
+
1. If |seen| does not [=set/contain=] |url|, then:
3631
+
1. [=set/Append=] |url| to |seen|.
3632
+
1. If |moduleMap|[|url|] does not have a [=script/record=], then:
3633
+
1. Return false.
3634
+
1. If [=Is Async Module=] for |moduleMap|[|url|]'s [=script/record=], |moduleMap|, |base|, and |seen| is true, then:
0 commit comments