summaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
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-02Bump crate versions (#9651)Ryan Dahl
2021-02-25Upgrade rusty_v8 (V8 9.0.257.3) (#9605)Ryan Dahl
2021-02-25chore(core): optional args for registerErrorClass (#9602)Luca Casonato
2021-02-23refactor(core): cleanup module implementation (#9580)Bartek Iwańczuk
* remove "ModuleNameMap", instead define that map inline inside "Modules" struct * remove "dyn_import_id" argument from "mod_instantiate" * rename "Modules" struct to "ModuleMap" * rename "JsRuntime::modules" to "JsRuntime::module_map"
2021-02-23refactor(core): Allow multiple overflown responses in single poll (#9433)Inteon
This commit rewrites "JsRuntime::poll" function to fix a corner case that might caused "overflown_response" to be overwritten by other overflown response. The logic has been changed to allow returning multiple overflown response alongside responses from shared queue.
2021-02-21fix(core/bindings): Add stacks for dynamic import resolution errors (#9562)Nayeem Rahman
2021-02-20fix(core/runtime): Fix dynamic imports for already rejected modules (#9559)Nayeem Rahman
2021-02-19chore: rename default branch to main (#9503)Luca Casonato
2021-02-19fix(core): Make dynamic import async errors catchable (#9505)Nayeem Rahman
Fixes #6259
2021-02-17Make ModuleSpecifier a type alias, not wrapper struct (#9531)Ryan Dahl
2021-02-16feat: add structured cloning to Deno.core (#9458)Inteon
This commit adds two new "Deno.core" APIs: - "Deno.core.serialize" - "Deno.core.deserialize" These APIs are used to provide structured cloning of values and will be used for further web worker implementation. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-02-15upgrade: rusty_v8 0.19.0 (#9466)Bartek Iwańczuk
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2021-02-15refactor(core): Reduce verbosity of binding core functions (#9497)Aaron O'Mullan
2021-02-13refactor(core): Strongly typed deserialization of JSON ops (#9423)Jared Beller
This PR makes json_op_sync/async generic to all Deserialize/Serialize types instead of the loosely-typed serde_json::Value. Since serde_json::Value implements Deserialize/Serialize, very little existing code needs to be updated, however as json_op_sync/async are now generic, type inference is broken in some cases (see cli/build.rs:146). I've found this reduces a good bit of boilerplate, as seen in the updated deno_core examples. This change may also reduce serialization and deserialization overhead as serde has a better idea of what types it is working with. I am currently working on benchmarks to confirm this and I will update this PR with my findings.
2021-02-12chore: release crates (#9481)Bartek Iwańczuk
2021-02-09chore: update dependencies (#9455)Luca Casonato
2021-02-09chore: add flag to v8 (#9456)Bartek Iwańczuk
2021-02-07chore: fix typo in lib.deno_core.d.ts (#9416)Ikko Ashimine
2021-02-05upgrade: rusty_v8 0.17.0, v8 9.0.123 (#9413)Bartek Iwańczuk
2021-02-05chore: release crates (#9410)Bartek Iwańczuk
2021-02-04chore: use strict mode for internal runtime, core, and op_crates js (#9391)Developing
2021-02-01chore: make all tests annotated with `#[cfg(test)]` (#9347)Yusuke Tanaka
2021-02-01feat(lsp): add references code lens (#9316)Kitson Kelly
2021-01-29chore: upgrade tokio to 1.1.1 (#9327)Yusuke Tanaka
2021-01-29v1.7.1Ryan Dahl
2021-01-28chore: add jsdoc to 26_fetch.js and enable some fetch tests (#9305)Luca Casonato
2021-01-26chore: update crates (#9251)Luca Casonato
Updates SWC, dprint, deno_lint, deno_doc, serde, and Tokio (to 1.1.0). Co-authored-by: Kitson Kelly <me@kitsonkelly.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-01-21fix(core): Handle prepareStackTrace() throws (#9211)Nayeem Rahman
Fixes #9206
2021-01-19v1.7.0Ryan Dahl
2021-01-19upgrade: rusty_v8 0.16.0, v8 8.9.255.3 (#9180)Ryan Dahl
2021-01-13release cratesRyan Dahl
2021-01-11upgrade: tokio 1.0 (#8779)Bartek Iwańczuk
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2021-01-11chore: Move comment to correct place (#9086)Ryan Dahl
2021-01-10update copyright to 2021 (#9081)Ryan Dahl
2021-01-07 ignore "use asm" (#9019)Anonymous
Preventing V8 from logging erroneous line numbers. Use wasm.
2021-01-05refactor(core): simplify Deno.core initialisation, remove stale TODO (#8847)Bartek Iwańczuk
This commit rewrites initialisation of the "shared queue" and in effect prevents from double execution of "core/core.js" and "core/error.js". Previously both of these files were executed every time a "JsRuntime" was created. That lead to a situation where one copy of each script was included in the snapshot and then another copy would be executed after loading the snapshot. Effectively "JsRuntime::shared_init" was removed; instead execution of those scripts and actual initialisation of shared queue was split into two helper functions: "JsRuntime::js_init" and "JsRuntime::share_queue_init". Additionally stale TODO comments were removed.
2021-01-05fix: align encoding APIs to spec using WPT (#9004)Luca Casonato
2021-01-02upgrade: Rust 1.49.0 (#8955)Bartek Iwańczuk
2020-12-30chore: release crates (#8931)Bartek Iwańczuk
2020-12-29fix(core): Fix incorrect index in Promise.all error reporting (#8913)Deepanshu Utkarsh
2020-12-28upgrade: rusty_v8 0.15.0, v8 8.8.294 (#8898)Bartek Iwańczuk
2020-12-26fix: fetch bad URL will not panic (#8884)Yosi Pramajaya
2020-12-22core: fix http_bench_json_ops, register Error (#8860)Ben Noordhuis
Fixes the following runtime error for me when benchmarking: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error: Unregistered error class: "Error" Connection reset by peer (os error 104) Classes of errors returned from ops should be registered via Deno.core.registerErrorClass(). at processResponse (deno:core/core.js:219:13) at Object.jsonOpAsync (deno:core/core.js:240:12) at async read (http_bench_json_ops.js:29:21) at async serve (http_bench_json_ops.js:45:19)', core/examples/http_bench_json_ops.rs:260:28
2020-12-22chore: release crates (#8854)Bartek Iwańczuk
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-15fix(cli): make dynamic import errors catchable (#8750)Kitson Kelly
Fixes #6259
2020-12-14chore: release crates (#8765)Bartek Iwańczuk