@@ -2855,6 +2855,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
2855
2855
2856
2856
<ul class="brief">
2857
2857
<li><dfn data-x-href="https://tc39.github.io/ecma262/#active-function-object">active function object</dfn></li>
2858
+ <li><dfn data-x-href="https://tc39.github.io/ecma262/#sec-agents">agent</dfn> and
2859
+ <dfn data-x-href="https://tc39.github.io/ecma262/#sec-agent-clusters">agent cluster</dfn></li>
2858
2860
<li><dfn data-x-href="https://tc39.github.io/ecma262/#sec-automatic-semicolon-insertion">automatic semicolon insertion</dfn></li>
2859
2861
<li>The <dfn data-x-href="https://tc39.github.io/ecma262/#current-realm">current Realm Record</dfn></li>
2860
2862
<li><dfn data-x-href="https://tc39.github.io/ecma262/#early-error-rule">early error</dfn></li>
@@ -2936,6 +2938,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
2936
2938
<li>The <dfn data-x="js-abstract-equality" data-x-href="https://tc39.github.io/ecma262/#sec-abstract-equality-comparison">Abstract Equality Comparison</dfn> algorithm</li>
2937
2939
<li>The <dfn data-x="js-strict-equality" data-x-href="https://tc39.github.io/ecma262/#sec-strict-equality-comparison">Strict Equality Comparison</dfn> algorithm</li>
2938
2940
<li>The <dfn data-x-href="https://tc39.github.io/ecma262/#sec-date-objects"><code>Date</code></dfn> class</li>
2941
+ <li>The <dfn data-x-href="https://tc39.github.io/ecma262/#sec-sharedarraybuffer-objects"><code>SharedArrayBuffer</code></dfn> class</li>
2939
2942
<li>The <dfn data-x-href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror"><code>TypeError</code></dfn> class</li>
2940
2943
<li>The <dfn data-x="js-RangeError" data-x-href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror"><code>RangeError</code></dfn> class</li>
2941
2944
<li>The <dfn data-x="js-typeof" data-x-href="https://tc39.github.io/ecma262/#sec-typeof-operator"><code>typeof</code></dfn> operator</li>
@@ -3780,6 +3783,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
3780
3783
<li><dfn data-x-href="https://w3c.github.io/ServiceWorker/#dfn-serviceworker-link">serviceworker link</dfn></li>
3781
3784
<li><dfn data-x-href="https://w3c.github.io/ServiceWorker/#serviceworker"><code>ServiceWorker</code></dfn> interface</li>
3782
3785
<li><dfn data-x-href="https://w3c.github.io/ServiceWorker/#serviceworkercontainer"><code>ServiceWorkerContainer</code></dfn> interface</li>
3786
+ <li><dfn data-x-href="https://w3c.github.io/ServiceWorker/#serviceworkerglobalscope"><code>ServiceWorkerGlobalScope</code></dfn> interface</li>
3783
3787
<li><dfn data-x-href="https://w3c.github.io/ServiceWorker/#dfn-use-cache">use cache</dfn></li>
3784
3788
</ul>
3785
3789
@@ -3905,6 +3909,17 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
3905
3909
</ul>
3906
3910
</dd>
3907
3911
3912
+ <dt>Worklets</dt>
3913
+
3914
+ <dd>
3915
+ <p>The following feature is defined in the <cite>Worklets</cite> specification: <ref
3916
+ spec=WORKLETS></p>
3917
+
3918
+ <ul class="brief">
3919
+ <li><dfn data-x-href="https://drafts.css-houdini.org/worklets/#workletglobalscope"><code>WorkletGlobalScope</code></dfn></li>
3920
+ </ul>
3921
+ </dd>
3922
+
3908
3923
</dl>
3909
3924
3910
3925
<hr>
@@ -88465,6 +88480,133 @@ import "https://example.com/foo/../module2.js";</pre>
88465
88480
data-x="concept-module-script-module-record">module record</span>.</p></li>
88466
88481
</ol>
88467
88482
88483
+ <h5>Integration with the JavaScript agent formalism</h5>
88484
+
88485
+ <p>JavaScript defines the concept of an <span>agent</span>. Until such a time that this standard
88486
+ has a better handle on lifetimes, we define five types of <span data-x="agent">agents</span> that
88487
+ user agents must allocate at the appropriate time.</p>
88488
+
88489
+ <p class="note">In the future, when this specification has a better handle on lifetimes, we hope
88490
+ to define exactly when <span data-x="agent">agents</span> and <span data-x="agent cluster">agent
88491
+ clusters</span> are created.</p>
88492
+
88493
+ <p class="XXX">JavaScript is expected to define <span
88494
+ data-x="agent">agents</span> in more detail; in particular that they hold a set of <span
88495
+ data-x="concept-global-object-realm">realms</span>: <a
88496
+ href="https://github.com/tc39/ecma262/issues/882">tc39/ecma262 issue #882</a>.</p>
88497
+
88498
+ <dl>
88499
+ <dt><dfn data-export="">Similar-origin window agent</dfn></dt>
88500
+ <dd>
88501
+ <p>An <span>agent</span> whose [[CanBlock]] is false and whose set of <span
88502
+ data-x="JavaScript realm">realms</span> consists of all <span
88503
+ data-x="concept-global-object-realm">realms</span> of <code>Window</code> objects whose
88504
+ <span>relevant settings object</span>'s <span>responsible browsing context</span> is in the same
88505
+ <span>unit of related similar-origin browsing contexts</span>.</p>
88506
+
88507
+ <p class="note">Two <code>Window</code> objects that are <span>same origin</span> can be in
88508
+ different <span data-x="similar-origin window agent">similar-origin window agents</span>, for
88509
+ instance if they are each in their own <span>unit of related similar-origin browsing
88510
+ contexts</span>.</p>
88511
+ </dd>
88512
+
88513
+ <dt><dfn data-export="">Dedicated worker agent</dfn></dt>
88514
+ <dd><p>An <span>agent</span> whose [[CanBlock]] is true and whose set of <span data-x="JavaScript
88515
+ realm">realms</span> consists of a single <code>DedicatedWorkerGlobalScope</code> object's <span
88516
+ data-x="concept-global-object-realm">Realm</span>.</p></dd>
88517
+
88518
+ <dt><dfn data-export="">Shared worker agent</dfn></dt>
88519
+ <dd><p>An <span>agent</span> whose [[CanBlock]] is true and whose set of <span data-x="JavaScript
88520
+ realm">realms</span> consists a single <code>SharedWorkerGlobalScope</code> object's <span
88521
+ data-x="concept-global-object-realm">Realm</span>.</p></dd>
88522
+
88523
+ <dt><dfn data-export="">Service worker agent</dfn></dt>
88524
+ <dd><p>An <span>agent</span> whose [[CanBlock]] is false and whose set of <span data-x="JavaScript
88525
+ realm">realms</span> consists of a single <code>ServiceWorkerGlobalScope</code> object's <span
88526
+ data-x="concept-global-object-realm">Realm</span>.</p></dd>
88527
+
88528
+ <dt><dfn data-export="">Worklet agent</dfn></dt>
88529
+ <dd>
88530
+ <p>An <span>agent</span> whose [[CanBlock]] is false and whose set of <span
88531
+ data-x="JavaScript realm">realms</span> consists of a single <code>WorkletGlobalScope</code>
88532
+ object's <span data-x="concept-global-object-realm">Realm</span>.</p>
88533
+
88534
+ <p class="note">While conceptually it might be cleaner for worklets that end up with multiple
88535
+ realms to put all those in the same agent, it is not observable in practice.</p>
88536
+ </dd>
88537
+ </dl>
88538
+
88539
+ <h5>Integration with the JavaScript agent cluster formalism</h5>
88540
+
88541
+ <p><dfn>Can share memory with</dfn> defines an equivalence relation. An <span>agent cluster</span>
88542
+ consists of all <span data-x="agent">agents</span> in the same equivalence class with respect to
88543
+ the <span>can share memory with</span> equivalence relation.</p>
88544
+
88545
+ <p>A <span>similar-origin window agent</span>, <span>dedicated worker agent</span>, <span>shared
88546
+ worker agent</span>, or <span>service worker agent</span>, <var>agent</var>, <span>can share
88547
+ memory with</span> any <span>dedicated worker agent</span> whose single <span data-x="JavaScript
88548
+ realm">realm</span>'s <span data-x="concept-realm-global">global object</span>'s <span>owner
88549
+ set</span> contains an item whose <span data-x="concept-relevant-realm">relevant Realm</span>
88550
+ belongs to <var>agent</var>.</p>
88551
+
88552
+ <p class="note">We use item above as an <span>owner set</span> can contain <code>Document</code>
88553
+ objects.</p>
88554
+
88555
+ <p class="XXX">A <span>worklet agent</span> … currently worklets have
88556
+ no clearly defined owner, see: <a
88557
+ href="https://github.com/w3c/css-houdini-drafts/issues/224">w3c/css-houdini-drafts issue
88558
+ #224</a>.</p>
88559
+
88560
+ <p>In addition, any <span>agent</span> <var>A</var> <span>can share memory with</span>:</p>
88561
+
88562
+ <ul class="brief">
88563
+ <li><var>A</var>,</li>
88564
+
88565
+ <li>any <span>agent</span> <var>B</var> such that <var>B</var> <span>can share memory with</span>
88566
+ <var>A</var>, and</li>
88567
+
88568
+ <li>any <span>agent</span> <var>B</var> such that there exists an <span>agent</span>
88569
+ <var>C</var>, where <var>A</var> <span>can share memory with</span> <var>C</var> and <var>C</var>
88570
+ <span>can share memory with</span> <var>B</var>.</li>
88571
+ </ul>
88572
+
88573
+ <p>The <span>agent cluster</span> concept is crucial for defining the JavaScript memory model, and
88574
+ in particular among which <span data-x="agent">agents</span> the backing data of
88575
+ <code>SharedArrayBuffer</code> objects can be shared.</p>
88576
+
88577
+ <div class="example">
88578
+ <p>The following pairs of global objects are each within the same <span>agent cluster</span>, and
88579
+ thus can use <code>SharedArrayBuffer</code> instances to share memory with each other:</p>
88580
+
88581
+ <ul class="brief">
88582
+ <li>A <code>Window</code> object and a dedicated worker that it created.</li>
88583
+
88584
+ <li>A worker (of any type) and a dedicated worker it created.</li>
88585
+
88586
+ <li>A <code>Window</code> object <var>A</var> and the <code>Window</code> object of an
88587
+ <code>iframe</code> element that <var>A</var> created that could be <span>same
88588
+ origin-domain</span> with <var>A</var>.</li>
88589
+
88590
+ <li>A <code>Window</code> object and a <span>same origin-domain</span> <code>Window</code>
88591
+ object that opened it.</li>
88592
+ </ul>
88593
+
88594
+ <p>The following pairs of global objects are <em>not</em> within the same <span>agent
88595
+ cluster</span>, and thus cannot share memory:</p>
88596
+
88597
+ <ul class="brief">
88598
+ <li>A <code>Window</code> object and a shared worker it created.</li>
88599
+
88600
+ <li>A worker (of any type) and a shared worker it created.</li>
88601
+
88602
+ <li>A <code>Window</code> object and a service worker it created.</li>
88603
+
88604
+ <li>A <code>Window</code> object <var></var> and the <code>Window</code> object of an
88605
+ <code>iframe</code> element that <var>A</var> created that cannot be <span>same
88606
+ origin-domain</span> with <var>A</var>.</li>
88607
+ </ul>
88608
+ </div>
88609
+
88468
88610
</div>
88469
88611
88470
88612
@@ -119886,6 +120028,9 @@ INSERT INTERFACES HERE
119886
120028
<dt id="refsWHATWGWIKI">[WHATWGWIKI]</dt>
119887
120029
<dd><cite><a href="https://wiki.whatwg.org/">The WHATWG Wiki</a></cite>. WHATWG.</dd>
119888
120030
120031
+ <dt id="refsWORKLETS">[WORKLETS]</dt>
120032
+ <dd><cite><a href="https://drafts.css-houdini.org/worklets/">Worklets</a></cite>. I. Kilpatrick. W3C.</dd>
120033
+
119889
120034
<dt id="refsWSP">[WSP]</dt>
119890
120035
<dd><cite><a href="https://tools.ietf.org/html/rfc6455">The WebSocket protocol</a></cite>, I. Fette, A. Melnikov. IETF.</dd>
119891
120036
0 commit comments