Age | Commit message (Collapse) | Author |
|
|
|
|
|
This ensures that provided extensions are all correctly setup and ready to use once the JsRuntime constructor returns
Note: this will also initialize ops for to-be-snapshotted runtimes
|
|
|
|
Fixes a pesky bug in the fetch implementation where if the init part is
specified in `fetch` instead of the `Request` constructor, the
fillHeaders function receives two references to the same object, causing
it to append to the same list being iterated over.
|
|
|
|
Extensions allow declarative extensions to "JsRuntime" (ops, state, JS or middleware).
This allows for:
- `op_crates` to be plug-and-play & self-contained, reducing complexity leaked to consumers
- op middleware (like metrics_op) to be opt-in and for new middleware (unstable, tracing,...)
- `MainWorker` and `WebWorker` to be composable, allowing users to extend workers with their ops whilst benefiting from the other infrastructure (inspector, etc...)
In short extensions improve deno's modularity, reducing complexity and leaky abstractions for embedders and the internal codebase.
|
|
General cleanup of module loading code, tried to reduce indentation in various methods
on "JsRuntime" to improve readability.
Added "JsRuntime::handle_scope" helper function, which returns a "v8::HandleScope".
This was done to reduce a code pattern that happens all over the "deno_core".
Additionally if event loop hangs during loading of dynamic modules a list of
currently pending dynamic imports is printed.
|
|
|
|
|
|
`InvalidDNSNameError` is thrown when a string is not a valid hostname,
e.g. it contains invalid characters, or starts with a numeric digit. It
does not involve a (failed) DNS lookup.
|
|
Prefer RUSTFLAGS="-D warnings" to prevent warnings, but cannot
enable yet due to #10378.
|
|
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
|
|
Fixes: #10334
|
|
Release crates for the cli 1.9.2 release.
|
|
|
|
|
|
- register builtin v8 errors in core.js so consumers don't have to
- remove complexity of error args handling (consumers must provide a
constructor with custom args, core simply provides msg arg)
|
|
|
|
* Revert "tooling(bench_util): benching and profiling utilities (#10223)"
This reverts commit 733a00030582375c43fa156e978f25df6ecc9e9a.
* Upgrade notify
|
|
This commit aligns the `fetch` API and the `Request` / `Response`
classes belonging to it to the spec. This commit enables all the
relevant `fetch` WPT tests. Spec compliance is now at around 90%.
Performance is essentially identical now (within 1% of 1.9.0).
|
|
|
|
|
|
|
|
This commit aligns `Headers` to spec. It also removes the now unused
03_dom_iterable.js file. We now pass all relevant `Headers` WPT. We do
not implement any sort of header filtering, as we are a server side
runtime.
This is likely not the most efficient implementation of `Headers` yet.
It is however spec compliant. Once all the APIs in the `HTTP` hot loop
are correct we can start optimizing them. It is likely that this commit
reduces bench throughput temporarily.
|
|
This PR aligns `FormData` to spec. All WPT tests are passing.
|
|
Move timers out of runtime/ and into a standalone op crate.
|
|
|
|
This commit introduces a performance optimization for the native HTTP
server. From my testing it is about 2-6% faster than `main`. Request
headers in the HTTP servers are now lazilly instatated when they are
accessed, rather than being preemptively wrapped in the `Headers` class.
|
|
|
|
|
|
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
(#10127)
|
|
This commit adds blob URL support in `fetch`. Tested via WPT. This is
the first op_crate to have a rust dependency on a different op_crate.
|
|
According to
https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder,
TextEncoder should ignore the "encoding" parameter and always use
"utf-8".
|
|
This commit adds data URL support in `fetch`. Tested via wpt.
|
|
|
|
This commit updates crate dependencies.
|
|
This adds some algorithms from the whatwg mimesniff, whatwg infra, and
whatwg encoding specs that FileReader needs to use internally.
|
|
This changes the custom input converters in deno_file to use deno_webidl
converters.
|
|
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.
|
|
|
|
Also enables WPT for FileReader.
|
|
This commit rewrites most of the ops to use "serde_v8" instead
of "json" serialization.
|
|
|
|
|
|
This reverts commit f8aff8edcdb7330a8cc397e2af2ec445533ce970.
|
|
It is possible that the WebSocket is already closed when we try to
close it with `WebSocket#close` or in the `error` or `close` events.
Currently this leads to an uncatchable promise rejection. This changes
this so that closing an already closed WebSocket is a noop.
|
|
Fixes #5666
|
|
|