summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-04-08 17:10:00 -0400
committerGitHub <noreply@github.com>2019-04-08 17:10:00 -0400
commit2debbdacb935cfe1eb7bb8d1f40a5063b339d90b (patch)
tree317dbe65c90a10811c62bb9fd2888641af83f5da /js
parent734cf781c6e606a8a836863a391c94cf4fad22d7 (diff)
Merge Worker and Isolate types (#2078)
Reduces generics.
Diffstat (limited to 'js')
-rw-r--r--js/compiler.ts1
-rw-r--r--js/workers.ts5
2 files changed, 4 insertions, 2 deletions
diff --git a/js/compiler.ts b/js/compiler.ts
index 6172b614f..1a85de5f5 100644
--- a/js/compiler.ts
+++ b/js/compiler.ts
@@ -46,7 +46,6 @@ type SourceMap = string;
interface CompilerLookup {
specifier: ModuleSpecifier;
referrer: ContainingFile;
- isWorker: boolean;
cmdId: number;
}
diff --git a/js/workers.ts b/js/workers.ts
index 6b768bf08..456449d48 100644
--- a/js/workers.ts
+++ b/js/workers.ts
@@ -129,10 +129,13 @@ export async function workerMain(): Promise<void> {
log("workerMain got null message. quitting.");
break;
}
+
if (window["onmessage"]) {
const event = { data };
window.onmessage(event);
- } else {
+ }
+
+ if (!window["onmessage"]) {
break;
}
}