summaryrefslogtreecommitdiff
path: root/cli/worker.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-04-14 16:07:24 -0400
committerGitHub <noreply@github.com>2019-04-14 16:07:24 -0400
commitc7e1f8fabdc87d3622fd94769c57197d5dfecad3 (patch)
tree9942097cdbba11f2af002208a2ef70f1f196b594 /cli/worker.rs
parentb413cd5afd6b74b3e50bf6dbb5972ea7df9f34fd (diff)
Fix silent error, add custom panic handler (#2098)
This is to work around Tokio's panic recovery feature. Ref https://github.com/tokio-rs/tokio/issues/495 Ref https://github.com/tokio-rs/tokio/issues/209 Ref https://github.com/denoland/deno/issues/1311 Fixes #2097
Diffstat (limited to 'cli/worker.rs')
-rw-r--r--cli/worker.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/worker.rs b/cli/worker.rs
index dea5e534a..7178639c5 100644
--- a/cli/worker.rs
+++ b/cli/worker.rs
@@ -324,7 +324,7 @@ mod tests {
onmessage = function(e) {
console.log("msg from main script", e.data);
if (e.data == "exit") {
- close();
+ delete window.onmessage;
return;
} else {
console.assert(e.data === "hi");