summaryrefslogtreecommitdiff
path: root/ext/fetch/26_fetch.js
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2023-12-26 18:30:26 -0700
committerGitHub <noreply@github.com>2023-12-27 02:30:26 +0100
commit0efe438f7c191d8504355e03b27fe7e3055c9387 (patch)
treeb96fe9a897eb6941c87a95a04520662d26c02fbe /ext/fetch/26_fetch.js
parente33c5eb704c22fad69876e87d9b852a4e5072a7a (diff)
perf: remove opAsync (#21690)
`opAsync` requires a lookup by name on each async call. This is a mechanical translation of all opAsync calls to ensureFastOps. The `opAsync` API on Deno.core will be removed at a later time.
Diffstat (limited to 'ext/fetch/26_fetch.js')
-rw-r--r--ext/fetch/26_fetch.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/fetch/26_fetch.js b/ext/fetch/26_fetch.js
index b70d6d873..2391dcbdb 100644
--- a/ext/fetch/26_fetch.js
+++ b/ext/fetch/26_fetch.js
@@ -12,6 +12,10 @@
import { core, primordials } from "ext:core/mod.js";
const ops = core.ops;
+const {
+ op_fetch_send,
+} = core.ensureFastOps();
+
import * as webidl from "ext:deno_webidl/00_webidl.js";
import { byteLowerCase } from "ext:deno_web/00_infra.js";
import {
@@ -62,7 +66,7 @@ const REQUEST_BODY_HEADER_NAMES = [
* @returns {Promise<{ status: number, statusText: string, headers: [string, string][], url: string, responseRid: number, error: string? }>}
*/
function opFetchSend(rid) {
- return core.opAsync("op_fetch_send", rid);
+ return op_fetch_send(rid);
}
/**