Skip to content

Commit e27af50

Browse files
Use ArrayBufferCopyAndDetach for TransferArrayBuffer
1 parent 3ea6daf commit e27af50

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

index.bs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6847,15 +6847,10 @@ The following abstract operations are a grab-bag of utilities.
68476847
id="transfer-array-buffer">TransferArrayBuffer(|O|)</dfn> performs the following steps:
68486848

68496849
1. Assert: ! [$IsDetachedBuffer$](|O|) is false.
6850-
1. Let |arrayBufferData| be |O|.\[[ArrayBufferData]].
6851-
1. Let |arrayBufferByteLength| be |O|.\[[ArrayBufferByteLength]].
6852-
1. Perform ? [$DetachArrayBuffer$](|O|).
6850+
1. Return ? [$ArrayBufferCopyAndDetach$](|O|, undefined, `FIXED-LENGTH`).
68536851
<p class="note">This will throw an exception if |O| has an \[[ArrayBufferDetachKey]]
68546852
that is not undefined, such as a {{Memory|WebAssembly.Memory}}'s {{Memory/buffer}}.
68556853
[[WASM-JS-API-1]]</p>
6856-
1. Return a new {{ArrayBuffer}} object, created in [=the current Realm=], whose
6857-
\[[ArrayBufferData]] internal slot value is |arrayBufferData| and whose
6858-
\[[ArrayBufferByteLength]] internal slot value is |arrayBufferByteLength|.
68596854
</div>
68606855

68616856
<div algorithm>

0 commit comments

Comments
 (0)