Skip to content

bakkot editor review #31

Closed
Closed
@bakkot

Description

@bakkot

Normative:

  • transferToImmutable does not appear to actually detach the original buffer. The new code in ArrayBufferCopyAndDetach early exits before it would reach the call to DetachArrayBuffer. 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):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions