From 50ebcb40bcca0a279ae1825cd5aea536af64250d Mon Sep 17 00:00:00 2001
From: Anne van Kesteren If ! IsSharedArrayBuffer(value) is true, then:
Let agentCluster be the surrounding agent's
+ agent cluster. If agentCluster's cross-origin isolated is false, then throw a
+ " This check is only needed when serializing (and not when deserializing) as
+ cross-origin isolated cannot change over time and a
+ If forStorage is true, then throw a
" Set serialized to { [[Type]]: "SharedArrayBuffer", [[ArrayBufferData]]:
value.[[ArrayBufferData]], [[ArrayBufferByteLength]]: size,
- [[AgentCluster]]: the current Realm Record's corresponding agent
- cluster }.
+
DataCloneError
" DOMException
.SharedArrayBuffer
cannot leave an agent cluster.DataCloneError
" DOMException
.
A browsing context group has a cross-origin isolated boolean. It is initially false.
-The impact of cross-origin - isolated is under discussion in issue - #4734.
-To create a new browsing context group, run these steps:
@@ -79650,6 +79657,9 @@ interface BarProp { a registrable domain suffix of and is not equal to effectiveDomain, then throw a "SecurityError
" DOMException
.
+ If the surrounding agent's agent cluster's cross-origin + isolated is true, then return.
Set this Document
object's origin's domain to the result of parsing the given value.
Contains various Window
objects which can potentially reach each other, either
directly or by using document.domain
.
If the encompassing agent cluster's cross-origin isolated is true,
+ then all the Window
objects will be same origin, can reach each other,
+ and document.domain
will no-op.
Two Window
objects that are same origin can be in
different similar-origin window agents, for
instance if they are each in their own browsing context group.
An agent cluster has an associated cross-origin isolated (a boolean), + which is initially false.
+ +The following defines the allocation of the agent clusters of similar-origin window agents.
-An agent cluster key is a site.
- -whatwg/html #4734 is - expected to widen agent cluster key (but not site) to encompass all - tuple origins.
- -To obtain an agent cluster key, given an origin - origin, return the result of obtaining a site with - origin.
+An agent cluster key is a site or tuple origin whose host's registrable domain is non-null. I.e., an + agent cluster key can be any origin.
To obtain a similar-origin window agent, given an origin origin and browsing context group group, run these steps:
Let clusterKey be the result of obtaining an agent cluster key given - origin.
Let agentCluster be the result of obtaining a browsing context agent cluster with - group and clusterKey.
Let clusterKey be the result of obtaining a + site with origin.
Return the single similar-origin window agent contained in - agentCluster.
To obtain a browsing context agent cluster, - given a browsing context group group and agent cluster key - key, run these steps:
+If group's cross-origin + isolated is true, then set clusterKey to origin.
If group's agent cluster map[key] does not exist, then:
+Let agentCluster be a new agent cluster.
If group's cross-origin + isolated is true, then set agentCluster's cross-origin isolated + to true.
Add the result of creating an agent, given false, to agentCluster.
Return group's agent cluster map[key].
Return the single similar-origin window agent contained in group's + agent cluster map[key].
This means that there is only one similar-origin window agent per @@ -87304,6 +87312,19 @@ interface ApplicationCache : EventTarget { is not yet defined in the JavaScript specification; see tc39/ecma262#1357.
+Let crossOriginIsolated be agent's agent cluster's + cross-origin isolated.
If crossOriginIsolated is false, then remove the own property with name "SharedArrayBuffer
" from realm's global object.
This is done for compatibility with web content and there is some hope that this
+ can be removed in the future. Web developers can still get at the constructor through
+ new WebAssembly.Memory({ shared:true, initial:0, maximum:0
+ }).buffer.constructor
.
Return realm execution context.
isSecureContext
Returns whether or not this global object represents a secure context.
origin
Returns the global object's origin, serialized as string.
crossOriginIsolated
Returns the surrounding agent's agent cluster's cross-origin + isolated.
+ +(This value depends on the Cross-Origin-Opener-Policy
and Cross-Origin-Embedder-Policy
HTTP response headers and determines whether
+ SharedArrayBuffer
can be used with postMessage()
APIs.)
The crossOriginIsolated
attribute's
+ getter must return the surrounding agent's agent cluster's
+ cross-origin isolated.
If worker global scope's embedder policy is "require-corp
" and is shared is true, then set
+ agent's agent cluster's cross-origin isolated to
+ true.
This really ought to be set when the agent cluster is created, which requires a + redesign of this section.
+If the result of checking a
global object's embedder policy with worker global scope, owner,
and response is false, then set response to a network
From 4e5a00c369f43927818ba0a29cda1da9e3b9a314 Mon Sep 17 00:00:00 2001
From: Anne van Kesteren document.domain
.
If the encompassing agent cluster's cross-origin isolated is true,
- then all the Window
objects will be same origin, can reach each other,
- and document.domain
will no-op.
Window
objects will be same origin, can reach each other
+ directly, and document.domain
will no-op.
Two Window
objects that are same origin can be in
different similar-origin window agents, for
@@ -86925,7 +86925,8 @@ interface ApplicationCache : EventTarget {
An agent cluster key is a site or tuple origin whose host's registrable domain is non-null. I.e., an - agent cluster key can be any origin.
+ agent cluster key can be a scheme-and-registrable-domain or any + origin.To obtain a similar-origin window agent, given an origin origin and browsing context group @@ -86940,14 +86941,13 @@ interface ApplicationCache : EventTarget {
If group's agent cluster map[key] does not exist, then:
+ exists">does not exist, then:Let agentCluster be a new agent cluster.
If group's cross-origin - isolated is true, then set agentCluster's cross-origin isolated - to true.
Set agentCluster's cross-origin isolated to group's + cross-origin isolated.
Add the result of creating an agent, given false, to agentCluster.
Returns the global object's origin, serialized as string.
crossOriginIsolated
Returns the surrounding agent's agent cluster's cross-origin - isolated.
- -(This value depends on the Cross-Origin-Opener-Policy
and Cross-Origin-Embedder-Policy
HTTP response headers and determines whether
- SharedArrayBuffer
can be used with postMessage()
APIs.)
Returns whether the surrounding agent's agent cluster is
+ cross-origin isolated. This depends on the `Cross-Origin-Opener-Policy
` and `Cross-Origin-Embedder-Policy
` HTTP response headers and determines whether
+ SharedArrayBuffer
can be used with postMessage()
+ APIs.
The crossOriginIsolated
attribute's
- getter must return the surrounding agent's agent cluster's
- cross-origin isolated.
The crossOriginIsolated
getter steps
+ are to return the surrounding agent's agent cluster's cross-origin
+ isolated.
Let crossOriginIsolated be agent's agent cluster's - cross-origin isolated.
If crossOriginIsolated is false, then remove the own property with name "SharedArrayBuffer
" from realm's global object.
If agent's agent cluster's cross-origin isolated is + false, then:
+ +Let global be realm's global + object.
Let status be ! global.[[Delete]]("SharedArrayBuffer
").
Assert: status is true.
This is done for compatibility with web content and there is some hope that this
can be removed in the future. Web developers can still get at the constructor through
- new WebAssembly.Memory({ shared:true, initial:0, maximum:0
+
new WebAssembly.Memory({ shared:true, initial:0, maximum:0
}).buffer.constructor
.
An agent cluster has an associated cross-origin isolated (a boolean), which is initially false.
-