Skip to content

"byte length of a buffer source type" needs updating for resizable and detached buffers #1385

Description

@bakkot

What is the issue with the Web IDL Standard?

As of this proposal / PR, the [[ByteLength]] slot on TypedArrays and DataViews can be ~auto~ instead of an integer. Consumers of the "byte length of a buffer source" operation (like encodeInto) probably want TypedArrayByteLength or GetViewByteLength instead of the raw value of the [[ByteLength]] slot.

Also, when getting the length of an ArrayBuffer, this should probably use the ArrayBufferByteLength abstract operation, not raw access of the slot.

There's some other raw uses of the [[ByteLength]] slot, like in "write a byte sequence bytes into an ArrayBufferView", which should probably also be updated.

cc @syg

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions