summaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
2022-09-09chore: forward v1.25.2 release commit to main (#15831)denobot
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2022-09-08chore: update url crate to 2.3.1 (#15818)Leo Kettmeir
2022-09-07fix: upgrade deno_ast to 0.19 (#15808)David Sherret
2022-09-07chore: bump url crate to 2.3.0 (#15800)Divy Srivastava
2022-09-07fix(core): make errors more resistant to tampering (#15789)Colin Ihrig
This commit makes error objects more resistant to prototype tampering. This bug was found when updating the deno_std Node compatibility layer to Node 18. The Node test 'parallel/test-assert-fail.js' was breaking std's assertion library. Refs: https://github.com/denoland/deno_std/pull/2585
2022-09-07perf(ops): inline &[u8] arguments and enable fast API (#15731)Divy Srivastava
2022-09-07fix(ext/flash): use utf8 length as Content-Length (#15793)Divy Srivastava
2022-09-07fix(core): opAsync leaks a promise on type error (#15795)Aapo Alasuutari
2022-09-06perf(runtime): short-circuit `queue_async_op` for Poll::Ready (#15773)Divy Srivastava
2022-09-06fix(core): Register external references for imports to the SnapshotCreator ↵Giovanny Gutiérrez
(#15621) Several functions used for handling of dynamic imports and "import.meta" object were not registered as external references and caused V8 to crash during snapshotting. These functions are now registered as external refs and aborts are no longer happening.
2022-09-06fix(watch): ignore unload errors on drop (#15782)Nayeem Rahman
2022-09-02refactor(test): grab runTests() and runBenchmarks() from __bootstrap (#15420)Nayeem Rahman
2022-09-02fix(ext/timers): create primordial `eval` (#15110)Garcia
2022-09-02fix(repl): don't terminate on unhandled error events (#15548)Nayeem Rahman
2022-09-02chore: forward v1.25.1 release commit to main (#15735)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2022-09-01refactor(core): Move optional callbacks from `JsRuntimeState` to ↵Andreu Botella
`ContextState` (#15599) The `JsRuntimeState` struct stores a number of JS callbacks that are used either in the event loop or when interacting with V8. Some of these callback fields are vectors of callbacks, and therefore could plausibly store at least one callback per realm. However, some of those fields are `Option<v8::Global<v8::Function>>`, which would make the callbacks set by a realm override the one that might have been set by a different realm. As it turns out, all of the current such optional callbacks (`js_promise_reject_cb`, `js_format_exception_cb` and `js_wasm_streaming_cb`) are only used from inside a realm, and therefore this change makes it so such callbacks can only be set from inside a realm, and will only affect that realm.
2022-09-01fix(serde_v8): no panic on reading large text file (#15494)Geert-Jan Zwiers
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2022-09-01chore(serde_v8): take mutable reference in `ToV8::to_v8` (#15707)Divy Srivastava
2022-08-30perf: use fast api for `core.isProxy` (#15682)Divy Srivastava
2022-08-27perf(runtime): optimize allocations in read/write checks (#15631)Divy Srivastava
2022-08-25v1.25.0Bartek Iwańczuk
2022-08-23chore: upgrade rusty_v8 to v0.49.0 (#15547)Bartek Iwańczuk
2022-08-23refactor(core/runtime): clean up extra type cast (#15539)Geert-Jan Zwiers
2022-08-21fix: Free up JsRuntime state global handles before snapshot (#15491)Giovanny Gutiérrez
2022-08-21feat: `queueMicrotask()` error handling (#15522)Nayeem Rahman
Adds error event dispatching for queueMicrotask(). Consequently unhandled errors are now reported with Deno.core.terminate(), which is immune to the existing quirk with plainly thrown errors (#14158).
2022-08-21chore: use Rust 1.63.0 (#15464)Mathias Lafeldt
2022-08-21feat(ops): V8 Fast Calls (#15291)Divy Srivastava
2022-08-21fix(core/runtime): always cancel termination in exception handling (#15514)Nayeem Rahman
2022-08-18feat(ext/flash): An optimized http/1.1 server (#15405)Divy Srivastava
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl> Co-authored-by: crowlkats <crowlkats@toaxl.com> Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-08-15chore: upgrade rusty_v8 to 0.48.1 (#15310)Bartek Iwańczuk
2022-08-11chore: forward v1.24.3 release commit to main (#15462)denobot
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-11perf(ops): Monomorphic sync op calls (#15337)Aapo Alasuutari
Welcome to better optimised op calls! Currently opSync is called with parameters of every type and count. This most definitely makes the call megamorphic. Additionally, it seems that spread params leads to V8 not being able to optimise the calls quite as well (apparently Fast Calls cannot be used with spread params). Monomorphising op calls should lead to some improved performance. Now that unwrapping of sync ops results is done on Rust side, this is pretty simple: ``` opSync("op_foo", param1, param2); // -> turns to ops.op_foo(param1, param2); ``` This means sync op calls are now just directly calling the native binding function. When V8 Fast API Calls are enabled, this will enable those to be called on the optimised path. Monomorphising async ops likely requires using callbacks and is left as an exercise to the reader.
2022-08-11refactor(core): unwrap sync ops in rust (#15449)Nayeem Rahman
2022-08-10feat(core): Add support for async ops in realms (#14734)Andreu Botella
Pull request #14019 enabled initial support for realms, but it did not include support for async ops anywhere other than the main realm. The main issue was that the `js_recv_cb` callback, which resolves promises corresponding to async ops, was only set for the main realm, so async ops in other realms would never resolve. Furthermore, promise ID's are specific to each realm, which meant that async ops from other realms would result in a wrong promise from the main realm being resolved. This change creates a `ContextState` struct, similar to `JsRuntimeState` but stored in a slot of each `v8::Context`, which contains a `js_recv_cb` callback for each realm. Combined with a new list of known realms, which stores them as `v8::Weak<v8::Context>`, and a change in the `#[op]` macro to pass the current context to `queue_async_op`, this makes it possible to send the results of promises for different realms to their realm, and prevent the ID's from getting mixed up. Additionally, since promise ID's are no longer unique to the isolate, having a single set of unrefed ops doesn't work. This change therefore also moves `unrefed_ops` from `JsRuntimeState` to `ContextState`, and adds the lengths of the unrefed op sets for all known realms to get the total number of unrefed ops to compare in the event loop. Co-authored-by: Luis Malheiro <luismalheiro@gmail.com>
2022-08-05chore: forward v1.24.2 release commit to main (#15410)denobot
2022-08-03core: remove heapStats type definition (#15393)Zach
2022-08-01refactor(core/error): use evaluated call sites for formatting (#15369)Nayeem Rahman
2022-07-31core: Add types for `Deno.core.print()` (#15283)Zicklag
2022-07-30fix(core): BorrowMutError in nested error (#15352)Bartek Iwańczuk
2022-07-29Forward 1.24.1 to main (#15333) (#15336)Colin Ihrig
1.24.1 (#15333) Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
2022-07-28serde_v8: improvements to avoid hitting unimplemented codepaths (#13915)Arthur Silva
2022-07-27chore: upgrade rusty_v8 to 0.47.1 (#15324)Bartek Iwańczuk
2022-07-25refactor(core): remove unneeded ops for uncaughtException (#15296)Bartek Iwańczuk
2022-07-23fix: unhandledrejection handling for sync throw in top level (#15279)Bartek Iwańczuk
Fixes an edge in "unhandledrejection" event that prevent synchronous errors being surfaced when throw from a top-level scope.
2022-07-22Revert "feat(ops): V8 Fast Calls (#15122)" (#15276)Divy Srivastava
This reverts commit 03dc3b8972f460e40d0b75fc3207cae9fe4f60da.
2022-07-22feat(ops): V8 Fast Calls (#15122)Divy Srivastava
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-07-211.24.0 (#15262)denobot
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-07-20Reland "feat: add "unhandledrejection" event support" (#15211)Bartek Iwańczuk
2022-07-19chore: upgrade rusty_v8 to 0.47.0 (#15247)Bartek Iwańczuk
2022-07-19feat: emit files on demand and fix racy emit (#15220)David Sherret