This splits the previous `op_url_parse` into:
- `op_url_parse`: parses a href with an optional base
- `op_url_reparse`: reparses a href with a modifier
This is a cleaner separation of concerns and it allows us to optimize & simplify args passed. Resulting in a 25% reduction in call overhead (~5000ns/call => ~3700ns/call in url_ops bench on my M1 Air)
Classic worker scripts are now executed in the context of a Tokio
runtime. This does mean we can not spawn more tokio runtimes in
"op_worker_sync_fetch". We instead spawn a new thread there, that can
create a new Tokio runtime that we can use to block the worker thread.
Because it was possible to disable those with a runtime flag, they were
not available through primordials. The flag has since been removed
upstream.
Refs: d59db06bf5
The streaming WASM support code inspects the Response object's
Content-Type header but if that was missing, it failed with a fairly
inscrutable "String.prototype.toLowerCase called on null or undefined"
exception. Now it raises a more legible "Invalid WebAssembly content
type" exception.
This commit implements classic workers, but only when the `--enable-testing-features-do-not-use` flag is provided. This change is not user facing. Classic workers are used extensively in WPT tests. The classic workers do not support loading from disk, and do not support TypeScript.
Co-authored-by: Luca Casonato <hello@lcas.dev>
This commit adds a test case for "Http: connection closed before
message completed" error as well as fixing an edge with resource
leak when the error is raised.
* refactor(ops): return BadResource errors in ResourceTable calls
Instead of relying on callers to map Options to Results via `.ok_or_else(bad_resource_id)` at over 176 different call sites ...
This PR improves localStorage write throughput by around 150x by caching
the prepared statements for SQLite and adding some DB pragmas.
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
cleanup(ext/http): simplify cookie header handling
Use `Vec::join` instead of essentially reimplementing it. There should be no meaningful performance delta
Normalizes the naming of the functions used to determine
if a path is a suitable match for the test runner and placed
them both in the the fs_util module.
Specifier collection partitions remote specifiers in their own
group which is appended to the collected specifiers at the
end of the routine meaning that the input order isn't respected
for remote specifiers.