Skip to content

Commit 0e49bdf

Browse files
committed
Editorial: Move note about immutable ArrayBuffer Data Block initialization to the correct step
1 parent f837afb commit 0e49bdf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec.emu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ contributors: Mark S. Miller, Richard Gibson
490490
1. Assert: _count_ ≤ _byteLength_.
491491
1. Let _newBuffer_ be ? <emu-meta suppress-effects="user-code">AllocateArrayBuffer(_constructor_, _byteLength_, ~immutable~)</emu-meta>.
492492
1. Let _toBlock_ be _newBuffer_.[[ArrayBufferData]].
493+
1. NOTE: This is the only step that can write into the Data Block of an immutable ArrayBuffer.
493494
1. Perform CopyDataBlockBytes(_toBlock_, 0, _fromBlock_, 0, _count_).
494495
1. Return _newBuffer_.
495496
</emu-alg>
@@ -529,7 +530,6 @@ contributors: Mark S. Miller, Richard Gibson
529530
1. Let _newBuffer_ be ? <emu-meta suppress-effects="user-code">AllocateArrayBuffer(%ArrayBuffer%, _newByteLength_, _newMaxByteLength_)</emu-meta>.
530531
1. <del>Let _copyLength_ be min(_newByteLength_, _arrayBuffer_.[[ArrayBufferByteLength]]).</del>
531532
1. Let _fromBlock_ be _arrayBuffer_.[[ArrayBufferData]].
532-
1. <ins>NOTE: This is the only step that can write into the Data Block of an immutable ArrayBuffer.</ins>
533533
1. Let _toBlock_ be _newBuffer_.[[ArrayBufferData]].
534534
1. Perform CopyDataBlockBytes(_toBlock_, 0, _fromBlock_, 0, _copyLength_).
535535
1. NOTE: Neither creation of the new Data Block nor copying from the old Data Block are observable. Implementations may implement this method as a zero-copy move or a `realloc`.

0 commit comments

Comments
 (0)