Skip to content

Commit ff81553

Browse files
sideshowbarkerdomenic
authored andcommitted
Reword/drop “must"s in dev view of Workers section
1 parent dff66be commit ff81553

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

source

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -96833,10 +96833,10 @@ interface <dfn>DedicatedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span>
9683396833

9683496834
<p><code>DedicatedWorkerGlobalScope</code> objects act as if they had an implicit
9683596835
<code>MessagePort</code> associated with them. This port is part of a channel that is set up when
96836-
the worker is created, but it is not exposed. This object must never be garbage collected before
96837-
the <code>DedicatedWorkerGlobalScope</code> object.</p>
96836+
the worker is created, but it is not exposed.<span w-nodev> This object must never be garbage
96837+
collected before the <code>DedicatedWorkerGlobalScope</code> object.</span></p>
9683896838

96839-
<p>All messages received by that port must immediately be retargeted at the
96839+
<p w-nodev>All messages received by that port must immediately be retargeted at the
9684096840
<code>DedicatedWorkerGlobalScope</code> object.</p>
9684196841

9684296842
<dl class="domintro">
@@ -96988,15 +96988,15 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
9698896988

9698996989
<p>Each <code>WorkerGlobalScope</code> object also has a <dfn
9699096990
data-x="dom-WorkerGlobalScope-closing" data-export="" data-dfn-type="dfn"
96991-
data-dfn-for="WorkerGlobalScope">closing</dfn> flag, which must initially be false, but which can
96992-
get set to true <span w-nodev>by the algorithms in the processing model section below</span><span
96993-
w-nohtml>when the worker is requested to close</span>.</p>
96991+
data-dfn-for="WorkerGlobalScope">closing</dfn> flag, <span w-nodev>which must be</span> initially
96992+
false, but which can get set to true <span w-nodev>by the algorithms in the processing model
96993+
section below</span><span w-nohtml>when the worker is requested to close</span>.</p>
9699496994

9699596995
<p>Once the <code>WorkerGlobalScope</code>'s <span
9699696996
data-x="dom-WorkerGlobalScope-closing">closing</span> flag is set to true, the <span>event
96997-
loop</span>'s <span data-x="task queue">task queues</span> must discard any further <span
96998-
data-x="concept-task">tasks</span> that would be added to them (tasks already on the queue are
96999-
unaffected except where otherwise specified). Effectively, once the <span
96997+
loop</span>'s <span data-x="task queue">task queues</span> <span w-nodev>must</span> discard any
96998+
further <span data-x="concept-task">tasks</span> that would be added to them (tasks already on the
96999+
queue are unaffected except where otherwise specified). Effectively, once the <span
9700097000
data-x="dom-WorkerGlobalScope-closing">closing</span> flag is true, timers stop firing,
9700197001
notifications for all pending background operations are dropped, etc.</p>
9700297002

@@ -97346,24 +97346,25 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
9734697346
<h4>Runtime script errors</h4>
9734797347

9734897348
<p>Whenever an uncaught runtime script error occurs in one of the worker's scripts, if the error
97349-
did not occur while handling a previous script error, the user agent must <span>report the
97350-
error</span> for that <span data-x="concept-script">script</span>, with the position (line number
97351-
and column number) where the error occurred, using the <code>WorkerGlobalScope</code> object as
97352-
the target.</p>
97349+
did not occur while handling a previous script error, the user agent <span w-nodev>must</span>
97350+
<span w-nohtml>will</span> <span>report the error</span> for that <span
97351+
data-x="concept-script">script</span>, with the position (line number and column number) where the
97352+
error occurred, using the <code>WorkerGlobalScope</code> object as the target.</p>
9735397353

9735497354
<p>For shared workers, if the error is still <i data-x="concept-error-nothandled">not handled</i>
9735597355
afterwards, the error may be reported to a developer console.</p>
9735697356

9735797357
<p>For dedicated workers, if the error is still <i data-x="concept-error-nothandled">not
97358-
handled</i> afterwards, the user agent <span w-nodev>must <span>queue a task</span> to run these
97359-
steps:</span><span w-nohtml>will fire an <code data-x="event-error">error</code> event at the
97360-
<code>Worker</code> object.</span></p>
97358+
handled</i> afterwards, <span w-nohtml>the error report propagates to the <code>Worker</code>
97359+
object, then to any containing workers in the same fashion, eventually reaching the
97360+
<code>Window</code> if it was never handled along the way.</span><span w-nodev>the user agent must
97361+
<span>queue a task</span> to run these steps:</span></p>
9736197362

9736297363
<div w-nodev>
9736397364

9736497365
<ol>
9736597366
<li><p>Let <var>notHandled</var> be the result of <span data-x="concept-event-fire">firing an
97366-
event</span> named <code data-x="event-error">error</code> at <code>Worker</code> object
97367+
event</span> named <code data-x="event-error">error</code> at the <code>Worker</code> object
9736797368
associated with the worker, using <code>ErrorEvent</code>, with the <code
9736897369
data-x="dom-Event-cancelable">cancelable</code> attribute initialized to true, the <code
9736997370
data-x="dom-ErrorEvent-message">message</code>, <code
@@ -97383,14 +97384,14 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
9738397384
if that worker's <code data-x="handler-WorkerGlobalScope-onerror">onerror</code> attribute was
9738497385
null, but must otherwise act as described above.</p>
9738597386

97386-
<p class="note">Thus, error reports propagate up to the chain of dedicated workers up to the
97387-
original <code>Document</code>, even if some of the workers along this chain have been terminated
97388-
and garbage collected.</p>
97387+
</div>
9738997388

97390-
<p>The <span>task source</span> for the task mentioned above is the <span>DOM manipulation task
97391-
source</span>.</p>
97389+
<p class="note"><span w-nodev>Thus, error</span><span w-nohtml>Error</span> reports propagate up
97390+
to the chain of dedicated workers up to the original <code>Document</code>, even if some of the
97391+
workers along this chain have been terminated and garbage collected.</p>
9739297392

97393-
</div>
97393+
<p w-nodev>The <span>task source</span> for the task mentioned above is the <span>DOM manipulation
97394+
task source</span>.</p>
9739497395

9739597396

9739697397
<h4>Creating workers</h4>

0 commit comments

Comments
 (0)