summaryrefslogtreecommitdiff
path: root/cli/js/runtime_worker.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-02-25 09:14:27 -0500
committerGitHub <noreply@github.com>2020-02-25 09:14:27 -0500
commit91b606aaae23bcb790b55adc5fe70a182a37d564 (patch)
tree16b56a21ffcb3991569eda984fbd14073bdbd3ae /cli/js/runtime_worker.ts
parent805992b14a65a6dbfb857dea6d9b657477de043d (diff)
Clean up how we use opIds (#4118)
Diffstat (limited to 'cli/js/runtime_worker.ts')
-rw-r--r--cli/js/runtime_worker.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/js/runtime_worker.ts b/cli/js/runtime_worker.ts
index a9ed8b924..cdc7d52dd 100644
--- a/cli/js/runtime_worker.ts
+++ b/cli/js/runtime_worker.ts
@@ -16,7 +16,6 @@ import {
windowOrWorkerGlobalScopeProperties,
eventTargetProperties
} from "./globals.ts";
-import * as dispatch from "./dispatch.ts";
import { sendSync } from "./dispatch_json.ts";
import { log } from "./util.ts";
import { TextEncoder } from "./text_encoding.ts";
@@ -32,7 +31,7 @@ export const onerror: (e: { data: any }) => void = (): void => {};
export function postMessage(data: any): void {
const dataJson = JSON.stringify(data);
const dataIntArray = encoder.encode(dataJson);
- sendSync(dispatch.OP_WORKER_POST_MESSAGE, {}, dataIntArray);
+ sendSync("op_worker_post_message", {}, dataIntArray);
}
let isClosing = false;
@@ -44,7 +43,7 @@ export function close(): void {
}
isClosing = true;
- sendSync(dispatch.OP_WORKER_CLOSE);
+ sendSync("op_worker_close");
}
export async function workerMessageRecvCallback(data: string): Promise<void> {