Fully implement request constructor body handling (#39514)

This aligns the implementation with the spec, where both input body and
init body are now set. In doing so, it fixes a fetch abort test, since
the stream was missing for the input body.

It also introduces the `unusable` method, as that's the one the spec
uses. The other two getters no longer exist in the spec.

Fixes #39448

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
Tim van der Lippe 2025-09-27 03:52:01 +02:00 committed by GitHub
parent 043425cae5
commit 4c25039d35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 96 additions and 113 deletions

View file

@ -5,9 +5,6 @@
expected: ERROR
[general.any.html]
[Request is still 'used' if signal is aborted before fetching]
expected: FAIL
[response.arrayBuffer() rejects if already aborted]
expected: FAIL
@ -31,9 +28,6 @@
[general.any.worker.html]
[Request is still 'used' if signal is aborted before fetching]
expected: FAIL
[response.arrayBuffer() rejects if already aborted]
expected: FAIL

View file

@ -1,22 +1,10 @@
[request.any.html]
[Calling arrayBuffer() on an aborted consumed nonempty request]
expected: FAIL
[Calling blob() on an aborted consumed nonempty request]
expected: FAIL
[Calling formData() on an aborted request]
expected: FAIL
[Aborting a request after calling formData()]
expected: FAIL
[Calling json() on an aborted consumed nonempty request]
expected: FAIL
[Calling text() on an aborted consumed nonempty request]
expected: FAIL
[request.any.serviceworker.html]
expected: ERROR
@ -25,20 +13,8 @@
expected: ERROR
[request.any.worker.html]
[Calling arrayBuffer() on an aborted consumed nonempty request]
expected: FAIL
[Calling blob() on an aborted consumed nonempty request]
expected: FAIL
[Calling formData() on an aborted request]
expected: FAIL
[Aborting a request after calling formData()]
expected: FAIL
[Calling json() on an aborted consumed nonempty request]
expected: FAIL
[Calling text() on an aborted consumed nonempty request]
expected: FAIL