@@ -8085,16 +8085,16 @@ interface <dfn>DOMStringList</dfn> {
8085
8085
<p>If ! <span>IsSharedArrayBuffer</span>(<var>value</var>) is true, then:
8086
8086
8087
8087
<ol>
8088
- <li><p>Let <var>agentCluster</var> be the <span>surrounding agent</span>'s
8089
- <span>agent cluster</span>.</p></li>
8090
-
8091
8088
<li>
8092
- <p>If <var>agentCluster</var>'s <span>cross-origin isolated</span> is false, then throw a
8093
- <span>"<code>DataCloneError</code>"</span> <code>DOMException</code>.</p>
8089
+ <p>If the <span>current settings object</span>'s <span
8090
+ data-x="concept-settings-object-cross-origin-isolated-capability">cross-origin isolated
8091
+ capability</span> is false, then throw a <span>"<code>DataCloneError</code>"</span>
8092
+ <code>DOMException</code>.</p>
8094
8093
8095
8094
<p class="note">This check is only needed when serializing (and not when deserializing) as
8096
- <span>cross-origin isolated</span> cannot change over time and a
8097
- <code>SharedArrayBuffer</code> cannot leave an <span>agent cluster</span>.</p>
8095
+ the <span data-x="concept-settings-object-cross-origin-isolated-capability">cross-origin
8096
+ isolated capability</span> cannot change over time and a <code>SharedArrayBuffer</code>
8097
+ cannot leave an <span>agent cluster</span>.</p>
8098
8098
</li>
8099
8099
8100
8100
<li><p>If <var>forStorage</var> is true, then throw a
@@ -77984,9 +77984,6 @@ console.assert(iframeWindow.frameElement === null);
77984
77984
keys</span> to <span data-x="agent cluster">agent clusters</span>). User agents are responsible
77985
77985
for collecting agent clusters when it is deemed that nothing can access them anymore.</p>
77986
77986
77987
- <p>A <span>browsing context group</span> has a <dfn data-x="bcg cross-origin
77988
- isolated">cross-origin isolated</dfn> boolean. It is initially false.</p>
77989
-
77990
77987
<p>A <span>browsing context group</span> has an associated <dfn>historical agent cluster key
77991
77988
map</dfn>, which is a <span data-x="ordered map">map</span> of <span
77992
77989
data-x="origin">origins</span> to <span data-x="agent cluster key">agent cluster keys</span>. This
@@ -77997,6 +77994,41 @@ console.assert(iframeWindow.frameElement === null);
77997
77994
<p class="note">The <span>historical agent cluster key map</span> only ever gains entries over the
77998
77995
lifetime of the browsing context group.</p>
77999
77996
77997
+ <p>A <span>browsing context group</span> has a <dfn
77998
+ data-x="bcg-cross-origin-isolation">cross-origin isolation mode</dfn>, which is a
77999
+ <span>cross-origin isolation mode</span>. It is initially "<code
78000
+ data-x="cross-origin-isolation-none">none</code>".</p>
78001
+
78002
+ <p>A <dfn>cross-origin isolation mode</dfn> is one of three possible values: "<dfn><code
78003
+ data-x="cross-origin-isolation-none">none</code></dfn>", "<dfn><code
78004
+ data-x="cross-origin-isolation-logical">logical</code></dfn>", or "<dfn><code
78005
+ data-x="cross-origin-isolation-concrete">concrete</code></dfn>".</p>
78006
+
78007
+ <div class="note">
78008
+ <p>"<code data-x="cross-origin-isolation-logical">logical</code>" and "<code
78009
+ data-x="cross-origin-isolation-concrete">concrete</code>" are similar. They are both used for
78010
+ <span data-x="browsing context group">browsing context groups</span> where:</p>
78011
+
78012
+ <ul>
78013
+ <li><p>every top-level <span>Document</span> has `<code data-x=""><span
78014
+ data-x="http-cross-origin-opener-policy">Cross-Origin-Opener-Policy</span>: <span
78015
+ data-x="coop-same-origin">same-origin</span></code>`, and</p></li>
78016
+
78017
+ <li><p>every <span>Document</span> has `<code
78018
+ data-x=""><span>Cross-Origin-Embedder-Policy</span>: <span
78019
+ data-x="coep-require-corp">require-corp</span></code>`.</p></li>
78020
+ </ul>
78021
+
78022
+ <p>On some platforms, it is difficult to provide the security properties required to grant safe
78023
+ access to the APIs gated by the <span
78024
+ data-x="concept-settings-object-cross-origin-isolated-capability">cross-origin isolated
78025
+ capability</span>. As a result, only "<code
78026
+ data-x="cross-origin-isolation-concrete">concrete</code>" can grant access that capability.
78027
+ "<code data-x="cross-origin-isolation-logical">logical</code>" is used on platform not supporting
78028
+ this capability, where various restrictions imposed by cross-origin isolation will still apply,
78029
+ but the capability is not granted.</p>
78030
+ </div>
78031
+
78000
78032
<p>To <dfn data-x="creating a new browsing context group">create a new browsing context
78001
78033
group</dfn>, run these steps:</p>
78002
78034
@@ -79645,11 +79677,18 @@ interface <dfn>BarProp</dfn> {
79645
79677
79646
79678
<dt>The <span data-x="concept-settings-object-cross-origin-isolated-capability">cross-origin
79647
79679
isolated capability</span></dt>
79648
- <dd><p>Return the logical conjunction of <var>realm</var>'s <span>agent cluster</span>'s
79649
- <span>cross-origin isolated</span> and whether <var>window</var>'s <span
79650
- data-x="concept-document-window">associated <code>Document</code></span> is <span>allowed to
79651
- use</span> the "<code data-x="cross-origin-isolated-feature">cross-origin-isolated</code>"
79652
- feature.</p></dd>
79680
+ <dd>
79681
+ <p>Return true if both of the following hold, and false otherwise:</p>
79682
+ <ol>
79683
+ <li><p><var>realm</var>'s <span>agent cluster</span>'s <span
79684
+ data-x="agent-cluster-cross-origin-isolation">cross-origin-isolation mode</span> is "<code
79685
+ data-x="cross-origin-isolation-concrete">concrete</code>", and</p></li>
79686
+
79687
+ <li><p><var>window</var>'s <span data-x="concept-document-window">associated
79688
+ <code>Document</code></span> is <span>allowed to use</span> the "<code
79689
+ data-x="cross-origin-isolated-feature">cross-origin-isolated</code>" feature.</p></li>
79690
+ </ol>
79691
+ </dd>
79653
79692
</dl>
79654
79693
</li>
79655
79694
@@ -80424,9 +80463,6 @@ interface <dfn>BarProp</dfn> {
80424
80463
a registrable domain suffix of and is not equal to</span> <var>effectiveDomain</var>, then throw
80425
80464
a <span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p></li>
80426
80465
80427
- <li><p>If the <span>surrounding agent</span>'s <span>agent cluster</span>'s <span>cross-origin
80428
- isolated</span> is true, then return.</p></li>
80429
-
80430
80466
<li><p>If the <span>surrounding agent</span>'s <span>agent cluster</span>'s <span>is
80431
80467
origin-keyed</span> is true, then return.</p></li>
80432
80468
@@ -80534,10 +80570,11 @@ interface <dfn>BarProp</dfn> {
80534
80570
and the <code data-x="dom-originAgentCluster">originAgentCluster</code> getter will always return
80535
80571
true.</p>
80536
80572
80537
- <p class="note">Similarly, <code>Document</code>s in a <span>cross-origin isolated</span>
80538
- <span>agent cluster</span> are automatically origin-keyed. The `<code
80539
- data-x="http-origin-agent-cluster">Origin-Agent-Cluster</code>` header might be useful as an
80540
- additional hint to implementations about resource allocation, since the `<code
80573
+ <p class="note">Similarly, <code>Document</code>s whose <span>agent cluster</span>'s
80574
+ <span data-x="agent-cluster-cross-origin-isolation">cross-origin isolation mode</span> is not
80575
+ "<code data-x="cross-origin-isolation-none">none</code>" are automatically origin-keyed. The
80576
+ `<code data-x="http-origin-agent-cluster">Origin-Agent-Cluster</code>` header might be useful as
80577
+ an additional hint to implementations about resource allocation, since the `<code
80541
80578
data-x="http-cross-origin-opener-policy">Cross-Origin-Opener-Policy</code>` and
80542
80579
`<code>Cross-Origin-Embedder-Policy</code>` headers used to achieve cross-origin isolation are
80543
80580
more about ensuring that everything in the same address space opts in to being there. But adding
@@ -80901,8 +80938,9 @@ interface <dfn>BarProp</dfn> {
80901
80938
<dd>
80902
80939
<p>This behaves the same as "<code data-x="coop-same-origin">same-origin</code>", with the
80903
80940
addition that it sets the (new) <span>top-level browsing context</span>'s <span data-x="tlbc
80904
- group">group</span>'s <span data-x="bcg cross-origin isolated">cross-origin isolated</span> to
80905
- true.</p>
80941
+ group">group</span>'s <span data-x="bcg-cross-origin-isolation">cross-origin isolation
80942
+ mode</span> to one of "<code data-x="cross-origin-isolation-logical">logical</code>" or "<code
80943
+ data-x="cross-origin-isolation-concrete">concrete</code>".</p>
80906
80944
80907
80945
<p class="note">"<code data-x="coop-same-origin-plus-COEP">same-origin-plus-COEP</code>" cannot
80908
80946
be directly set via the `<code
@@ -81308,10 +81346,21 @@ interface <dfn>BarProp</dfn> {
81308
81346
<li><p>Let <var>newBrowsingContext</var> be the result of <span>creating a new top-level browsing
81309
81347
context</span>.</p></li>
81310
81348
81311
- <li><p>If <var>navigationCOOP</var>'s <span data-x="coop-struct-value">value</span> is "<code
81312
- data-x="coop-same-origin-plus-COEP">same-origin-plus-COEP</code>", then set
81313
- <var>newBrowsingContext</var>'s <span data-x="tlbc group">group</span>'s <span data-x="bcg
81314
- cross-origin isolated">cross-origin isolated</span> to true.</p></li>
81349
+ <li>
81350
+ <p>If <var>navigationCOOP</var>'s <span data-x="coop-struct-value">value</span> is "<code
81351
+ data-x="coop-same-origin-plus-COEP">same-origin-plus-COEP</code>", then set
81352
+ <var>newBrowsingContext</var>'s <span data-x="tlbc group">group</span>'s <span
81353
+ data-x="bcg-cross-origin-isolation">cross-origin isolation mode</span> to either "<code
81354
+ data-x="cross-origin-isolation-logical">logical</code>" or "<code
81355
+ data-x="cross-origin-isolation-concrete">concrete</code>". The choice of which is
81356
+ <span>implementation-defined</span>.</p>
81357
+
81358
+ <p class="note">It is difficult on some platforms to provide the security properties required by
81359
+ the <span data-x="concept-settings-object-cross-origin-isolated-capability">cross-origin
81360
+ isolated capability</span>. "<code data-x="cross-origin-isolation-concrete">concrete</code>"
81361
+ grants access to it and "<code data-x="cross-origin-isolation-logical">logical</code>" does
81362
+ not.</p>
81363
+ </li>
81315
81364
81316
81365
<li>
81317
81366
<p>If <var>sandboxFlags</var> is not empty, then:</p>
@@ -86778,8 +86827,8 @@ interface <dfn>BeforeUnloadEvent</dfn> : <span>Event</span> {
86778
86827
<p>Contains various <code>Window</code> objects which can potentially reach each other, either
86779
86828
directly or by using <code data-x="dom-document-domain">document.domain</code>.</p>
86780
86829
86781
- <p>If the encompassing <span>agent cluster</span>'s <span>cross-origin isolated </span> is true,
86782
- then all the <code>Window</code> objects will be <span>same origin</span>, can reach each other
86830
+ <p>If the encompassing <span>agent cluster</span>'s <span>is origin-keyed </span> is true, then
86831
+ all the <code>Window</code> objects will be <span>same origin</span>, can reach each other
86783
86832
directly, and <code data-x="dom-document-domain">document.domain</code> will no-op.</p>
86784
86833
86785
86834
<p class="note">Two <code>Window</code> objects that are <span>same origin</span> can be in
@@ -86862,8 +86911,10 @@ interface <dfn>BeforeUnloadEvent</dfn> : <span>Event</span> {
86862
86911
86863
86912
<div w-nodev>
86864
86913
86865
- <p>An <span>agent cluster</span> has an associated <dfn>cross-origin isolated</dfn> (a boolean),
86866
- which is initially false.</p>
86914
+ <p>An <span>agent cluster</span> has an associated <dfn
86915
+ data-x="agent-cluster-cross-origin-isolation">cross-origin isolation mode</dfn>, which is a
86916
+ <span>cross-origin isolation mode</span>. It is initially "<code
86917
+ data-x="cross-origin-isolation-none">none</code>".</p>
86867
86918
86868
86919
<p>An <span>agent cluster</span> has an associated <dfn>is origin-keyed</dfn> (a boolean), which
86869
86920
is initially false.</p>
@@ -86891,8 +86942,9 @@ interface <dfn>BeforeUnloadEvent</dfn> : <span>Event</span> {
86891
86942
86892
86943
<li><p>Let <var>key</var> be <var>site</var>.</p></li>
86893
86944
86894
- <li><p>If <var>group</var>'s <span data-x="bcg cross-origin isolated">cross-origin
86895
- isolated</span> is true, then set <var>key</var> to <var>origin</var>.</p></li>
86945
+ <li><p>If <var>group</var>'s <span data-x="bcg-cross-origin-isolation">cross-origin isolation
86946
+ mode</span> is not "<code data-x="cross-origin-isolation-none">none</code>", then set
86947
+ <var>key</var> to <var>origin</var>.</p></li>
86896
86948
86897
86949
<li><p>Otherwise, if <var>group</var>'s <span>historical agent cluster key
86898
86950
map</span>[<var>origin</var>] <span data-x="map exists">exists</span>, then set <var>key</var> to
@@ -86917,8 +86969,10 @@ interface <dfn>BeforeUnloadEvent</dfn> : <span>Event</span> {
86917
86969
<ol>
86918
86970
<li><p>Let <var>agentCluster</var> be a new <span>agent cluster</span>.</p></li>
86919
86971
86920
- <li><p>Set <var>agentCluster</var>'s <span>cross-origin isolated</span> to <var>group</var>'s
86921
- <span data-x="bcg cross-origin isolated">cross-origin isolated</span>.</p></li>
86972
+ <li><p>Set <var>agentCluster</var>'s <span
86973
+ data-x="agent-cluster-cross-origin-isolation">cross-origin isolation mode</span> to
86974
+ <var>group</var>'s <span data-x="bcg-cross-origin-isolation">cross-origin isolation
86975
+ mode</span>.</p></li>
86922
86976
86923
86977
<li><p>Set <var>agentCluster</var>'s <span>is origin-keyed</span> to true if <var>key</var>
86924
86978
equals <var>origin</var>; otherwise false.</p></li>
@@ -87299,8 +87353,9 @@ interface <dfn>BeforeUnloadEvent</dfn> : <span>Event</span> {
87299
87353
href="https://github.com/tc39/ecma262/issues/1357">tc39/ecma262#1357</a>.</span></p></li>
87300
87354
87301
87355
<li>
87302
- <p>If <var>agent</var>'s <span>agent cluster</span>'s <span>cross-origin isolated</span> is
87303
- false, then:</p>
87356
+ <p>If <var>agent</var>'s <span>agent cluster</span>'s <span
87357
+ data-x="agent-cluster-cross-origin-isolation">cross-origin isolation mode</span> is "<code
87358
+ data-x="cross-origin-isolation-none">none</code>", then:</p>
87304
87359
87305
87360
<ol>
87306
87361
<li><p>Let <var>global</var> be <var>realm</var>'s <span data-x="concept-realm-global">global
@@ -99220,8 +99275,11 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
99220
99275
<p>If <var>worker global scope</var>'s <span
99221
99276
data-x="concept-WorkerGlobalScope-embedder-policy">embedder policy</span> is "<code
99222
99277
data-x="coep-require-corp">require-corp</code>" and <var>is shared</var> is true, then set
99223
- <var>agent</var>'s <span>agent cluster</span>'s <span>cross-origin isolated</span> to
99224
- true.</p>
99278
+ <var>agent</var>'s <span>agent cluster</span>'s <span
99279
+ data-x="agent-cluster-cross-origin-isolation">cross-origin isolation mode</span> to "<code
99280
+ data-x="cross-origin-isolation-logical">logical</code>" or "<code
99281
+ data-x="cross-origin-isolation-concrete">concrete</code>". The one chosen is
99282
+ <span>implementation-defined</span>.</p>
99225
99283
99226
99284
<p class="XXX">This really ought to be set when the agent cluster is created, which requires a
99227
99285
redesign of this section.</p>
@@ -99234,8 +99292,9 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
99234
99292
99235
99293
<li><p>Set <var>worker global scope</var>'s <span
99236
99294
data-x="concept-WorkerGlobalScope-cross-origin-isolated-capability">cross-origin isolated
99237
- capability</span> to <var>agent</var>'s <span>agent cluster</span>'s <span>cross-origin
99238
- isolated</span>.</p></li>
99295
+ capability</span> to true if <var>agent</var>'s <span>agent cluster</span>'s <span
99296
+ data-x="agent-cluster-cross-origin-isolation">cross-origin isolation mode</span> is "<code
99297
+ data-x="cross-origin-isolation-concrete">concrete</code>".</p></li>
99239
99298
99240
99299
<li><p>If <var>is shared</var> is false and <var>owner</var>'s <span
99241
99300
data-x="concept-settings-object-cross-origin-isolated-capability">cross-origin isolated
0 commit comments