Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong algorithm + missing realm argument when creating ArrayBuffer #376

Open
bathos opened this issue Jun 21, 2023 · 0 comments
Open

Wrong algorithm + missing realm argument when creating ArrayBuffer #376

bathos opened this issue Jun 21, 2023 · 0 comments

Comments

@bathos
Copy link

bathos commented Jun 21, 2023

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant