Bindings to the V8 Inspector API. Documentation for the V8 inspector API is
very sparse, so here are a few references for the next sorry soul who has to
dig into it.
A thread-safe allocator that V8 uses to allocate |ArrayBuffer|’s memory.
The allocator is a global V8 setting. It has to be set via
Isolate::CreateParams.
Compilation data that the embedder can cache and pass back to speed up future
compilations. The data is produced if the CompilerOptions passed to the compilation
functions in ScriptCompiler contains produce_data_to_cache = true. The data to cache
can then can be retrieved from UnboundScript.
A CallbackScope can be used to bootstrap a HandleScope and
ContextScope inside a callback function that gets called by V8.
Bootstrapping a scope inside a callback is the only valid use case of this
type; using it in other places leads to undefined behavior, which is also
the reason CallbackScope::new() is marked as being an unsafe function.
Stack-allocated class which sets the execution context for all operations
executed within a local scope. After entering a context, all code compiled
and run is compiled and run in this context.
The argument information given to function call callbacks. This
class provides access to information about the context of the call,
including the receiver, the number and values of arguments, and
the holder of the function.
A FunctionTemplate is used to create functions at runtime. There
can only be one function created from a FunctionTemplate in a
context. The lifetime of the created function is equal to the
lifetime of the context. So in case the embedder needs to create
temporary functions that can be collected using Scripts is
preferred.
Applications can register callback functions which will be called before and
after certain garbage collection operations. Allocations are not allowed in
the callback functions, you therefore cannot manipulate objects (set or
delete properties for example) since it is possible such operations will
result in the allocation of objects.
An object reference that is independent of any handle scope. Where
a Local handle only lives as long as the HandleScope in which it was
allocated, a global handle remains valid until it is dropped.
A stack-allocated class that governs a number of local handles.
After a handle scope has been created, all local handles will be
allocated within that handle scope until either the handle scope is
deleted or another handle scope is created. If there is already a
handle scope and a new one is created, all allocations will take
place in the new handle scope until it is deleted. After that,
new handles will again be allocated in the original handle scope.
Isolate represents an isolated instance of the V8 engine. V8 isolates have
completely separate states. Objects from one isolate must not be used in
other isolates. The embedder can create multiple isolates and use them in
parallel in multiple threads. An isolate can be entered by at most one
thread at any given time. The Locker/Unlocker API must be used to
synchronize.
Representation of a JavaScript stack trace. The information collected is a
snapshot of the execution stack and the information remains valid after
execution continues.
ValueDeserializer is a stack object used as entry-point for an owned and
pinned heap object ValueDeserializerHeap.
The ’a lifetime is the lifetime of the ValueDeserializerImpl implementation.
The ’s lifetime is the lifetime of the HandleScope which is used to retrieve
a Local<’s, Context> for the CallbackScopes
The V8 interface for WebAssembly streaming compilation.
When streaming compilation is initiated, V8 passes a Self
object to the embedder such that the embedder can pass the
input bytes for streaming compilation to V8.
An object reference that does not prevent garbage collection for the object,
and which allows installing finalization callbacks which will be called
after the object has been GC’d.
Memory pressure level for the MemoryPressureNotification.
None hints V8 that there is no memory pressure.
Moderate hints V8 to speed up incremental garbage collection at the cost
of higher latency due to garbage collection pauses.
Critical hints V8 to free memory as soon as possible. Garbage collection
pauses at this level will be large.
PromiseHook with type Init is called when a new promise is
created. When a new promise is created as part of the chain in the
case of Promise.then or in the intermediate promises created by
Promise.{race, all}/AsyncFunctionAwait, we pass the parent promise
otherwise we pass undefined.
Options for marking whether callbacks may trigger JS-observable side
effects. Side-effect-free callbacks are allowlisted during debug evaluation
with throwOnSideEffect. It applies when calling a Function,
FunctionTemplate, or an Accessor callback. For Interceptors, please see
PropertyHandlerFlags’s kHasNoSideEffect.
Callbacks that only cause side effects to the receiver are allowlisted if
invoked on receiver objects that are created within the same debug-evaluate
call, as these objects are temporary and the side effect does not escape.
Trait used for direct read from the deserialization buffer.
Mostly used by the read_host_object callback function in the
ValueDeserializerImpl trait to create custom deserialization logic.
Trait used for direct write to the serialization buffer.
Mostly used by the write_host_object callback function in the
ValueSerializerImpl trait to create custom serialization logic.
Creates a platform that is identical to the default platform, but does not
enforce thread-isolated allocations. This may reduce security in some cases,
so this method should be used with caution in cases where the threading
guarantees of new_default_platform cannot be upheld (generally for tests).
HostCreateShadowRealmContextCallback is called each time a ShadowRealm
is being constructed. You can use HandleScope::get_current_context to
get the Context in which the constructor is being run.