From 5d9d67bd4d259cfaec3bf6d57a2a98bceae21067 Mon Sep 17 00:00:00 2001 From: Kevin Gibbons Date: Tue, 7 May 2024 04:19:39 -0700 Subject: [PATCH] Fix some realmless ArrayBuffer creation Test: https://github.com/web-platform-tests/wpt/pull/46104. Fixes #1675. --- fetch.bs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fetch.bs b/fetch.bs index 13e74c5c3..9ef6385fb 100644 --- a/fetch.bs +++ b/fetch.bs @@ -7139,8 +7139,9 @@ steps:

Run action.

Whenever one or more bytes are available and stream is not - errored, enqueue a {{Uint8Array}} wrapping - an {{ArrayBuffer}} containing the available bytes into stream. + errored, enqueue the result of + [=ArrayBufferView/create|creating=] a {{Uint8Array}} from the available bytes into + stream.

When running action is done, close stream. @@ -7274,8 +7275,8 @@ algorithm, given an object that includes {{Body}} object and an algor

The arrayBuffer() method steps are to return 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. +byte sequence bytes: return the result of [=ArrayBuffer/creating=] an +{{ArrayBuffer}} from bytes in this's relevant realm.

The above method can reject with a {{RangeError}}.

@@ -7291,7 +7292,7 @@ and whose {{Blob/type}} attribute is the result of get the MIME type

The formData() method steps are to return the result of -running consume body with this and the following step given a +running consume body with this and the following steps given a byte sequence bytes: