diff options
Diffstat (limited to 'core/core.js')
-rw-r--r-- | core/core.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/core.js b/core/core.js index f90dbcc18..a11f281f1 100644 --- a/core/core.js +++ b/core/core.js @@ -3,7 +3,7 @@ ((window) => { // Available on start due to bindings. - const { send } = window.Deno.core; + const { opcall } = window.Deno.core; let opsCache = {}; const errorMap = { @@ -61,7 +61,7 @@ function ops() { // op id 0 is a special value to retrieve the map of registered ops. - const newOpsCache = Object.fromEntries(send(0)); + const newOpsCache = Object.fromEntries(opcall(0)); opsCache = Object.freeze(newOpsCache); return opsCache; } @@ -76,7 +76,8 @@ } function dispatch(opName, promiseId, control, zeroCopy) { - return send(opsCache[opName], promiseId, control, zeroCopy); + const opId = typeof opName === "string" ? opsCache[opName] : opName; + return opcall(opId, promiseId, control, zeroCopy); } function registerErrorClass(className, errorClass) { @@ -124,8 +125,6 @@ Object.assign(window.Deno.core, { opAsync, opSync, - dispatch: send, - dispatchByName: dispatch, ops, close, resources, |