summaryrefslogtreecommitdiff
path: root/ext/fetch/26_fetch.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fetch/26_fetch.js')
-rw-r--r--ext/fetch/26_fetch.js8
1 files changed, 4 insertions, 4 deletions
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