From 485cd3eb9bb0b7407496600455260591273bb795 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:
@@ -79679,6 +79686,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
+ directly, 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 a scheme-and-registrable-domain or 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.
Return the single similar-origin window agent contained in - agentCluster.
Let clusterKey be the result of obtaining a + site with origin.
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:
+ exists">does not exist, then: +Let agentCluster be a new agent cluster.
Set agentCluster's cross-origin isolated to group's + cross-origin isolated.
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 @@ -87333,6 +87340,26 @@ interface ApplicationCache : EventTarget { is not yet defined in the JavaScript specification; see tc39/ecma262#1357.
+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
+ }).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 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
getter steps
+ are to 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