Closed
Description
Normative:
-
transferToImmutable
does not appear to actually detach the original buffer. The new code inArrayBufferCopyAndDetach
early exits before it would reach the call toDetachArrayBuffer
. It also early exits before checking the[[ArrayBufferDetachKey]]
, which must be done when detaching since some host specs define ArrayBuffers which cannot be detached by normal means (for example WebAssembly and WebGPU).
Normative: Fix ArrayBufferCopyAndDetach #36 - There's an open normative question in
ArrayBuffer.prototype.sliceToImmutable
which should be resolved prior to stage 2.7.
Editorial: Replace open TODO with an explanatory note #34 - In
SetViewValue
, mutability of the target is checked after coercing arguments. Usually we do validation of the receiver first. We can't do all the validation up-front here because side effects from coercing the argument can detach the buffer, but they can't cause it to become immutable, so we could reasonably check mutability earlier, i.e., before coercing the arguments. I'd default to doing so, although I'm open to arguments that we should not check it early.
Normative: Validate DataView buffer mutability before argument coercion #37
Editorial (can be resolved later):
- "preserveResizability" is not a reasonable name for a variable which can take the value "immutable". Call it "mode" or something.
Editorial: Indicate the expected future change of ArrayBufferCopyAndDetach parameter _preserveResizability_ #35 -
AllocateImmutableArrayBuffer
takes a constructor argument which is asserted to be%ArrayBuffer%
. It should just hardcode that rather than taking an argument.
Metadata
Metadata
Assignees
Labels
No labels