[whatwg/fetch] “Realmless” ArrayBuffer creation in Body’s arrayBuffer() steps (Issue #1675)

The `Body` mixin’s `arrayBuffer` operation steps are defined as:

> [returning] the result of running consume body with _this_ and the following step given a byte sequence bytes: return a new ArrayBuffer whose contents are bytes.

The “new ArrayBuffer” portion is unlinked. It should presumably be linking to [“create an ArrayBuffer”](https://webidl.spec.whatwg.org/#arraybuffer-create) in Web IDL and its missing argument (a realm) should be supplied. I would expect the realm here to be the [relevant realm](https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm) of [this](https://webidl.spec.whatwg.org/#this).

(Issue discovered by @twiss when [correcting ArrayBuffer usage in WebCrypto algorithms](https://github.com/w3c/webcrypto/pull/347#discussion_r1236440541).)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1675
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/issues/1675@github.com>

Received on Wednesday, 21 June 2023 08:39:08 UTC