From 00564b8c5f510952208420857d1737e5ea2cca02 Mon Sep 17 00:00:00 2001
From: Anne van Kesteren If ! IsSharedArrayBuffer(value) is true, then:
Let agentCluster be 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
.
Set serialized.[[CrossOriginIsolated]] to surrounding agent's + agent cluster's cross-origin isolated.
Set serialized.[[BitmapData]] to a copy of value's bitmap data.
If serialized.[[OriginClean]] is false,
+ serialized.[[CrossOriginIsolated]] is false, and surrounding agent's
+ agent cluster's cross-origin isolated is true, then throw a
+ "DataCloneError
" DOMException
.
To truly protect against sidechannel attacks implementations should avoid + transmitting serialized.[[BitmapData]] to the surrounding agent's + agent cluster under the above conditions.
+Set value's bitmap data to serialized.[[BitmapData]].
Their transfer steps, given value and dataHolder, are:
Set dataHolder.[[CrossOriginIsolated]] to surrounding agent's + agent cluster's cross-origin isolated.
Set dataHolder.[[BitmapData]] to value's bitmap data.
If dataHolder.[[OriginClean]] is false,
+ dataHolder.[[CrossOriginIsolated]] is false, and surrounding agent's
+ agent cluster's cross-origin isolated is true, then throw a
+ "DataCloneError
" DOMException
.
To truly protect against sidechannel attacks implementations should avoid + sharing dataHolder.[[BitmapData]] with surrounding agent's + agent cluster under the above conditions.
+Set value's bitmap data to dataHolder.[[BitmapData]].