diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-12-20 00:34:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-20 00:34:22 +0100 |
commit | e924bbdf3606e83ff9eef3a8ed640c4ecc34444f (patch) | |
tree | 19847fac129a678c1e5efa5f3495c8414146fa22 /cli/lsp/mod.rs | |
parent | 660f75e066226a635375b70225df165bcf759077 (diff) |
fix: TLA in web worker (#8809)
Implementors of `deno_core::JsRuntime` might want to do additional actions
during each turn of event loop, eg. `deno_runtime::Worker` polls inspector,
`deno_runtime::WebWorker` receives/dispatches messages from/to worker host.
Previously `JsRuntime::mod_evaluate` was implemented in such fashion that it
only polled `JsRuntime`'s event loop. This behavior turned out to be wrong
in the example of `WebWorker` which couldn't receive/dispatch messages because
its implementation of event loop was never called.
This commit rewrites "mod_evaluate" to return a handle to receiver that resolves
when module's promise resolves. It is now implementors responsibility to poll
event loop after calling `mod_evaluate`.
Diffstat (limited to 'cli/lsp/mod.rs')
0 files changed, 0 insertions, 0 deletions