diff options
Diffstat (limited to 'runtime/js/11_workers.js')
-rw-r--r-- | runtime/js/11_workers.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/js/11_workers.js b/runtime/js/11_workers.js index 948542d1c..5e3253dff 100644 --- a/runtime/js/11_workers.js +++ b/runtime/js/11_workers.js @@ -3,6 +3,7 @@ ((window) => { const core = window.Deno.core; + const ops = core.ops; const { Error, ObjectPrototypeIsPrototypeOf, @@ -31,7 +32,7 @@ name, workerType, ) { - return core.opSync("op_create_worker", { + return ops.op_create_worker({ hasSourceCode, name, permissions: serializePermissions(permissions), @@ -42,11 +43,11 @@ } function hostTerminateWorker(id) { - core.opSync("op_host_terminate_worker", id); + ops.op_host_terminate_worker(id); } function hostPostMessage(id, data) { - core.opSync("op_host_post_message", id, data); + ops.op_host_post_message(id, data); } function hostRecvCtrl(id) { |