Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
v8::Isolate::CreateParams Struct Reference

#include <v8-isolate.h>

Collaboration diagram for v8::Isolate::CreateParams:
[legend]

Public Member Functions

 CreateParams ()
 
 ~CreateParams ()
 
 CreateParams (const CreateParams &)=default
 
 CreateParams (CreateParams &&)=default
 
CreateParamsoperator= (const CreateParams &)=default
 
CreateParamsoperator= (CreateParams &&)=default
 

Public Attributes

JitCodeEventHandler code_event_handler = nullptr
 
ResourceConstraints constraints
 
const StartupDatasnapshot_blob = nullptr
 
CounterLookupCallback counter_lookup_callback = nullptr
 
CreateHistogramCallback create_histogram_callback = nullptr
 
AddHistogramSampleCallback add_histogram_sample_callback = nullptr
 
ArrayBuffer::Allocatorarray_buffer_allocator = nullptr
 
std::shared_ptr< ArrayBuffer::Allocatorarray_buffer_allocator_shared
 
const intptr_t * external_references = nullptr
 
bool allow_atomics_wait = true
 
int embedder_wrapper_type_index = -1
 
int embedder_wrapper_object_index = -1
 
FatalErrorCallback fatal_error_callback = nullptr
 
OOMErrorCallback oom_error_callback = nullptr
 
CppHeapcpp_heap = nullptr
 

Detailed Description

Initial configuration parameters for a new Isolate.

Examples
shell.cc.

Constructor & Destructor Documentation

◆ CreateParams() [1/3]

v8::Isolate::CreateParams::CreateParams ( )

◆ ~CreateParams()

v8::Isolate::CreateParams::~CreateParams ( )

◆ CreateParams() [2/3]

v8::Isolate::CreateParams::CreateParams ( const CreateParams )
default

◆ CreateParams() [3/3]

v8::Isolate::CreateParams::CreateParams ( CreateParams &&  )
default

Member Function Documentation

◆ operator=() [1/2]

CreateParams & v8::Isolate::CreateParams::operator= ( const CreateParams )
default

◆ operator=() [2/2]

CreateParams & v8::Isolate::CreateParams::operator= ( CreateParams &&  )
default

Member Data Documentation

◆ add_histogram_sample_callback

AddHistogramSampleCallback v8::Isolate::CreateParams::add_histogram_sample_callback = nullptr

◆ allow_atomics_wait

bool v8::Isolate::CreateParams::allow_atomics_wait = true

Whether calling Atomics.wait (a function that may block) is allowed in this isolate. This can also be configured via SetAllowAtomicsWait.

◆ array_buffer_allocator

ArrayBuffer::Allocator* v8::Isolate::CreateParams::array_buffer_allocator = nullptr

The ArrayBuffer::Allocator to use for allocating and freeing the backing store of ArrayBuffers.

If the shared_ptr version is used, the Isolate instance and every |BackingStore| allocated using this allocator hold a std::shared_ptr to the allocator, in order to facilitate lifetime management for the allocator instance.

Examples
shell.cc.

◆ array_buffer_allocator_shared

std::shared_ptr<ArrayBuffer::Allocator> v8::Isolate::CreateParams::array_buffer_allocator_shared

◆ code_event_handler

JitCodeEventHandler v8::Isolate::CreateParams::code_event_handler = nullptr

Allows the host application to provide the address of a function that is notified each time code is added, moved or removed.

◆ constraints

ResourceConstraints v8::Isolate::CreateParams::constraints

ResourceConstraints to use for the new Isolate.

◆ counter_lookup_callback

CounterLookupCallback v8::Isolate::CreateParams::counter_lookup_callback = nullptr

Enables the host application to provide a mechanism for recording statistics counters.

◆ cpp_heap

CppHeap* v8::Isolate::CreateParams::cpp_heap = nullptr

A CppHeap used to construct the Isolate. V8 takes ownership of the CppHeap passed this way.

◆ create_histogram_callback

CreateHistogramCallback v8::Isolate::CreateParams::create_histogram_callback = nullptr

Enables the host application to provide a mechanism for recording histograms. The CreateHistogram function returns a histogram which will later be passed to the AddHistogramSample function.

◆ embedder_wrapper_object_index

int v8::Isolate::CreateParams::embedder_wrapper_object_index = -1

◆ embedder_wrapper_type_index

int v8::Isolate::CreateParams::embedder_wrapper_type_index = -1

The following parameters describe the offsets for addressing type info for wrapped API objects and are used by the fast C API (for details see v8-fast-api-calls.h).

◆ external_references

const intptr_t* v8::Isolate::CreateParams::external_references = nullptr

Specifies an optional nullptr-terminated array of raw addresses in the embedder that V8 can match against during serialization and use for deserialization. This array and its content must stay valid for the entire lifetime of the isolate.

◆ fatal_error_callback

FatalErrorCallback v8::Isolate::CreateParams::fatal_error_callback = nullptr

Callbacks to invoke in case of fatal or OOM errors.

◆ oom_error_callback

OOMErrorCallback v8::Isolate::CreateParams::oom_error_callback = nullptr

◆ snapshot_blob

const StartupData* v8::Isolate::CreateParams::snapshot_blob = nullptr

Explicitly specify a startup snapshot blob. The embedder owns the blob. The embedder must ensure that the snapshot is from a trusted source.


The documentation for this struct was generated from the following file: