@@ -97436,8 +97436,7 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
97436
97436
97437
97437
<p class="note">In addition to the usual possibilities of returning a value or failing due to
97438
97438
an exception, this could be <span data-x="abort a running script">prematurely aborted</span> by
97439
- the "<span>kill a worker</span>" or "<span>terminate a worker</span>" algorithms defined
97440
- below.</p>
97439
+ the <span>terminate a worker</span> algorithm defined below.</p>
97441
97440
</li>
97442
97441
97443
97442
<li><p>Enable <var>outside port</var>'s <span>port message queue</span>.</p></li>
@@ -97466,8 +97465,8 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
97466
97465
97467
97466
<p class="note">The handling of events or the execution of callbacks by <span
97468
97467
data-x="concept-task">tasks</span> run by the <span>event loop</span> might get <span
97469
- data-x="abort a running script">prematurely aborted</span> by the " <span>kill a worker</span>"
97470
- or "<span>terminate a worker</span>" algorithms defined below.</p>
97468
+ data-x="abort a running script">prematurely aborted</span> by the <span>terminate a
97469
+ worker</span> algorithm defined below.</p>
97471
97470
97472
97471
<p class="note">The worker processing model remains on this step until the event loop is
97473
97472
destroyed, which happens after the <span data-x="dom-WorkerGlobalScope-closing">closing</span>
@@ -97499,33 +97498,6 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
97499
97498
97500
97499
<hr>
97501
97500
97502
- <p>When a user agent is to <dfn data-export="">kill a worker</dfn> it must run the following steps
97503
- <span>in parallel</span> with the worker's main loop (the "<span>run a worker</span>" processing
97504
- model defined above):</p>
97505
-
97506
- <ol>
97507
-
97508
- <li><p>Set the worker's <code>WorkerGlobalScope</code> object's <span
97509
- data-x="dom-WorkerGlobalScope-closing">closing</span> flag to true.</p></li>
97510
-
97511
- <li><p>If there are any <span data-x="concept-task">tasks</span> queued in the
97512
- <code>WorkerGlobalScope</code> object's <span>event loop</span>'s <span data-x="task queue">task
97513
- queues</span>, discard them without processing them.</p></li>
97514
-
97515
- <li><p>Wait a user-agent-defined amount of time.</p></li>
97516
-
97517
- <li><p><span data-x="abort a running script">Abort the script</span> currently running in the
97518
- worker.</p></li>
97519
-
97520
- </ol>
97521
-
97522
- <p>User agents may invoke the "<span>kill a worker</span>" processing model on a worker at any
97523
- time, e.g. in response to user requests, in response to CPU quota management, or when a worker
97524
- stops being an <span>active needed worker</span> if the worker continues executing even after its
97525
- <span data-x="dom-WorkerGlobalScope-closing">closing</span> flag was set to true.</p>
97526
-
97527
- <hr>
97528
-
97529
97501
<p>When a user agent is to <dfn data-export="">terminate a worker</dfn> it must run the following
97530
97502
steps <span>in parallel</span> with the worker's main loop (the "<span>run a worker</span>"
97531
97503
processing model defined above):</p>
@@ -97549,6 +97521,10 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
97549
97521
97550
97522
</ol>
97551
97523
97524
+ <p>User agents may invoke the <span>terminate a worker</span> algorithm when a worker stops being
97525
+ an <span>active needed worker</span> and the worker continues executing even after its <span
97526
+ data-x="dom-WorkerGlobalScope-closing">closing</span> flag was set to true.</p>
97527
+
97552
97528
<hr>
97553
97529
97554
97530
<p>The <span>task source</span> for the tasks mentioned above is the <span>DOM manipulation task
@@ -97788,9 +97764,9 @@ enum <dfn>WorkerType</dfn> { "classic", "module" };
97788
97764
97789
97765
<div w-nodev>
97790
97766
97791
- <p>The <dfn><code data-x="dom-Worker-terminate">terminate()</code></dfn> method, when invoked, must
97792
- cause the " <span>terminate a worker</span>" algorithm to be run on the worker with which the object
97793
- is associated.</p>
97767
+ <p>The <dfn><code data-x="dom-Worker-terminate">terminate()</code></dfn> method, when invoked,
97768
+ must cause the <span>terminate a worker</span> algorithm to be run on the worker with which the
97769
+ object is associated.</p>
97794
97770
97795
97771
<p><code>Worker</code> objects act as if they had an implicit <code>MessagePort</code> associated
97796
97772
with them. This port is part of a channel that is set up when the worker is created, but it is not
@@ -98112,8 +98088,7 @@ interface <dfn>NavigatorConcurrentHardware</dfn> {
98112
98088
98113
98089
<p class="note"><var>script</var> will run until it either returns, fails to parse, fails to
98114
98090
catch an exception, or gets <span data-x="abort a running script">prematurely aborted</span>
98115
- by the "<span>kill a worker</span>" or "<span>terminate a worker</span>" algorithms defined
98116
- above.</p>
98091
+ by the <span>terminate a worker</span> algorithm defined above.</p>
98117
98092
98118
98093
<p>If an exception was thrown or if the script was <span data-x="abort a running
98119
98094
script">prematurely aborted</span>, then abort all these steps, letting the exception or
0 commit comments