Skip to content

Negative coverage requested for ArrayBuffer methods #5064

@gibson042

Description

@gibson042

@phoddie reported a subtle bug in Moddable XS that would have been caught by some testing here:

function speciesCtor() {
  throw new Error("species constructor should not be invoked");
}
speciesCtor[Symbol.species] = speciesCtor;

const ab = new ArrayBuffer();
ab.constructor = speciesCtor;
ab.transfer();

This is applicable to transfer, transferToFixedLength, sliceToImmutable, and transferToImmutable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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