We may build rusty_v8 on platforms other than the common ones (for
example, linux/riscv64), though they are not officially supported and
prebuilt binaries are not available. This patch adds several
environment variables:
- `DISABLE_CLANG`: use `is_clang=false` and disables Clang-specific
options for building with GCC, etc.
- `EXTRA_GN_ARGS`: allow to pass extra GN arguments, such as custom
toolchain
- `NO_PRINT_GN_ARGS`: Disables printing GN arguments to stdout. GN
currently segfaults on riscv64 when printing arguments. Since it is
trivial, we can have an option to simply disable it.
Also added fallback `arch` and `os` declaration in `platform()` to
remove compile-time error.
Changes signature of "FunctionTemplate::build_fast" to allow
to pass "CFunctionInfo" explicitly. If it's not passed explicitly,
it's still autogenerated.
Adds bindings for:
- v8::Context::GetContinuationPreservedEmbedderData
- v8::Context::SetContinuationPreservedEmbedderData
These APIs are available on the "HandleScope".
---------
Co-authored-by: Bert Belder <bertbelder@gmail.com>
This change updates the documentation of `Weak::with_finalizer` to
reflect the fact that the previous stricter guarantees were dropped in
#1181. It also adds documentation to `Weak::with_guaranteed_finalizer`
and `Weak::clone_with_guaranteed_finalizer`.
Removing this garbage collection trigger removes the guarantee that
"regular" FinalizerCallbacks will be called before the isolate goes away.
It is fine as both spec and V8 do not provide this guarantee and we were
overly strict in this case.
Enabling the shared read-only heap comes with a restriction that all
isolates running at the same time must be created from the same snapshot.
This is problematic for Deno, which has separate "runtime" and "typescript
compiler" snapshots, and sometimes uses them both at the same time.