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. Set |workerGlobalScope|'s [=ServiceWorkerGlobalScope/force bypass cache for import scripts flag=] if |forceBypassCache| is true.
2874
2876
1. Create a new {{WorkerLocation}} object and associate it with |workerGlobalScope|.
2875
2877
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>.
2876
-
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=].
2877
-
1. If |evaluationStatus|.\[[Value]] is empty, this means the script was not evaluated. Set |startFailed| to true and abort these steps.
2878
+
1. Let |evaluationStatus| be null.
2879
+
1. If |script| is a <a>classic script</a>, then:
2880
+
1. Set |evaluationStatus| to the result of <a lt="run a classic script">running the classic script</a> |script|.
2881
+
1. If |evaluationStatus|.\[[Value]] is empty, this means the script was not evaluated. Set |startFailed| to true and abort these steps.
2882
+
1. Otherwise, if |script| is a [=module script=], then:
2883
+
1. Let |evaluationPromise| be the result of <a lt="run a module script">running the module script</a> |script|, with report errors set to false.
2884
+
1. If |evaluationPromise|.\[[PromiseState]] is "fulfilled":
2885
+
1. Set |evaluationStatus| to [$NormalCompletion$](|evaluationPromise|.\[[PromiseResult]]).
2886
+
1. Otherwise, if |evaluationPromise|.\[[PromiseState]] is "rejected":
2887
+
1. Set |startFailed| to true and abort these steps.
2888
+
1. Otherwise:
2889
+
1. Assert: |evaluationPromise|.\[[PromiseState]] is "pending".
2890
+
1. Set |evaluationStatus| to [$NormalCompletion$](undefined).
2891
+
1. [=Upon rejection=] of |evaluationPromise| with |reason|:
2892
+
1. [=Report the exception=] given by |reason| for |script|.
2878
2893
1. If the script was aborted by the [=Terminate Service Worker=] algorithm, set |startFailed| to true and abort these steps.
2879
2894
1. Set |serviceWorker|'s [=start status=] to |evaluationStatus|.
2880
2895
1. If |script|'s <a>has ever been evaluated flag</a> is unset, then:
0 commit comments