summaryrefslogtreecommitdiff
path: root/runtime/web_worker.rs
AgeCommit message (Collapse)Author
2021-04-25refactor(core): move op cache sync responsibility to rust space (#10340)Aaron O'Mullan
Even if bootstrapping the JS runtime is low level, it's an abstraction leak of core to require users to call `Deno.core.ops()` in JS space. So instead we're introducing a `JsRuntime::sync_ops_cache()` method, once we have runtime extensions a new runtime will ensure the ops cache is setup (for the provided extensions) and then loading/unloading plugins should be the only operations that require op cache syncs
2021-04-21fix: do not panic on not found cwd (#10238)Satya Rohith
2021-04-20fix(runtime): include HTTP op in WebWorker (#10207)Satya Rohith
2021-04-19fix(runtime): handle race condition in postMessage where worker has ↵Liam Murphy
terminated (#10239) The panic was caused by the lack of an error class mapping for futures::channel::TrySendError, but it shouldn't have been throwing an error in the first place - when a worker has terminated, postMessage should just return. The issue was that the termination message hadn't yet been recieved, so it was carrying on with trying to send the message. This adds another check on the Rust side for if the channel is closed, and if it is the worker is treated as terminated.
2021-04-12refactor(deno): remove concept of bin & json ops (#10145)Aaron O'Mullan
2021-04-07feat: blob URL support (#10045)Luca Casonato
This commit adds blob URL support. Blob URLs are stored in a process global storage, that can be accessed from all workers, and the module loader. Blob URLs can be created using `URL.createObjectURL` and revoked using `URL.revokeObjectURL`. This commit does not add support for `fetch`ing blob URLs. This will be added in a follow up commit.
2021-03-26remove macro_use (#9884)Ryan Dahl
2021-03-14fix(runtime): do not require deno namespace in workers for crypto (#9784)Casper Beyer
2021-03-12chore: split web op crate (#9635)Luca Casonato
This commit starts splitting out the deno_web op crate into multiple smaller crates. This commit splits out WebIDL and URL API, but in the future I want to split out each spec into its own crate. That means we will have (in rough order of loading): `webidl`, `dom`, `streams`, `console`, `encoding`, `url`, `file`, `fetch`, `websocket`, and `webgpu` crates.
2021-03-04fix(runtime/web_worker): Don't block self.onmessage with TLA (#9619)Nayeem Rahman
This commit rewrites implementation of "JsRuntime::mod_evaluate". Event loop is no longer polled automatically and users must manually drive event loop forward after calling "mod_evaluate". Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-03-02refactor(op_crates/web): Move URL parsing to Rust (#9276)Nayeem Rahman
2021-03-01feat: WebGPU API (#7977)crowlKats
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-02-21feat(unstable): per op metrics (#9240)Luca Casonato
2021-02-17Make ModuleSpecifier a type alias, not wrapper struct (#9531)Ryan Dahl
2021-01-11upgrade: tokio 1.0 (#8779)Bartek Iwańczuk
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2021-01-11chore: update copyright to 2021 (#9092)Yusuke Tanaka
2021-01-07feat: add --location=<href> and globalThis.location (#7369)Nayeem Rahman
2021-01-06refactor: move WebSocket API to an op_crate (#9026)Luca Casonato
2021-01-05feat(cli/standalone): support runtime flags for deno compile (#8738)Nayeem Rahman
2020-12-20Revert "fix: TLA in web worker (#8809)" (#8839)Bartek Iwańczuk
This reverts commit e924bbdf3606e83ff9eef3a8ed640c4ecc34444f.
2020-12-20fix: TLA in web worker (#8809)Bartek Iwańczuk
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`.
2020-12-16refactor: rewrite ops to use ResourceTable2 (#8512)Bartek Iwańczuk
This commit migrates all ops to use new resource table and "AsyncRefCell". Old implementation of resource table was completely removed and all code referencing it was updated to use new system.
2020-12-13refactor: deno_runtime crate (#8640)Bartek Iwańczuk
This commit moves Deno JS runtime, ops, permissions and inspector implementation to new "deno_runtime" crate located in "runtime/" directory. Details in "runtime/README.md". Co-authored-by: Ryan Dahl <ry@tinyclouds.org>