summaryrefslogtreecommitdiff
path: root/cli/rt/11_resources.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-09-16 22:22:43 +0200
committerGitHub <noreply@github.com>2020-09-16 22:22:43 +0200
commit6c4da0e429eb47dae6a220c5576a39f137615bb8 (patch)
treea8715428caea00105acc9a10fcd0f356085d3fa7 /cli/rt/11_resources.js
parent104aebdfb5d01f7482bacef6d58c2ce16da44334 (diff)
refactor: remove dispatch_json.js from cli/rt and cli/tsc (#7521)
Instead use Deno.core.jsonOpSync and Deno.core.jsonOpAsync
Diffstat (limited to 'cli/rt/11_resources.js')
-rw-r--r--cli/rt/11_resources.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/rt/11_resources.js b/cli/rt/11_resources.js
index 247e033cc..9a1595b78 100644
--- a/cli/rt/11_resources.js
+++ b/cli/rt/11_resources.js
@@ -1,10 +1,10 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
((window) => {
- const sendSync = window.__bootstrap.dispatchJson.sendSync;
+ const core = window.Deno.core;
function resources() {
- const res = sendSync("op_resources");
+ const res = core.jsonOpSync("op_resources");
const resources = {};
for (const resourceTuple of res) {
resources[resourceTuple[0]] = resourceTuple[1];
@@ -13,7 +13,7 @@
}
function close(rid) {
- sendSync("op_close", { rid });
+ core.jsonOpSync("op_close", { rid });
}
window.__bootstrap.resources = {