diff options
Diffstat (limited to 'runtime/js/11_workers.js')
-rw-r--r-- | runtime/js/11_workers.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/js/11_workers.js b/runtime/js/11_workers.js index b11195713..2c602ab60 100644 --- a/runtime/js/11_workers.js +++ b/runtime/js/11_workers.js @@ -17,7 +17,7 @@ permissions, name, ) { - return core.jsonOpSync("op_create_worker", { + return core.opSync("op_create_worker", { hasSourceCode, name, permissions, @@ -28,15 +28,15 @@ } function hostTerminateWorker(id) { - core.jsonOpSync("op_host_terminate_worker", id); + core.opSync("op_host_terminate_worker", id); } function hostPostMessage(id, data) { - core.jsonOpSync("op_host_post_message", id, data); + core.opSync("op_host_post_message", id, data); } function hostGetMessage(id) { - return core.jsonOpAsync("op_host_get_message", id); + return core.opAsync("op_host_get_message", id); } const encoder = new TextEncoder(); @@ -268,7 +268,7 @@ if (globalThis instanceof Window) { throw new Error("Unhandled error event reached main worker."); } else { - core.jsonOpSync( + core.opSync( "op_host_unhandled_error", event.error.message, ); @@ -287,7 +287,7 @@ if (globalThis instanceof Window) { throw new Error("Unhandled error event reached main worker."); } else { - core.jsonOpSync( + core.opSync( "op_host_unhandled_error", event.error.message, ); |