From 6c4da0e429eb47dae6a220c5576a39f137615bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 16 Sep 2020 22:22:43 +0200 Subject: refactor: remove dispatch_json.js from cli/rt and cli/tsc (#7521) Instead use Deno.core.jsonOpSync and Deno.core.jsonOpAsync --- cli/rt/26_fetch.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli/rt/26_fetch.js') diff --git a/cli/rt/26_fetch.js b/cli/rt/26_fetch.js index 9e34aa8d8..1c1d8c78f 100644 --- a/cli/rt/26_fetch.js +++ b/cli/rt/26_fetch.js @@ -1,12 +1,12 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. ((window) => { + const core = window.Deno.core; const { notImplemented } = window.__bootstrap.util; const { getHeaderValueParams, isTypedArray } = window.__bootstrap.webUtil; const { Blob, bytesSymbol: blobBytesSymbol } = window.__bootstrap.blob; const { read } = window.__bootstrap.io; const { close } = window.__bootstrap.resources; - const { sendSync, sendAsync } = window.__bootstrap.dispatchJson; const Body = window.__bootstrap.body; const { ReadableStream } = window.__bootstrap.streams; const { MultipartBuilder } = window.__bootstrap.multipart; @@ -17,7 +17,7 @@ } function opCreateHttpClient(args) { - return sendSync("op_create_http_client", args); + return core.jsonOpSync("op_create_http_client", args); } class HttpClient { @@ -35,7 +35,7 @@ zeroCopy = new Uint8Array(body.buffer, body.byteOffset, body.byteLength); } - return sendAsync("op_fetch", args, ...(zeroCopy ? [zeroCopy] : [])); + return core.jsonOpAsync("op_fetch", args, ...(zeroCopy ? [zeroCopy] : [])); } const NULL_BODY_STATUS = [101, 204, 205, 304]; -- cgit v1.2.3