diff options
Diffstat (limited to 'ext/fetch')
-rw-r--r-- | ext/fetch/22_http_client.js | 4 | ||||
-rw-r--r-- | ext/fetch/26_fetch.js | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ext/fetch/22_http_client.js b/ext/fetch/22_http_client.js index f0c2394c3..d096b08ca 100644 --- a/ext/fetch/22_http_client.js +++ b/ext/fetch/22_http_client.js @@ -13,6 +13,7 @@ ((window) => { const core = window.Deno.core; + const ops = core.ops; /** * @param {Deno.CreateHttpClientOptions} options @@ -21,8 +22,7 @@ function createHttpClient(options) { options.caCerts ??= []; return new HttpClient( - core.opSync( - "op_fetch_custom_client", + ops.op_fetch_custom_client( options, ), ); diff --git a/ext/fetch/26_fetch.js b/ext/fetch/26_fetch.js index 9a4916e21..a069583a7 100644 --- a/ext/fetch/26_fetch.js +++ b/ext/fetch/26_fetch.js @@ -13,6 +13,7 @@ ((window) => { const core = window.Deno.core; + const ops = core.ops; const webidl = window.__bootstrap.webidl; const { byteLowerCase } = window.__bootstrap.infra; const { BlobPrototype } = window.__bootstrap.file; @@ -68,8 +69,7 @@ * @returns {{ requestRid: number, requestBodyRid: number | null }} */ function opFetch(method, url, headers, clientRid, hasBody, bodyLength, body) { - return core.opSync( - "op_fetch", + return ops.op_fetch( method, url, headers, @@ -560,7 +560,7 @@ } // Pass the resolved URL to v8. - core.opSync("op_wasm_streaming_set_url", rid, res.url); + ops.op_wasm_streaming_set_url(rid, res.url); if (res.body !== null) { // 2.6. @@ -571,7 +571,7 @@ while (true) { const { value: chunk, done } = await reader.read(); if (done) break; - core.opSync("op_wasm_streaming_feed", rid, chunk); + ops.op_wasm_streaming_feed(rid, chunk); } })().then( // 2.7 |