refactor: remove dispatch_json.js from cli/rt and cli/tsc (#7521)

Instead use Deno.core.jsonOpSync and Deno.core.jsonOpAsync
This commit is contained in:
Bartek Iwańczuk 2020-09-16 22:22:43 +02:00 committed by GitHub
parent 104aebdfb5
commit 6c4da0e429
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 177 additions and 373 deletions

View file

@ -1,18 +1,18 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
((window) => {
const { sendSync } = window.__bootstrap.dispatchJson;
const core = window.Deno.core;
function opQuery(desc) {
return sendSync("op_query_permission", desc).state;
return core.jsonOpSync("op_query_permission", desc).state;
}
function opRevoke(desc) {
return sendSync("op_revoke_permission", desc).state;
return core.jsonOpSync("op_revoke_permission", desc).state;
}
function opRequest(desc) {
return sendSync("op_request_permission", desc).state;
return core.jsonOpSync("op_request_permission", desc).state;
}
class PermissionStatus {