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

Add bytes() method to Body mixin #1753

Merged
merged 1 commit into from
May 14, 2024
Merged

Add bytes() method to Body mixin #1753

merged 1 commit into from
May 14, 2024

Conversation

bakkot
Copy link
Contributor

@bakkot bakkot commented May 10, 2024

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With implementation bugs and an MDN issue I think this is good to go. Thanks for working on it!

@bakkot
Copy link
Contributor Author

bakkot commented May 13, 2024

OK, opened the implementation bugs and MDN issue.

annevk pushed a commit to web-platform-tests/wpt that referenced this pull request May 14, 2024
@annevk annevk merged commit 1085f4f into whatwg:main May 14, 2024
2 checks passed
@bakkot bakkot deleted the body-bytes branch May 14, 2024 14:41
webkit-commit-queue pushed a commit to annevk/WebKit that referenced this pull request May 21, 2024
https://bugs.webkit.org/show_bug.cgi?id=274102

Reviewed by Youenn Fablet.

This accessor is nearly identical to arrayBuffer() except that it
yields a Uint8Array, which is strictly more useful.

Fetch change: whatwg/fetch#1753.

* LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any.serviceworker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any.sharedworker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/serviceworker-intercepted.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume.any.serviceworker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume.any.sharedworker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-blob-realm.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-error-from-stream.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-error-from-stream.any.serviceworker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-error-from-stream.any.sharedworker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-error-from-stream.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-bad-chunk.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-bad-chunk.any.serviceworker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-bad-chunk.any.sharedworker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-stream-bad-chunk.any.worker-expected.txt:
* Source/WebCore/Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::bytes):
* Source/WebCore/Modules/fetch/FetchBody.h:
* Source/WebCore/Modules/fetch/FetchBody.idl:
* Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp:
(WebCore::resolveWithTypeAndData):
(WebCore::FetchBodyConsumer::resolve):
* Source/WebCore/Modules/fetch/FetchBodyConsumer.h:
* Source/WebCore/Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::bytes):
* Source/WebCore/Modules/fetch/FetchBodyOwner.h:
* Source/WebCore/bindings/js/JSDOMPromiseDeferred.cpp:
(WebCore::fulfillPromiseWithUint8Array):
(WebCore::fulfillPromiseWithUint8ArrayFromSpan):
* Source/WebCore/bindings/js/JSDOMPromiseDeferred.h:

Canonical link: https://commits.webkit.org/279036@main
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request May 21, 2024
…in, a=testonly

Automatic update from web-platform-tests
Fetch: bytes() method on Body mixin

For whatwg/fetch#1753.
--

wpt-commits: 1b9332c3c8a84d34e38271d29518c204ab2cfb6e
wpt-pr: 46198
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request May 23, 2024
…in, a=testonly

Automatic update from web-platform-tests
Fetch: bytes() method on Body mixin

For whatwg/fetch#1753.
--

wpt-commits: 1b9332c3c8a84d34e38271d29518c204ab2cfb6e
wpt-pr: 46198
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

add a method to get a Uint8Array to Body
2 participants