Skip to content

Wrong algorithm + missing realm argument when creating ArrayBuffer #376

Open
@bathos

Description

@bathos

In the getter steps for the response attribute of the XMLHTTPRequest interface —

  1. If this’s response type is "arraybuffer", then set this’s response object to a new ArrayBuffer object representing this’s received bytes. If this throws an exception, then set this’s response object to failure and return null.

— the word “new” links to “create a new object implementing the interface” in Web IDL. However ArrayBuffer isn’t an interface and that algorithm doesn’t make sense with it. It looks like it should be calling “create an ArrayBuffer” instead.

Note that both of those algorithms also expect a realm argument, which is missing. Presumably it should be passing the relevant realm of this.

(Issue discovered by @twiss when correcting ArrayBuffer usage in WebCrypto algorithms.)

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