v8
9.0.257(node16.0.0)
V8 is Google's open source JavaScript engine
|
#include <v8.h>
Static Public Member Functions | |
static void | SetSnapshotDataBlob (StartupData *startup_blob) |
static void | SetDcheckErrorHandler (DcheckErrorCallback that) |
static void | SetFlagsFromString (const char *str) |
static void | SetFlagsFromString (const char *str, size_t length) |
static void | SetFlagsFromCommandLine (int *argc, char **argv, bool remove_flags) |
static const char * | GetVersion () |
static V8_INLINE bool | Initialize () |
static void | SetEntropySource (EntropySource source) |
static void | SetReturnAddressLocationResolver (ReturnAddressLocationResolver return_address_resolver) |
static bool | Dispose () |
static bool | InitializeICU (const char *icu_data_file=nullptr) |
static bool | InitializeICUDefaultLocation (const char *exec_path, const char *icu_data_file=nullptr) |
static void | InitializeExternalStartupData (const char *directory_path) |
static void | InitializeExternalStartupDataFromFile (const char *snapshot_blob) |
static void | InitializePlatform (Platform *platform) |
static void | ShutdownPlatform () |
static bool | EnableWebAssemblyTrapHandler (bool use_v8_signal_handler) |
static void | GetSharedMemoryStatistics (SharedMemoryStatistics *statistics) |
static void | SetIsCrossOriginIsolated () |
Friends | |
template<class K , class V , class T > | |
class | PersistentValueMapBase |
template<class T > | |
class | BasicTracedReference |
template<class T > | |
class | Global |
template<class T > | |
class | Local |
template<class T > | |
class | MaybeLocal |
template<class T > | |
class | Maybe |
template<class T > | |
class | TracedGlobal |
class | TracedReferenceBase |
template<class T > | |
class | TracedReference |
template<class T > | |
class | WeakCallbackInfo |
template<class T > | |
class | Eternal |
template<class T > | |
class | PersistentBase |
template<class T , class M > | |
class | Persistent |
class | Context |
|
static |
Releases any resources used by v8 and stops any utility threads that may be running. Note that disposing v8 is permanent, it cannot be reinitialized.
It should generally not be necessary to dispose v8 before exiting a process, this should happen automatically. It is only necessary to use if the process needs the resources taken up by v8.
|
static |
Activate trap-based bounds checking for WebAssembly.
use_v8_signal_handler | Whether V8 should install its own signal handler or rely on the embedder's. |
|
static |
Get statistics about the shared memory usage.
|
static |
Get the version string.
|
inlinestatic |
Initializes V8. This function needs to be called before the first Isolate is created. It always returns true.
Definition at line 9939 of file v8.h.
References v8::internal::HeapSandboxIsEnabled(), v8::internal::PointerCompressionIsEnabled(), and v8::internal::SmiValuesAre31Bits().
|
static |
Initialize the external startup data. The embedder only needs to invoke this method when external startup data was enabled in a build.
If V8 was compiled with the startup data in an external file, then V8 needs to be given those external files during startup. There are three ways to do this:
|
static |
|
static |
|
static |
Initialize the ICU library bundled with V8. The embedder should only invoke this method when using the bundled ICU. If V8 was compiled with the ICU data in an external file and when the default location of that file should be used, a path to the executable must be provided. Returns true on success.
The default is a file called icudtl.dat side-by-side with the executable.
Optionally, the location of the data file can be provided to override the default.
|
static |
Sets the v8::Platform to use. This should be invoked before V8 is initialized.
|
static |
Set the callback to invoke in case of Dcheck failures.
|
static |
Allows the host application to provide a callback which can be used as a source of entropy for random number generators.
|
static |
Sets V8 flags from the command line.
|
static |
Sets V8 flags from a string.
|
static |
|
static |
Notifies V8 that the process is cross-origin-isolated, which enables defining the SharedArrayBuffer function on the global object of Contexts.
|
static |
Allows the host application to provide a callback that allows v8 to cooperate with a profiler that rewrites return addresses on stack.
|
static |
Hand startup data to V8, in case the embedder has chosen to build V8 with external startup data.
Note:
|
static |
Clears all references to the v8::Platform. This should be invoked after V8 was disposed.
|
friend |
Definition at line 10131 of file v8.h.
Referenced by BasicTracedReference< T >::As(), TracedGlobal< T >::Reset(), TracedReference< T >::Reset(), TracedGlobal< T >::TracedGlobal(), and TracedReference< T >::TracedReference().
|
friend |
Definition at line 10133 of file v8.h.
Referenced by PersistentValueVector< V, Traits >::Append(), PersistentValueVector< V, Traits >::Clear(), Global< T >::Pass(), PersistentValueMapBase< K, V, DefaultGlobalMapTraits< K, V > >::Release(), PersistentValueMapBase< K, V, DefaultGlobalMapTraits< K, V > >::RemoveWeak(), PersistentValueMap< K, V, DefaultPersistentValueMapTraits< K, V > >::Set(), and GlobalValueMap< K, V, DefaultGlobalMapTraits< K, V > >::Set().
|
friend |
Definition at line 10134 of file v8.h.
Referenced by Local< Value >::As(), Local< Value >::Cast(), FunctionCallbackInfo< T >::Data(), PropertyCallbackInfo< Value >::Data(), String::Empty(), V8InspectorClient::ensureDefaultContextInGroup(), EscapableHandleScope::Escape(), EscapableHandleScope::EscapeMaybe(), v8::False(), MaybeLocal< v8::String >::FromMaybe(), PersistentValueMapBase< K, V, DefaultGlobalMapTraits< K, V > >::Get(), Eternal< T >::Get(), PersistentBase< T >::Get(), PersistentValueVector< V, Traits >::Get(), TracedReferenceBase::Get(), BasicTracedReference< T >::Get(), ReturnValue< T >::Get(), Isolate::GetDataFromSnapshotOnce(), Context::GetDataFromSnapshotOnce(), Context::GetEmbedderData(), Object::GetInternalField(), Extension::GetNativeFunctionTemplate(), FunctionCallbackInfo< T >::Holder(), PropertyCallbackInfo< Value >::Holder(), PersistentValueMapBase< K, V, Traits >::PersistentValueReference::NewLocal(), FunctionCallbackInfo< T >::NewTarget(), v8::Null(), FunctionCallbackInfo< T >::operator[](), PersistentValueMap< K, V, DefaultPersistentValueMapTraits< K, V > >::SetUnique(), GlobalValueMap< K, V, DefaultGlobalMapTraits< K, V > >::SetUnique(), FunctionCallbackInfo< T >::This(), PropertyCallbackInfo< Value >::This(), MaybeLocal< v8::String >::ToLocalChecked(), v8::True(), and v8::Undefined().
|
friend |
Definition at line 10138 of file v8.h.
Referenced by v8::Just(), v8::JustVoid(), and v8::Nothing().
|
friend |
Definition at line 10136 of file v8.h.
Referenced by V8InspectorClient::memoryInfo().
|
friend |
Persistent is a way to create a strong pointer from an off-heap object to another on-heap object. As long as the Persistent handle is alive the GC will keep the object pointed to alive. The Persistent handle is always a GC root from the point of view of the GC. Persistent must be constructed and destructed in the same thread.
Definition at line 10148 of file v8.h.
Referenced by Persistent< v8::Promise >::As(), and Persistent< v8::Promise >::Cast().
|
friend |
Definition at line 10147 of file v8.h.
Referenced by Global< T >::Global(), and Persistent< v8::Promise >::Persistent().
|
friend |
Definition at line 10125 of file v8.h.
Referenced by GlobalValueMap< K, V, DefaultGlobalMapTraits< K, V > >::GlobalValueMap(), and PersistentValueMap< K, V, DefaultPersistentValueMapTraits< K, V > >::PersistentValueMap().
|
friend |
Definition at line 10140 of file v8.h.
Referenced by TracedGlobal< T >::As().
|
friend |
Definition at line 10143 of file v8.h.
Referenced by TracedReference< T >::As().
|
friend |
|
friend |
Definition at line 10145 of file v8.h.
Referenced by PersistentBase< T >::SetWeak().