diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-09-17 18:09:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-17 18:09:50 +0200 |
commit | bda937938550a0969588a6878d2fb6d72c17b22d (patch) | |
tree | cad613f3e6ec0dcc545a08e8ec394b599425babd /core/core.js | |
parent | 3421f4dbbd5cabb3a0866ebb3b8aeae5b62730ef (diff) |
refactor: move op_resources and op_close to deno_core (#7539)
Moves op_close and op_resources to deno_core::ops and exports them.
Adds serde dependency to deno_core and reexports it.
Moves JS implementation of those ops to Deno.core and reexports them in Deno.
Diffstat (limited to 'core/core.js')
-rw-r--r-- | core/core.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/core.js b/core/core.js index b0de55b2c..7b4e24702 100644 --- a/core/core.js +++ b/core/core.js @@ -256,6 +256,14 @@ SharedQueue Binary Layout promise.resolve(res); } + function resources() { + return jsonOpSync("op_resources"); + } + + function close(rid) { + jsonOpSync("op_close", { rid }); + } + Object.assign(window.Deno.core, { jsonOpAsync, jsonOpSync, @@ -263,6 +271,8 @@ SharedQueue Binary Layout dispatch: send, dispatchByName: dispatch, ops, + close, + resources, registerErrorClass, getErrorClass, // sharedQueue is private but exposed for testing. |