diff --git a/spec.emu b/spec.emu index 0026413..6eb0ff4 100644 --- a/spec.emu +++ b/spec.emu @@ -492,6 +492,31 @@ contributors: Mark S. Miller, Richard Gibson + +

+ DetachArrayBuffer ( + _arrayBuffer_: an ArrayBuffer, + optional _key_: anything, + ): either a normal completion containing ~unused~ or a throw completion +

+
+
skip global checks
+
true
+
+ + 1. Assert: IsSharedArrayBuffer(_arrayBuffer_) is *false*. + 1. If _key_ is not present, set _key_ to *undefined*. + 1. If _arrayBuffer_.[[ArrayBufferDetachKey]] is not _key_, throw a *TypeError* exception. + 1. If IsImmutableBuffer(_arrayBuffer_) is *true*, throw a *TypeError* exception. + 1. Set _arrayBuffer_.[[ArrayBufferData]] to *null*. + 1. Set _arrayBuffer_.[[ArrayBufferByteLength]] to 0. + 1. Return ~unused~. + + +

Detaching an ArrayBuffer instance disassociates the Data Block used as its backing store from the instance and sets the byte length of the buffer to 0.

+
+
+

SetValueInBuffer (