@@ -2409,7 +2409,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
2409
2409
<li>The <dfn data-x-href="https://infra.spec.whatwg.org/#stack">stack</dfn> data structure and the associated definitions for
2410
2410
<dfn data-x="stack push" data-x-href="https://infra.spec.whatwg.org/#stack-push">push</dfn> and
2411
2411
<dfn data-x="stack pop" data-x-href="https://infra.spec.whatwg.org/#stack-pop">pop</dfn></li>
2412
- <li>The <dfn data-x="set" data-x-href="https://infra.spec.whatwg.org/#ordered-set">ordered set</dfn> data structure</li>
2412
+ <li>The <dfn data-x="set" data-x-href="https://infra.spec.whatwg.org/#ordered-set">ordered set</dfn> data structure and the associated definition for
2413
+ <dfn data-x="set append" data-x-href="https://infra.spec.whatwg.org/#set-append">append</dfn></li>
2413
2414
<li><dfn data-x-href="https://infra.spec.whatwg.org/#html-namespace">HTML namespace</dfn></li>
2414
2415
<li><dfn data-x-href="https://infra.spec.whatwg.org/#mathml-namespace">MathML namespace</dfn></li>
2415
2416
<li><dfn data-x-href="https://infra.spec.whatwg.org/#svg-namespace">SVG namespace</dfn></li>
@@ -79134,8 +79135,8 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
79134
79135
</ol>
79135
79136
79136
79137
<p class="note">Whenever a <code>Document</code> object is <span data-x="discard a
79137
- Document">discarded</span>, it is also removed from the list of <span>the worker's
79138
- <code>Document</code>s</span> of each worker whose list contains that <code>Document</code>.</p>
79138
+ Document">discarded</span>, it is also removed from the list of <span>the worker's owners</span>
79139
+ of each worker whose list contains that <code>Document</code>.</p>
79139
79140
79140
79141
<p>When <dfn data-export="">a <em>browsing context</em> is discarded</dfn>, the strong reference
79141
79142
from the user agent itself to the <span>browsing context</span> must be severed, and all the
@@ -97113,53 +97114,43 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
97113
97114
contexts</span> through <span data-x="channel messaging">message channels</span> and their
97114
97115
<code>MessagePort</code> objects.</p>
97115
97116
97116
- <p>Each <code>WorkerGlobalScope</code> <var>worker global scope</var> has a list of
97117
+ <p>Each <code>WorkerGlobalScope</code> object <var>worker global scope</var> has a list of
97117
97118
<dfn data-export="">the worker's ports</dfn>, which consists of all the <code>MessagePort</code>
97118
97119
objects that are entangled with another port and that have one (but only one) port owned by
97119
- <var>worker global scope</var>. This list includes <!--all the <code>MessagePort</code> objects
97120
- that are in events pending in the <code>WorkerGlobalScope</code> object's <span>event loop</span>,
97121
- as well as (commented out because in practice it makes no difference either way as far as I can
97122
- tell, and it would be hard to strictly implement since these ports might not yet be across the
97123
- thread boundary)--> the implicit <code>MessagePort</code> in the case of <span
97124
- data-x="DedicatedWorkerGlobalScope">dedicated workers</span>.</p>
97125
-
97126
- <p>Each <code>WorkerGlobalScope</code> also has a list of <dfn data-export="">the worker's
97127
- workers</dfn>. Initially this list is empty; it is populated when the worker creates or obtains
97128
- further workers.</p>
97129
-
97130
- <p>Finally, each <code>WorkerGlobalScope</code> also has a list of <dfn data-export="">the
97131
- worker's <code>Document</code>s</dfn>. Initially this list is empty; it is populated when the
97132
- worker is created.</p>
97133
-
97134
- <p>Whenever a <code>Document</code> <var>d</var> is <dfn data-x="add a document to the
97135
- worker's Documents">added to the worker's <code>Document</code>s</dfn>, the user agent must, for
97136
- each worker <var>q</var> in the list of <span>the worker's workers</span> whose list of
97137
- <span>the worker's <code>Document</code>s</span> does not contain <var>d</var>, <span
97138
- data-x="add a document to the worker's Documents">add <var>d</var> to <var>q</var>'s <code>WorkerGlobalScope</code> owner's list of <span>the worker's
97139
- <code>Document</code>s</span></span>.</p> <!-- suggestions welcome on making this sentence into
97140
- understandable English -->
97120
+ <var>worker global scope</var>. This list includes the implicit <code>MessagePort</code> in the
97121
+ case of <span data-x="DedicatedWorkerGlobalScope">dedicated workers</span>.</p>
97122
+
97123
+ <p>Each <code>WorkerGlobalScope</code> object also has a <span>set</span> of <dfn
97124
+ id="the-worker's-workers" data-export="" data-for="WorkerGlobalScope" data-lt="workers">the
97125
+ worker's workers</dfn>. Initially this set is empty; it is populated when the worker creates or
97126
+ obtains further workers.</p>
97127
+
97128
+ <p id="the-worker's-documents">Finally, each <code>WorkerGlobalScope</code> object also has a
97129
+ <span>set</span> of <dfn data-export="" data-for="WorkerGlobalScope" data-lt="owners">the worker's
97130
+ owners</dfn>. Initially this set is empty; it is populated when the worker is created or
97131
+ obtained.</p>
97132
+
97133
+ <p class="note">It is a list to accomodate <code>SharedWorkerGlobalScope</code> objects.</p>
97141
97134
97142
97135
<p>Whenever a <code>Document</code> object is <span data-x="discard a Document">discarded</span>,
97143
- it must be removed from the list of <span>the worker's <code>Document</code>s</span> of each
97144
- worker whose list contains that <code>Document</code>.</p>
97145
-
97146
- <p>Given an <span>environment settings object</span> <var>o</var> when creating or obtaining a
97147
- worker, the <dfn>list of relevant <code>Document</code> objects to add</dfn> depends on the type
97148
- of <span data-x="concept-settings-object-global">global object</span> specified by <var>o</var>.
97149
- If <var>o</var> specifies a <span data-x="concept-settings-object-global">global object</span>
97150
- that is a <code>WorkerGlobalScope</code> object (i.e. if we are creating a nested worker), then
97151
- the relevant <code>Document</code>s are the <span>the worker's <code>Document</code>s</span> of
97152
- the <span data-x="concept-settings-object-global">global object</span> specified by <var>o</var>.
97153
- Otherwise, <var>o</var> specifies a <span data-x="concept-settings-object-global">global
97154
- object</span> that is a <code>Window</code> object, and the relevant <code>Document</code> is just
97155
- the <span>responsible document</span> specified by <var>o</var>.</p>
97136
+ it must be removed from the list of <span>the worker's owners</span> of each worker whose list
97137
+ contains that <code>Document</code>.</p>
97138
+
97139
+ <p id="list-of-relevant-document-objects-to-add">Given an <span>environment settings object</span>
97140
+ <var>o</var> when creating or obtaining a worker, the <dfn>relevant owner to add</dfn> depends on
97141
+ the type of <span data-x="concept-settings-object-global">global object</span> specified by
97142
+ <var>o</var>. If <var>o</var> specifies a <span data-x="concept-settings-object-global">global
97143
+ object</span> that is a <code>WorkerGlobalScope</code> object (i.e., if we are creating a nested
97144
+ worker), then the relevant owner is that global object. Otherwise, <var>o</var> specifies a <span
97145
+ data-x="concept-settings-object-global">global object</span> that is a <code>Window</code> object,
97146
+ and the relevant owner is the <span>responsible document</span> specified by <var>o</var>.</p>
97156
97147
97157
97148
<hr>
97158
97149
97159
- <p>A worker is said to be a <dfn>permissible worker</dfn> if its list of <span>the worker's
97160
- <code>Document</code>s </span> is not empty, or if its list has been empty for no more than a short
97150
+ <p>A worker is said to be a <dfn>permissible worker</dfn> if its set of <span>the worker's
97151
+ owners </span> is not empty, or if its list has been empty for no more than a short
97161
97152
user-agent-defined timeout value, its <code>WorkerGlobalScope</code> is actually a
97162
- <code>SharedWorkerGlobalScope</code> object (i.e. the worker is a shared worker), and the user
97153
+ <code>SharedWorkerGlobalScope</code> object (i.e., the worker is a shared worker), and the user
97163
97154
agent has a <span>browsing context</span> whose <code>Document</code> is not <span>completely
97164
97155
loaded</span>.</p>
97165
97156
@@ -97168,8 +97159,9 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
97168
97159
can be used by user agents as a way to avoid the cost of restarting a shared worker used by a site
97169
97160
when the user is navigating from page to page within that site.</p>
97170
97161
97171
- <p>A worker is said to be an <dfn>active needed worker</dfn> if any of the <code>Document</code>
97172
- objects in <span>the worker's <code>Document</code>s</span> are <span>fully active</span>.</p>
97162
+ <p>A worker is said to be an <dfn>active needed worker</dfn> if any of <span>the worker's
97163
+ owners</span> are either <code>Document</code> objects that are <span>fully active</span> or
97164
+ <span data-x="active needed worker">active needed workers</span>.</p>
97173
97165
97174
97166
<p>A worker is said to be a <dfn>protected worker</dfn> if it is an <span>active needed
97175
97167
worker</span> and either it has outstanding timers, database transactions, or network connections,
@@ -97205,15 +97197,13 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
97205
97197
<li><p>Let <var>is shared</var> be true if <var>worker</var> is a <code>SharedWorker</code>
97206
97198
object, and false otherwise.</p></li>
97207
97199
97208
- <li><p>Let <var>docs </var> be the <span>list of relevant <code>Document</code> objects to
97209
- add</span> given <var>outside settings</var>.</p></li>
97200
+ <li><p>Let <var>owner </var> be the <span>relevant owner to add</span> given <var>outside
97201
+ settings</var>.</p></li>
97210
97202
97211
97203
<li><p>Let <var>parent worker global scope</var> be null.</p>
97212
97204
97213
- <li><p>If <var>outside settings</var>'s <span data-x="concept-settings-object-global">global
97214
- object</span> is a <code>WorkerGlobalScope</code> object (i.e. we are creating a nested worker),
97215
- set <var>parent worker global scope</var> to <var>outside settings</var>'s <span
97216
- data-x="concept-settings-object-global">global object</span>.</p></li>
97205
+ <li><p>If <var>owner</var> is a <code>WorkerGlobalScope</code> object (i.e., we are creating a
97206
+ nested worker), then set <var>parent worker global scope</var> to <var>owner</var>.</p></li>
97217
97207
97218
97208
<li>
97219
97209
<p>Call the JavaScript <span
@@ -97320,9 +97310,8 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
97320
97310
97321
97311
<li><p><span>Entangle</span> <var>outside port</var> and <var>inside port</var>.</p></li>
97322
97312
97323
- <li><p><span data-x="add a document to the worker's Documents">Add to <var>worker global
97324
- scope</var>'s list of <span>the worker's <code>Document</code>s</span></span> the
97325
- <code>Document</code> objects in <var>docs</var>.</p></li>
97313
+ <li><p><span data-x="set append">Append</span> <var>owner</var> to <var>worker global
97314
+ scope</var>'s set of <span>the worker's owners</span>.</p></li>
97326
97315
97327
97316
<li><p>If <var>parent worker global scope</var> is not null, add <var>worker global scope</var>
97328
97317
to the list of <span>the worker's workers</span> of <var>parent worker global
@@ -97423,7 +97412,7 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
97423
97412
97424
97413
<!-- this has no normative impact but makes it clearer that the worker is irrelevant now, and
97425
97414
doesn't have to survive until its Documents all die off too --> <p>Empty the worker's list of
97426
- <span>the worker's <code>Document</code>s </span>.</p>
97415
+ <span>the worker's owners </span>.</p>
97427
97416
97428
97417
</li>
97429
97418
@@ -97797,9 +97786,6 @@ enum <dfn>WorkerType</dfn> { "classic", "module" };
97797
97786
97798
97787
<li><p>Associate the <var>outside port</var> with <var>worker</var>.</p></li>
97799
97788
97800
- <li><p>Let <var>docs</var> be the <span>list of relevant <code>Document</code> objects to
97801
- add</span> given <var>outside settings</var>.</p></li>
97802
-
97803
97789
<li><p>Return <var>worker</var>, and run the following step <span>in parallel</span>.</p></li>
97804
97790
97805
97791
<li><p><span>Run a worker</span> given <var>worker</var>, <var>worker URL</var>, <var>outside
@@ -97948,10 +97934,9 @@ interface <dfn>SharedWorker</dfn> : <span>EventTarget</span> {
97948
97934
data-x="dom-MessageEvent-source">source</code> attribute initialized to <var>inside
97949
97935
port</var>.</p></li>
97950
97936
97951
- <li><p><span data-x="add a document to the worker's Documents">Add to <var>worker global
97952
- scope</var>'s list of <span>the worker's <code>Document</code>s</span></span> the
97953
- <span>list of relevant <code>Document</code> objects to add</span> given <var>outside
97954
- settings</var>.</p></li>
97937
+ <li><p><span data-x="set append">Append</span> the <span>relevant owner to add</span> given
97938
+ <var>outside settings</var> to <var>worker global scope</var>'s set of <span>the worker's
97939
+ owners</span>.</p></li>
97955
97940
97956
97941
<li><p>If <var>outside settings</var>'s <span data-x="concept-settings-object-global">global
97957
97942
object</span> is a <code>WorkerGlobalScope</code> object, add <var>worker global scope</var>
0 commit comments