diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-04-14 16:07:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-14 16:07:24 -0400 |
commit | c7e1f8fabdc87d3622fd94769c57197d5dfecad3 (patch) | |
tree | 9942097cdbba11f2af002208a2ef70f1f196b594 /cli/worker.rs | |
parent | b413cd5afd6b74b3e50bf6dbb5972ea7df9f34fd (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.rs | 2 |
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"); |