summaryrefslogtreecommitdiff
path: root/ext/fetch/22_body.js
diff options
context:
space:
mode:
authorPhosra <phosra@tutanota.com>2022-07-28 04:18:17 -0700
committerGitHub <noreply@github.com>2022-07-28 13:18:17 +0200
commit519ed44ebb4bab71c6b80f7c1ef432354654da8c (patch)
treeb28d4700e934495dfedaa96c4b6e1c6093616b51 /ext/fetch/22_body.js
parent5d263c932faf210f5b7a1e448a8eb26a2ac3ba68 (diff)
fix(ext/fetch): resolve TODOs about WebIDL conversions in body init (#15312)
Diffstat (limited to 'ext/fetch/22_body.js')
-rw-r--r--ext/fetch/22_body.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/fetch/22_body.js b/ext/fetch/22_body.js
index f33097033..10ddb7603 100644
--- a/ext/fetch/22_body.js
+++ b/ext/fetch/22_body.js
@@ -452,15 +452,13 @@
webidl.converters["BodyInit_DOMString"] = (V, opts) => {
// Union for (ReadableStream or Blob or ArrayBufferView or ArrayBuffer or FormData or URLSearchParams or USVString)
if (ObjectPrototypeIsPrototypeOf(ReadableStreamPrototype, V)) {
- // TODO(lucacasonato): ReadableStream is not branded
- return V;
+ return webidl.converters["ReadableStream"](V, opts);
} else if (ObjectPrototypeIsPrototypeOf(BlobPrototype, V)) {
return webidl.converters["Blob"](V, opts);
} else if (ObjectPrototypeIsPrototypeOf(FormDataPrototype, V)) {
return webidl.converters["FormData"](V, opts);
} else if (ObjectPrototypeIsPrototypeOf(URLSearchParamsPrototype, V)) {
- // TODO(lucacasonato): URLSearchParams is not branded
- return V;
+ return webidl.converters["URLSearchParams"](V, opts);
}
if (typeof V === "object") {
if (