|
using | NativeObject = void * |
|
using | SnapshotObjectId = uint32_t |
|
typedef uintptr_t | PersistentContainerValue |
|
template<class T > |
using | Handle = Local< T > |
|
template<class T > |
using | UniquePersistent = Global< T > |
|
typedef void(* | AccessorGetterCallback) (Local< String > property, const PropertyCallbackInfo< Value > &info) |
|
typedef void(* | AccessorNameGetterCallback) (Local< Name > property, const PropertyCallbackInfo< Value > &info) |
|
typedef void(* | AccessorSetterCallback) (Local< String > property, Local< Value > value, const PropertyCallbackInfo< void > &info) |
|
typedef void(* | AccessorNameSetterCallback) (Local< Name > property, Local< Value > value, const PropertyCallbackInfo< void > &info) |
|
typedef void(* | FunctionCallback) (const FunctionCallbackInfo< Value > &info) |
|
typedef void(* | GenericNamedPropertyGetterCallback) (Local< Name > property, const PropertyCallbackInfo< Value > &info) |
|
typedef void(* | GenericNamedPropertySetterCallback) (Local< Name > property, Local< Value > value, const PropertyCallbackInfo< Value > &info) |
|
typedef void(* | GenericNamedPropertyQueryCallback) (Local< Name > property, const PropertyCallbackInfo< Integer > &info) |
|
typedef void(* | GenericNamedPropertyDeleterCallback) (Local< Name > property, const PropertyCallbackInfo< Boolean > &info) |
|
typedef void(* | GenericNamedPropertyEnumeratorCallback) (const PropertyCallbackInfo< Array > &info) |
|
typedef void(* | GenericNamedPropertyDefinerCallback) (Local< Name > property, const PropertyDescriptor &desc, const PropertyCallbackInfo< Value > &info) |
|
typedef void(* | GenericNamedPropertyDescriptorCallback) (Local< Name > property, const PropertyCallbackInfo< Value > &info) |
|
typedef void(* | IndexedPropertyGetterCallback) (uint32_t index, const PropertyCallbackInfo< Value > &info) |
|
typedef void(* | IndexedPropertySetterCallback) (uint32_t index, Local< Value > value, const PropertyCallbackInfo< Value > &info) |
|
typedef void(* | IndexedPropertyQueryCallback) (uint32_t index, const PropertyCallbackInfo< Integer > &info) |
|
typedef void(* | IndexedPropertyDeleterCallback) (uint32_t index, const PropertyCallbackInfo< Boolean > &info) |
|
typedef void(* | IndexedPropertyEnumeratorCallback) (const PropertyCallbackInfo< Array > &info) |
|
typedef void(* | IndexedPropertyDefinerCallback) (uint32_t index, const PropertyDescriptor &desc, const PropertyCallbackInfo< Value > &info) |
|
typedef void(* | IndexedPropertyDescriptorCallback) (uint32_t index, const PropertyCallbackInfo< Value > &info) |
|
typedef bool(* | AccessCheckCallback) (Local< Context > accessing_context, Local< Object > accessed_object, Local< Value > data) |
|
typedef void(* | FatalErrorCallback) (const char *location, const char *message) |
|
typedef void(* | OOMErrorCallback) (const char *location, bool is_heap_oom) |
|
typedef void(* | DcheckErrorCallback) (const char *file, int line, const char *message) |
|
typedef void(* | MessageCallback) (Local< Message > message, Local< Value > data) |
|
typedef void(* | LogEventCallback) (const char *name, int event) |
|
typedef int *(* | CounterLookupCallback) (const char *name) |
|
typedef void *(* | CreateHistogramCallback) (const char *name, int min, int max, size_t buckets) |
|
typedef void(* | AddHistogramSampleCallback) (void *histogram, int sample) |
|
typedef void(* | AddCrashKeyCallback) (CrashKeyId id, const std::string &value) |
|
typedef void(* | BeforeCallEnteredCallback) (Isolate *) |
|
typedef void(* | CallCompletedCallback) (Isolate *) |
|
typedef void(* | HostCleanupFinalizationGroupCallback) (Local< Context > context, Local< FinalizationGroup > fg) |
|
typedef MaybeLocal< Promise >(* | HostImportModuleDynamicallyCallback) (Local< Context > context, Local< ScriptOrModule > referrer, Local< String > specifier) |
|
typedef void(* | HostInitializeImportMetaObjectCallback) (Local< Context > context, Local< Module > module, Local< Object > meta) |
|
typedef MaybeLocal< Value >(* | PrepareStackTraceCallback) (Local< Context > context, Local< Value > error, Local< Array > sites) |
|
typedef void(* | PromiseHook) (PromiseHookType type, Local< Promise > promise, Local< Value > parent) |
|
typedef void(* | PromiseRejectCallback) (PromiseRejectMessage message) |
|
typedef void(* | MicrotasksCompletedCallbackWithData) (Isolate *, void *) |
|
typedef void(* | MicrotaskCallback) (void *data) |
|
typedef void(* | FailedAccessCheckCallback) (Local< Object > target, AccessType type, Local< Value > data) |
|
typedef bool(* | AllowCodeGenerationFromStringsCallback) (Local< Context > context, Local< String > source) |
|
typedef MaybeLocal< String >(* | ModifyCodeGenerationFromStringsCallback) (Local< Context > context, Local< Value > source) |
|
typedef bool(* | ExtensionCallback) (const FunctionCallbackInfo< Value > &) |
|
typedef bool(* | AllowWasmCodeGenerationCallback) (Local< Context > context, Local< String > source) |
|
typedef void(* | ApiImplementationCallback) (const FunctionCallbackInfo< Value > &) |
|
typedef void(* | WasmStreamingCallback) (const FunctionCallbackInfo< Value > &) |
|
typedef bool(* | WasmThreadsEnabledCallback) (Local< Context > context) |
|
typedef Local< String >(* | WasmLoadSourceMapCallback) (Isolate *isolate, const char *name) |
|
typedef void(* | GCCallback) (GCType type, GCCallbackFlags flags) |
|
typedef void(* | InterruptCallback) (Isolate *isolate, void *data) |
|
typedef size_t(* | NearHeapLimitCallback) (void *data, size_t current_heap_limit, size_t initial_heap_limit) |
|
typedef void(* | JitCodeEventHandler) (const JitCodeEvent *event) |
|
typedef SerializeInternalFieldsCallback | SerializeEmbedderFieldsCallback |
|
typedef DeserializeInternalFieldsCallback | DeserializeEmbedderFieldsCallback |
|
typedef bool(* | EntropySource) (unsigned char *buffer, size_t length) |
|
typedef uintptr_t(* | ReturnAddressLocationResolver) (uintptr_t return_addr_location) |
|
|
enum | CpuProfilingMode { kLeafNodeLineNumbers
, kCallerLineNumbers
} |
|
enum | CpuProfilingNamingMode { kStandardNaming
, kDebugNaming
} |
|
enum | CpuProfilingLoggingMode { kLazyLogging
, kEagerLogging
} |
|
enum | CodeEventType { kUnknownType
} |
|
enum | PersistentContainerCallbackType { kNotWeak
, kWeakWithParameter
, kWeakWithInternalFields
} |
|
enum class | WeakCallbackType { kParameter
, kInternalFields
, kFinalizer
} |
|
enum | StateTag {
JS
, GC
, PARSER
, BYTECODE_COMPILER
,
COMPILER
, OTHER
, EXTERNAL
, IDLE
} |
|
enum class | NewStringType { kNormal
, kInternalized
} |
|
enum | PropertyAttribute { None = 0
, ReadOnly = 1 << 0
, DontEnum = 1 << 1
, DontDelete = 1 << 2
} |
|
enum | AccessControl { DEFAULT = 0
, ALL_CAN_READ = 1
, ALL_CAN_WRITE = 1 << 1
, PROHIBITS_OVERWRITING = 1 << 2
} |
|
enum | PropertyFilter {
ALL_PROPERTIES = 0
, ONLY_WRITABLE = 1
, ONLY_ENUMERABLE = 2
, ONLY_CONFIGURABLE = 4
,
SKIP_STRINGS = 8
, SKIP_SYMBOLS = 16
} |
|
enum class | SideEffectType { kHasSideEffect
, kHasNoSideEffect
, kHasSideEffectToReceiver
} |
|
enum class | KeyCollectionMode { kOwnOnly
, kIncludePrototypes
} |
|
enum class | IndexFilter { kIncludeIndices
, kSkipIndices
} |
|
enum class | KeyConversionMode { kConvertToString
, kKeepNumbers
} |
|
enum class | IntegrityLevel { kFrozen
, kSealed
} |
|
enum class | ConstructorBehavior { kThrow
, kAllow
} |
|
enum class | ArrayBufferCreationMode { kInternalized
, kExternalized
} |
|
enum | Intrinsic |
|
enum | AccessType {
ACCESS_GET
, ACCESS_SET
, ACCESS_HAS
, ACCESS_DELETE
,
ACCESS_KEYS
} |
|
enum class | PropertyHandlerFlags {
kNone = 0
, kAllCanRead = 1
, kNonMasking = 1 << 1
, kOnlyInterceptStrings = 1 << 2
,
kHasNoSideEffect = 1 << 3
} |
|
enum class | CrashKeyId { kIsolateAddress
, kReadonlySpaceFirstPageAddress
, kMapSpaceFirstPageAddress
, kCodeSpaceFirstPageAddress
} |
|
enum class | PromiseHookType { kInit
, kResolve
, kBefore
, kAfter
} |
|
enum | PromiseRejectEvent { kPromiseRejectWithNoHandler = 0
, kPromiseHandlerAddedAfterReject = 1
, kPromiseRejectAfterResolved = 2
, kPromiseResolveAfterResolved = 3
} |
|
enum class | MicrotasksPolicy { kExplicit
, kScoped
, kAuto
} |
|
enum | GCType {
kGCTypeScavenge = 1 << 0
, kGCTypeMarkSweepCompact = 1 << 1
, kGCTypeIncrementalMarking = 1 << 2
, kGCTypeProcessWeakCallbacks = 1 << 3
,
kGCTypeAll
} |
|
enum | GCCallbackFlags {
kNoGCCallbackFlags = 0
, kGCCallbackFlagConstructRetainedObjectInfos = 1 << 1
, kGCCallbackFlagForced = 1 << 2
, kGCCallbackFlagSynchronousPhantomCallbackProcessing = 1 << 3
,
kGCCallbackFlagCollectAllAvailableGarbage = 1 << 4
, kGCCallbackFlagCollectAllExternalMemory = 1 << 5
, kGCCallbackScheduleIdleGarbageCollection = 1 << 6
} |
|
enum | RAILMode : unsigned { PERFORMANCE_RESPONSE
, PERFORMANCE_ANIMATION
, PERFORMANCE_IDLE
, PERFORMANCE_LOAD
} |
|
enum | JitCodeEventOptions { kJitCodeEventDefault = 0
, kJitCodeEventEnumExisting = 1
} |
|
enum class | MemoryPressureLevel { kNone
, kModerate
, kCritical
} |
|
Profiler support for the V8 JavaScript engine.
Testing support for the V8 JavaScript engine.
Support for Persistent containers.
C++11 embedders can use STL containers with Global values, but pre-C++11 does not support the required move semantic and hence may want these container classes.
Compile-time constants.
This header provides access to information about the value serializer at compile time, without declaring or defining any symbols that require linking to V8.
The v8 JavaScript engine.
Interceptor for defineProperty requests on an object.
Use info.GetReturnValue()
to indicate whether the request was intercepted or not. If the definer successfully intercepts the request, i.e., if the request should not be further executed, call info.GetReturnValue().Set(value)
. If the definer did not intercept the request, i.e., if the request should be handled as if no interceptor is present, do not not call Set()
.
- Parameters
-
property | The name of the property for which the request was intercepted. |
desc | The property descriptor which is used to define the property if the request is not intercepted. |
info | Information about the intercepted request, such as isolate, receiver, return value, or whether running in ‘'use strict’mode. See PropertyCallbackInfo`. |
See also ObjectTemplate::SetHandler
.
Definition at line 5774 of file v8.h.
Intercepts all requests that query the attributes of the property, e.g., getOwnPropertyDescriptor(), propertyIsEnumerable(), and defineProperty().
Use info.GetReturnValue().Set(value)
to set the property attributes. The value is an integer encoding a v8::PropertyAttribute
.
- Parameters
-
property | The name of the property for which the request was intercepted. |
info | Information about the intercepted request, such as isolate, receiver, return value, or whether running in ‘'use strict’mode. See PropertyCallbackInfo`. |
- Note
- Some functions query the property attributes internally, even though they do not return the attributes. For example,
hasOwnProperty()
can trigger this interceptor depending on the state of the object.
See also ObjectTemplate::SetHandler.
Definition at line 5718 of file v8.h.
Interceptor for set requests on an object.
Use info.GetReturnValue()
to indicate whether the request was intercepted or not. If the setter successfully intercepts the request, i.e., if the request should not be further executed, call info.GetReturnValue().Set(value)
. If the setter did not intercept the request, i.e., if the request should be handled as if no interceptor is present, do not not call Set()
.
- Parameters
-
property | The name of the property for which the request was intercepted. |
value | The value which the property will have if the request is not intercepted. |
info | Information about the intercepted request, such as isolate, receiver, return value, or whether running in ‘'use strict’mode. See PropertyCallbackInfo`. |
See also ObjectTemplate::SetHandler.
Definition at line 5693 of file v8.h.
HostImportModuleDynamicallyCallback is called when we require the embedder to load a module. This is used as part of the dynamic import syntax.
The referrer contains metadata about the script/module that calls import.
The specifier is the name of the module that should be imported.
The embedder must compile, instantiate, evaluate the Module, and obtain it's namespace object.
The Promise returned from this function is forwarded to userland JavaScript. The embedder must resolve this promise with the module namespace object. In case of an exception, the embedder must reject this promise with the exception. If the promise creation itself fails (e.g. due to stack overflow), the embedder must propagate that exception by returning an empty MaybeLocal.
Definition at line 6792 of file v8.h.
PromiseHook with type kInit 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.
PromiseHook with type kResolve is called at the beginning of resolve or reject function defined by CreateResolvingFunctions.
PromiseHook with type kBefore is called at the beginning of the PromiseReactionJob.
PromiseHook with type kAfter is called right at the end of the PromiseReactionJob.
Enumerator |
---|
kInit | |
kResolve | |
kBefore | |
kAfter | |
Definition at line 6837 of file v8.h.