summaryrefslogtreecommitdiff
path: root/runtime/js/11_workers.js
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-04-12 21:55:05 +0200
committerGitHub <noreply@github.com>2021-04-12 15:55:05 -0400
commit46b1c653c0c433932908b7610f60b409af134c76 (patch)
tree00d8b59c8c4e9b90538d548ebd828d2b3f94d4fd /runtime/js/11_workers.js
parenta20504642d083172f297543f9788b128e9c2e0bc (diff)
refactor(deno): remove concept of bin & json ops (#10145)
Diffstat (limited to 'runtime/js/11_workers.js')
-rw-r--r--runtime/js/11_workers.js12
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,
);