forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Request & Response's bytes() method
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
- Loading branch information
Showing
27 changed files
with
115 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/imported/w3c/web-platform-tests/fetch/api/response/response-blob-realm.any-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
FAIL realm of the Uint8Array from Response bytes() promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'window.Response.prototype.bytes.call')" | ||
FAIL realm of the Uint8Array from Response bytes() assert_true: Uint8Array should be created in receiver's realm expected true got false | ||
|
Oops, something went wrong.