v8  5.5.372 (node 7.10.1)
V8 is Google's open source JavaScript engine
v8 Namespace Reference

Namespaces

 base
 
 experimental
 
 internal
 
 platform
 

Data Structures

class  Debug
 
class  Task
 
class  IdleTask
 
class  ConvertableToTraceFormat
 
class  Platform
 
struct  CpuProfileDeoptFrame
 
struct  CpuProfileDeoptInfo
 
class  TracingCpuProfiler
 
struct  TickSample
 
class  CpuProfileNode
 
class  CpuProfile
 
class  CpuProfiler
 
class  HeapGraphEdge
 
class  HeapGraphNode
 
class  OutputStream
 
class  HeapSnapshot
 
class  ActivityControl
 
class  AllocationProfile
 
class  HeapProfiler
 
class  RetainedObjectInfo
 
struct  HeapStatsUpdate
 
class  Testing
 
class  StdMapTraits
 
class  DefaultPersistentValueMapTraits
 
class  DefaultGlobalMapTraits
 
class  PersistentValueMapBase
 
class  PersistentValueMap
 
class  GlobalValueMap
 
class  StdPersistentValueMap
 
class  StdGlobalValueMap
 
class  DefaultPersistentValueVectorTraits
 
class  PersistentValueVector
 
class  Maybe
 
class  Local
 
class  MaybeLocal
 
class  Eternal
 
class  NonCopyablePersistentTraits
 
class  PersistentBase
 
class  Persistent
 
class  Global
 
class  WeakCallbackObject
 
class  FunctionCallbackInfo
 
class  PropertyCallbackInfo
 
class  ReturnValue
 
class  UniqueId
 
class  WeakCallbackInfo
 
class  EmbedderReachableReferenceReporter
 
struct  CopyablePersistentTraits
 
class  HandleScope
 
class  EscapableHandleScope
 
class  SealHandleScope
 
class  Data
 
class  ScriptOriginOptions
 
class  ScriptOrigin
 
class  UnboundScript
 
class  Module
 
class  Script
 
class  ScriptCompiler
 
class  Message
 
class  StackTrace
 
class  StackFrame
 
struct  RegisterState
 
struct  SampleInfo
 
class  JSON
 
class  ValueSerializer
 
class  ValueDeserializer
 
class  NativeWeakMap
 
class  Value
 
class  Primitive
 
class  Boolean
 
class  Name
 
class  String
 
class  Symbol
 
class  Private
 
class  Number
 
class  Integer
 
class  Int32
 
class  Uint32
 
class  Object
 
class  Array
 
class  Map
 
class  Set
 
class  Function
 
class  Promise
 
class  PropertyDescriptor
 
class  Proxy
 
class  WasmCompiledModule
 
class  ArrayBuffer
 
class  ArrayBufferView
 
class  TypedArray
 
class  Uint8Array
 
class  Uint8ClampedArray
 
class  Int8Array
 
class  Uint16Array
 
class  Int16Array
 
class  Uint32Array
 
class  Int32Array
 
class  Float32Array
 
class  Float64Array
 
class  DataView
 
class  SharedArrayBuffer
 
class  Date
 
class  NumberObject
 
class  BooleanObject
 
class  StringObject
 
class  SymbolObject
 
class  RegExp
 
class  External
 
class  Template
 
class  FunctionTemplate
 
struct  NamedPropertyHandlerConfiguration
 
struct  IndexedPropertyHandlerConfiguration
 
class  ObjectTemplate
 
class  Signature
 
class  AccessorSignature
 
class  ExternalOneByteStringResourceImpl
 
class  Extension
 
class  ResourceConstraints
 
class  Exception
 
class  PromiseRejectMessage
 
class  MicrotasksScope
 
class  HeapStatistics
 
class  HeapSpaceStatistics
 
class  HeapObjectStatistics
 
class  HeapCodeStatistics
 
struct  JitCodeEvent
 
class  ExternalResourceVisitor
 
class  PersistentHandleVisitor
 
class  EmbedderHeapTracer
 
class  Isolate
 
class  StartupData
 
class  V8
 
class  SnapshotCreator
 
class  TryCatch
 
class  ExtensionConfiguration
 
class  Context
 
class  Unlocker
 
class  Locker
 
class  AlignOfHelper
 

Typedefs

typedef uint32_t SnapshotObjectId
 
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(* NamedPropertyGetterCallback) (Local< String > property, const PropertyCallbackInfo< Value > &info)
 
typedef void(* NamedPropertySetterCallback) (Local< String > property, Local< Value > value, const PropertyCallbackInfo< Value > &info)
 
typedef void(* NamedPropertyQueryCallback) (Local< String > property, const PropertyCallbackInfo< Integer > &info)
 
typedef void(* NamedPropertyDeleterCallback) (Local< String > property, const PropertyCallbackInfo< Boolean > &info)
 
typedef void(* NamedPropertyEnumeratorCallback) (const PropertyCallbackInfo< Array > &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(* MessageCallback) (Local< Message > message, Local< Value > error)
 
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(* BeforeCallEnteredCallback) (Isolate *)
 
typedef void(* CallCompletedCallback) (Isolate *)
 
typedef void(* DeprecatedCallCompletedCallback) ()
 
typedef void(* PromiseRejectCallback) (PromiseRejectMessage message)
 
typedef void(* MicrotasksCompletedCallback) (Isolate *)
 
typedef void(* MicrotaskCallback) (void *data)
 
typedef void(* FailedAccessCheckCallback) (Local< Object > target, AccessType type, Local< Value > data)
 
typedef bool(* AllowCodeGenerationFromStringsCallback) (Local< Context > context)
 
typedef void(* GCCallback) (GCType type, GCCallbackFlags flags)
 
typedef void(* InterruptCallback) (Isolate *isolate, void *data)
 
typedef void(* FunctionEntryHook) (uintptr_t function, uintptr_t return_addr_location)
 
typedef void(* JitCodeEventHandler) (const JitCodeEvent *event)
 
typedef bool(* EntropySource) (unsigned char *buffer, size_t length)
 
typedef uintptr_t(* ReturnAddressLocationResolver) (uintptr_t return_addr_location)
 

Enumerations

enum  DebugEvent {
  Break = 1 , Exception = 2 , NewFunction = 3 , BeforeCompile = 4 ,
  AfterCompile = 5 , CompileError = 6 , AsyncTaskEvent = 7
}
 
enum  PersistentContainerCallbackType { kNotWeak , kWeakWithParameter , kWeakWithInternalFields , kWeak = kWeakWithParameter }
 
enum class  WeakCallbackType { kParameter , kInternalFields , kFinalizer }
 
enum  StateTag {
  JS , GC , 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  KeyCollectionMode { kOwnOnly , kIncludePrototypes }
 
enum class  IndexFilter { kIncludeIndices , kSkipIndices }
 
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 }
 
enum  ObjectSpace {
  kObjectSpaceNewSpace = 1 << 0 , kObjectSpaceOldSpace = 1 << 1 , kObjectSpaceCodeSpace = 1 << 2 , kObjectSpaceMapSpace = 1 << 3 ,
  kObjectSpaceLoSpace = 1 << 4 , kObjectSpaceAll
}
 
enum  AllocationAction { kAllocationActionAllocate = 1 << 0 , kAllocationActionFree = 1 << 1 , kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree }
 
enum  PromiseRejectEvent { kPromiseRejectWithNoHandler = 0 , kPromiseHandlerAddedAfterReject = 1 }
 
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
}
 
enum  RAILMode { PERFORMANCE_RESPONSE , PERFORMANCE_ANIMATION , PERFORMANCE_IDLE , PERFORMANCE_LOAD }
 
enum  JitCodeEventOptions { kJitCodeEventDefault = 0 , kJitCodeEventEnumExisting = 1 }
 
enum class  MemoryPressureLevel { kNone , kModerate , kCritical }
 

Functions

void V8_EXPORT RegisterExtension (Extension *extension)
 
V8_INLINE Local< PrimitiveUndefined (Isolate *isolate)
 
V8_INLINE Local< PrimitiveNull (Isolate *isolate)
 
V8_INLINE Local< BooleanTrue (Isolate *isolate)
 
V8_INLINE Local< BooleanFalse (Isolate *isolate)
 
template<class T >
Maybe< T > Nothing ()
 
template<class T >
Maybe< T > Just (const T &t)
 

Detailed Description

Debugger support for the V8 JavaScript engine.

This header contains a set of experimental V8 APIs. We hope these will become a part of standard V8, but they may also be removed if we deem the experiment to not be successul.

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.

The v8 JavaScript engine.

Typedef Documentation

◆ AccessCheckCallback

typedef bool(* AccessCheckCallback) (Local< Context > accessing_context, Local< Object > accessed_object, Local< Value > data)

Returns true if the given context should be allowed to access the given object.

Definition at line 4972 of file v8.h.

◆ AccessorGetterCallback

typedef void(* AccessorGetterCallback) (Local< String > property, const PropertyCallbackInfo< Value > &info)

Accessor[Getter|Setter] are used as callback functions when setting|getting a particular property. See Object and ObjectTemplate's method SetAccessor.

Definition at line 2826 of file v8.h.

◆ AccessorNameGetterCallback

typedef void(* AccessorNameGetterCallback) (Local< Name > property, const PropertyCallbackInfo< Value > &info)

Definition at line 2829 of file v8.h.

◆ AccessorNameSetterCallback

typedef void(* AccessorNameSetterCallback) (Local< Name > property, Local< Value > value, const PropertyCallbackInfo< void > &info)

Definition at line 2838 of file v8.h.

◆ AccessorSetterCallback

typedef void(* AccessorSetterCallback) (Local< String > property, Local< Value > value, const PropertyCallbackInfo< void > &info)

Definition at line 2834 of file v8.h.

◆ AddHistogramSampleCallback

typedef void(* AddHistogramSampleCallback) (void *histogram, int sample)

Definition at line 5740 of file v8.h.

◆ AllowCodeGenerationFromStringsCallback

typedef bool(* AllowCodeGenerationFromStringsCallback) (Local< Context > context)

Callback to check if code generation from strings is allowed. See Context::AllowCodeGenerationFromStrings.

Definition at line 5865 of file v8.h.

◆ BeforeCallEnteredCallback

typedef void(* BeforeCallEnteredCallback) (Isolate *)

Definition at line 5761 of file v8.h.

◆ CallCompletedCallback

typedef void(* CallCompletedCallback) (Isolate *)

Definition at line 5762 of file v8.h.

◆ CounterLookupCallback

typedef int*(* CounterLookupCallback) (const char *name)

Definition at line 5733 of file v8.h.

◆ CreateHistogramCallback

typedef void*(* CreateHistogramCallback) (const char *name, int min, int max, size_t buckets)

Definition at line 5735 of file v8.h.

◆ DeprecatedCallCompletedCallback

typedef void(* DeprecatedCallCompletedCallback) ()

Definition at line 5763 of file v8.h.

◆ EntropySource

typedef bool(* EntropySource) (unsigned char *buffer, size_t length)

EntropySource is used as a callback function when v8 needs a source of entropy.

Definition at line 7140 of file v8.h.

◆ FailedAccessCheckCallback

typedef void(* FailedAccessCheckCallback) (Local< Object > target, AccessType type, Local< Value > data)

Definition at line 5855 of file v8.h.

◆ FatalErrorCallback

typedef void(* FatalErrorCallback) (const char *location, const char *message)

Definition at line 5692 of file v8.h.

◆ FunctionCallback

typedef void(* FunctionCallback) (const FunctionCallbackInfo< Value > &info)

Definition at line 3635 of file v8.h.

◆ FunctionEntryHook

typedef void(* FunctionEntryHook) (uintptr_t function, uintptr_t return_addr_location)

FunctionEntryHook is the type of the profile entry hook called at entry to any generated function when function-level profiling is enabled.

Parameters
functionthe address of the function that's being entered.
return_addr_locationpoints to a location on stack where the machine return address resides. This can be used to identify the caller of function, and/or modified to divert execution when function exits.
Note
the entry hook must not cause garbage collection.

Definition at line 6010 of file v8.h.

◆ GCCallback

typedef void(* GCCallback) (GCType type, GCCallbackFlags flags)

Definition at line 5906 of file v8.h.

◆ GenericNamedPropertyDefinerCallback

typedef void(* GenericNamedPropertyDefinerCallback) (Local< Name > property, const PropertyDescriptor &desc, const PropertyCallbackInfo< Value > &info)

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
propertyThe name of the property for which the request was intercepted.
descThe property descriptor which is used to define the property if the request is not intercepted.
infoInformation about the intercepted request, such as isolate, receiver, return value, or whether running in ‘'use strict’mode. SeePropertyCallbackInfo`.

See also ObjectTemplate::SetHandler.

Definition at line 4882 of file v8.h.

◆ GenericNamedPropertyDeleterCallback

typedef void(* GenericNamedPropertyDeleterCallback) (Local< Name > property, const PropertyCallbackInfo< Boolean > &info)

Interceptor for delete requests on an object.

Use info.GetReturnValue() to indicate whether the request was intercepted or not. If the deleter successfully intercepts the request, i.e., if the request should not be further executed, call info.GetReturnValue().Set(value) with a boolean value. The value is used as the return value of delete.

Parameters
propertyThe name of the property for which the request was intercepted.
infoInformation about the intercepted request, such as isolate, receiver, return value, or whether running in ‘'use strict’mode. SeePropertyCallbackInfo`.
Note
If you need to mimic the behavior of delete, i.e., throw in strict mode instead of returning false, use info.ShouldThrowOnError() to determine if you are in strict mode.

See also ObjectTemplate::SetHandler.

Definition at line 4851 of file v8.h.

◆ GenericNamedPropertyDescriptorCallback

typedef void(* GenericNamedPropertyDescriptorCallback) (Local< Name > property, const PropertyCallbackInfo< Value > &info)

Interceptor for getOwnPropertyDescriptor requests on an object.

Use info.GetReturnValue().Set() to set the return value of the intercepted request. The return value must be an object that can be converted to a PropertyDescriptor, e.g., a v8::value returned from v8::Object::getOwnPropertyDescriptor.

Parameters
propertyThe 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. SeePropertyCallbackInfo`.
Note
If GetOwnPropertyDescriptor is intercepted, it will always return true, i.e., indicate that the property was found.

See also ObjectTemplate::SetHandler.

Definition at line 4905 of file v8.h.

◆ GenericNamedPropertyEnumeratorCallback

typedef void(* GenericNamedPropertyEnumeratorCallback) (const PropertyCallbackInfo< Array > &info)

Returns an array containing the names of the properties the named property getter intercepts.

Definition at line 4859 of file v8.h.

◆ GenericNamedPropertyGetterCallback

typedef void(* GenericNamedPropertyGetterCallback) (Local< Name > property, const PropertyCallbackInfo< Value > &info)

Interceptor for get requests on an object.

Use info.GetReturnValue().Set() to set the return value of the intercepted get request.

Parameters
propertyThe name of the property for which the request was intercepted.
infoInformation about the intercepted request, such as isolate, receiver, return value, or whether running in 'use strict' mode. See PropertyCallbackInfo.
void GetterCallback(
Local<Name> name,
info.GetReturnValue().Set(v8_num(42));
}
templ->InstanceTemplate()->SetHandler(
LocalContext env;
env->Global()
->Set(env.local(), v8_str("obj"), templ->GetFunction(env.local())
.ToLocalChecked()
->NewInstance(env.local())
.ToLocalChecked())
.FromJust();
v8::Local<v8::Value> result = CompileRun("obj.a = 17; obj.a");
CHECK(v8_num(42)->Equals(env.local(), result).FromJust());
static Local< FunctionTemplate > New(Isolate *isolate, FunctionCallback callback=0, Local< Value > data=Local< Value >(), Local< Signature > signature=Local< Signature >(), int length=0, ConstructorBehavior behavior=ConstructorBehavior::kAllow)
Definition: v8.h:221
V8_INLINE ReturnValue< T > GetReturnValue() const
Definition: v8.h:9412

See also ObjectTemplate::SetHandler.

Definition at line 4778 of file v8.h.

◆ GenericNamedPropertyQueryCallback

typedef void(* GenericNamedPropertyQueryCallback) (Local< Name > property, const PropertyCallbackInfo< Integer > &info)

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 interger encoding a v8::PropertyAttribute.

Parameters
propertyThe name of the property for which the request was intercepted.
infoInformation about the intercepted request, such as isolate, receiver, return value, or whether running in ‘'use strict’mode. SeePropertyCallbackInfo`.
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 4827 of file v8.h.

◆ GenericNamedPropertySetterCallback

typedef void(* GenericNamedPropertySetterCallback) (Local< Name > property, Local< Value > value, const PropertyCallbackInfo< Value > &info)

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
propertyThe name of the property for which the request was intercepted.
valueThe value which the property will have if the request is not intercepted.
infoInformation about the intercepted request, such as isolate, receiver, return value, or whether running in ‘'use strict’mode. SeePropertyCallbackInfo`.

See also ObjectTemplate::SetHandler.

Definition at line 4802 of file v8.h.

◆ Handle

using Handle = Local<T>

Definition at line 348 of file v8.h.

◆ IndexedPropertyDefinerCallback

typedef void(* IndexedPropertyDefinerCallback) (uint32_t index, const PropertyDescriptor &desc, const PropertyCallbackInfo< Value > &info)

See v8::GenericNamedPropertyDefinerCallback.

Definition at line 4946 of file v8.h.

◆ IndexedPropertyDeleterCallback

typedef void(* IndexedPropertyDeleterCallback) (uint32_t index, const PropertyCallbackInfo< Boolean > &info)

See v8::GenericNamedPropertyDeleterCallback.

Definition at line 4933 of file v8.h.

◆ IndexedPropertyDescriptorCallback

typedef void(* IndexedPropertyDescriptorCallback) (uint32_t index, const PropertyCallbackInfo< Value > &info)

See v8::GenericNamedPropertyDescriptorCallback.

Definition at line 4953 of file v8.h.

◆ IndexedPropertyEnumeratorCallback

typedef void(* IndexedPropertyEnumeratorCallback) (const PropertyCallbackInfo< Array > &info)

See v8::GenericNamedPropertyEnumeratorCallback.

Definition at line 4940 of file v8.h.

◆ IndexedPropertyGetterCallback

typedef void(* IndexedPropertyGetterCallback) (uint32_t index, const PropertyCallbackInfo< Value > &info)

See v8::GenericNamedPropertyGetterCallback.

Definition at line 4911 of file v8.h.

◆ IndexedPropertyQueryCallback

typedef void(* IndexedPropertyQueryCallback) (uint32_t index, const PropertyCallbackInfo< Integer > &info)

See v8::GenericNamedPropertyQueryCallback.

Definition at line 4926 of file v8.h.

◆ IndexedPropertySetterCallback

typedef void(* IndexedPropertySetterCallback) (uint32_t index, Local< Value > value, const PropertyCallbackInfo< Value > &info)

See v8::GenericNamedPropertySetterCallback.

Definition at line 4918 of file v8.h.

◆ InterruptCallback

typedef void(* InterruptCallback) (Isolate *isolate, void *data)

Definition at line 5908 of file v8.h.

◆ JitCodeEventHandler

typedef void(* JitCodeEventHandler) (const JitCodeEvent *event)

Callback function passed to SetJitCodeEventHandler.

Parameters
eventcode add, move or removal event.

Definition at line 6114 of file v8.h.

◆ LogEventCallback

typedef void(* LogEventCallback) (const char *name, int event)

Definition at line 5700 of file v8.h.

◆ MessageCallback

typedef void(* MessageCallback) (Local< Message > message, Local< Value > error)

Definition at line 5696 of file v8.h.

◆ MicrotaskCallback

typedef void(* MicrotaskCallback) (void *data)

Definition at line 5800 of file v8.h.

◆ MicrotasksCompletedCallback

typedef void(* MicrotasksCompletedCallback) (Isolate *)

Definition at line 5799 of file v8.h.

◆ NamedPropertyDeleterCallback

typedef void(* NamedPropertyDeleterCallback) (Local< String > property, const PropertyCallbackInfo< Boolean > &info)

Returns a non-empty handle if the deleter intercepts the request. The return value is true if the property could be deleted and false otherwise.

Definition at line 4726 of file v8.h.

◆ NamedPropertyEnumeratorCallback

typedef void(* NamedPropertyEnumeratorCallback) (const PropertyCallbackInfo< Array > &info)

Returns an array containing the names of the properties the named property getter intercepts.

Definition at line 4735 of file v8.h.

◆ NamedPropertyGetterCallback

typedef void(* NamedPropertyGetterCallback) (Local< String > property, const PropertyCallbackInfo< Value > &info)

NamedProperty[Getter|Setter] are used as interceptors on object. See ObjectTemplate::SetNamedPropertyHandler.

Definition at line 4696 of file v8.h.

◆ NamedPropertyQueryCallback

typedef void(* NamedPropertyQueryCallback) (Local< String > property, const PropertyCallbackInfo< Integer > &info)

Returns a non-empty handle if the interceptor intercepts the request. The result is an integer encoding property attributes (like v8::None, v8::DontEnum, etc.)

Definition at line 4716 of file v8.h.

◆ NamedPropertySetterCallback

typedef void(* NamedPropertySetterCallback) (Local< String > property, Local< Value > value, const PropertyCallbackInfo< Value > &info)

Returns the value if the setter intercepts the request. Otherwise, returns an empty handle.

Definition at line 4705 of file v8.h.

◆ OOMErrorCallback

typedef void(* OOMErrorCallback) (const char *location, bool is_heap_oom)

Definition at line 5694 of file v8.h.

◆ PersistentContainerValue

typedef uintptr_t PersistentContainerValue

Definition at line 21 of file v8-util.h.

◆ PromiseRejectCallback

typedef void(* PromiseRejectCallback) (PromiseRejectMessage message)

Definition at line 5796 of file v8.h.

◆ ReturnAddressLocationResolver

typedef uintptr_t(* ReturnAddressLocationResolver) (uintptr_t return_addr_location)

ReturnAddressLocationResolver is used as a callback function when v8 is resolving the location of a return address on the stack. Profilers that change the return address on the stack can use this to resolve the stack location to whereever the profiler stashed the original return address.

Parameters
return_addr_locationA location on stack where a machine return address resides.
Returns
Either return_addr_location, or else a pointer to the profiler's copy of the original return address.
Note
The resolver function must not cause garbage collection.

Definition at line 7155 of file v8.h.

◆ SnapshotObjectId

typedef uint32_t SnapshotObjectId

Definition at line 19 of file v8-profiler.h.

◆ UniquePersistent

Definition at line 870 of file v8.h.

Enumeration Type Documentation

◆ AccessControl

Access control specifications.

Some accessors should be accessible across contexts. These accessors have an explicit access control parameter which specifies the kind of cross-context access that should be allowed.

TODO(dcarney): Remove PROHIBITS_OVERWRITING as it is now unused.

Enumerator
DEFAULT 
ALL_CAN_READ 
ALL_CAN_WRITE 
PROHIBITS_OVERWRITING 

Definition at line 2853 of file v8.h.

◆ AccessType

enum AccessType

Access type specification.

Enumerator
ACCESS_GET 
ACCESS_SET 
ACCESS_HAS 
ACCESS_DELETE 
ACCESS_KEYS 

Definition at line 4959 of file v8.h.

◆ AllocationAction

Enumerator
kAllocationActionAllocate 
kAllocationActionFree 
kAllocationActionAll 

Definition at line 5754 of file v8.h.

◆ ArrayBufferCreationMode

Enumerator
kInternalized 
kExternalized 

Definition at line 3922 of file v8.h.

◆ ConstructorBehavior

enum ConstructorBehavior
strong
Enumerator
kThrow 
kAllow 

Definition at line 3637 of file v8.h.

◆ DebugEvent

enum DebugEvent
Enumerator
Break 
Exception 
NewFunction 
BeforeCompile 
AfterCompile 
CompileError 
AsyncTaskEvent 

Definition at line 16 of file v8-debug.h.

◆ GCCallbackFlags

GCCallbackFlags is used to notify additional information about the GC callback.

  • kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for constructing retained object infos.
  • kGCCallbackFlagForced: The GC callback is for a forced GC for testing.
  • kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback is called synchronously without getting posted to an idle task.
  • kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called in a phase where V8 is trying to collect all available garbage (e.g., handling a low memory notification).
Enumerator
kNoGCCallbackFlags 
kGCCallbackFlagConstructRetainedObjectInfos 
kGCCallbackFlagForced 
kGCCallbackFlagSynchronousPhantomCallbackProcessing 
kGCCallbackFlagCollectAllAvailableGarbage 
kGCCallbackFlagCollectAllExternalMemory 

Definition at line 5897 of file v8.h.

◆ GCType

enum GCType

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.

Enumerator
kGCTypeScavenge 
kGCTypeMarkSweepCompact 
kGCTypeIncrementalMarking 
kGCTypeProcessWeakCallbacks 
kGCTypeAll 

Definition at line 5876 of file v8.h.

◆ IndexFilter

enum IndexFilter
strong

kIncludesIndices allows for integer indices to be collected, while kSkipIndices will exclude integer indicies from being collected.

Enumerator
kIncludeIndices 
kSkipIndices 

Definition at line 2885 of file v8.h.

◆ IntegrityLevel

enum IntegrityLevel
strong

Integrity level for objects.

Enumerator
kFrozen 
kSealed 

Definition at line 2890 of file v8.h.

◆ Intrinsic

enum Intrinsic

Definition at line 4604 of file v8.h.

◆ JitCodeEventOptions

Option flags passed to the SetJitCodeEventHandler function.

Enumerator
kJitCodeEventDefault 
kJitCodeEventEnumExisting 

Definition at line 6102 of file v8.h.

◆ KeyCollectionMode

enum KeyCollectionMode
strong

Keys/Properties filter enums:

KeyCollectionMode limits the range of collected properties. kOwnOnly limits the collected properties to the given Object only. kIncludesPrototypes will include all keys of the objects's prototype chain as well.

Enumerator
kOwnOnly 
kIncludePrototypes 

Definition at line 2879 of file v8.h.

◆ MemoryPressureLevel

enum MemoryPressureLevel
strong

Memory pressure level for the MemoryPressureNotification. kNone hints V8 that there is no memory pressure. kModerate hints V8 to speed up incremental garbage collection at the cost of of higher latency due to garbage collection pauses. kCritical hints V8 to free memory as soon as possible. Garbage collection pauses at this level will be large.

Enumerator
kNone 
kModerate 
kCritical 

Definition at line 6145 of file v8.h.

◆ MicrotasksPolicy

enum MicrotasksPolicy
strong

Policy for running microtasks:

  • explicit: microtasks are invoked with Isolate::RunMicrotasks() method;
  • scoped: microtasks invocation is controlled by MicrotasksScope objects;
  • auto: microtasks are invoked when the script call depth decrements to zero.
Enumerator
kExplicit 
kScoped 
kAuto 

Definition at line 5810 of file v8.h.

◆ NewStringType

enum NewStringType
strong
Enumerator
kNormal 
kInternalized 

Definition at line 2314 of file v8.h.

◆ ObjectSpace

Enumerator
kObjectSpaceNewSpace 
kObjectSpaceOldSpace 
kObjectSpaceCodeSpace 
kObjectSpaceMapSpace 
kObjectSpaceLoSpace 
kObjectSpaceAll 

Definition at line 5743 of file v8.h.

◆ PersistentContainerCallbackType

Enumerator
kNotWeak 
kWeakWithParameter 
kWeakWithInternalFields 
kWeak 

Definition at line 23 of file v8-util.h.

◆ PromiseRejectEvent

Enumerator
kPromiseRejectWithNoHandler 
kPromiseHandlerAddedAfterReject 

Definition at line 5766 of file v8.h.

◆ PropertyAttribute

PropertyAttribute.

Enumerator
None 

None.

ReadOnly 

ReadOnly, i.e., not writable.

DontEnum 

DontEnum, i.e., not enumerable.

DontDelete 

DontDelete, i.e., not configurable.

Definition at line 2810 of file v8.h.

◆ PropertyFilter

Property filter bits. They can be or'ed to build a composite filter.

Enumerator
ALL_PROPERTIES 
ONLY_WRITABLE 
ONLY_ENUMERABLE 
ONLY_CONFIGURABLE 
SKIP_STRINGS 
SKIP_SYMBOLS 

Definition at line 2863 of file v8.h.

◆ PropertyHandlerFlags

enum PropertyHandlerFlags
strong

Configuration flags for v8::NamedPropertyHandlerConfiguration or v8::IndexedPropertyHandlerConfiguration.

Enumerator
kNone 

None.

kAllCanRead 

See ALL_CAN_READ above.

kNonMasking 

Will not call into interceptor for properties on the receiver or prototype chain, i.e., only call into interceptor for properties that do not exist. Currently only valid for named interceptors.

kOnlyInterceptStrings 

Will not call into interceptor for symbol lookup. Only meaningful for named interceptors.

Definition at line 5192 of file v8.h.

◆ RAILMode

enum RAILMode

Option flags passed to the SetRAILMode function. See documentation https://developers.google.com/web/tools/chrome-devtools/ profile/evaluate-performance/rail

Enumerator
PERFORMANCE_RESPONSE 
PERFORMANCE_ANIMATION 
PERFORMANCE_IDLE 
PERFORMANCE_LOAD 

Definition at line 6082 of file v8.h.

◆ StateTag

enum StateTag
Enumerator
JS 
GC 
COMPILER 
OTHER 
EXTERNAL 
IDLE 

Definition at line 1670 of file v8.h.

◆ WeakCallbackType

enum WeakCallbackType
strong
Enumerator
kParameter 
kInternalFields 
kFinalizer 

Definition at line 468 of file v8.h.

Function Documentation

◆ False()

Local< Boolean > False ( Isolate isolate)

Definition at line 9450 of file v8.h.

◆ Just()

Maybe<T> v8::Just ( const T &  t)
inline

Definition at line 7647 of file v8.h.

References V8::Maybe.

◆ Nothing()

Maybe<T> v8::Nothing ( )
inline

Definition at line 7641 of file v8.h.

◆ Null()

Local< Primitive > Null ( Isolate isolate)

Definition at line 9432 of file v8.h.

◆ RegisterExtension()

void V8_EXPORT v8::RegisterExtension ( Extension extension)

◆ True()

Local< Boolean > True ( Isolate isolate)

Definition at line 9441 of file v8.h.

◆ Undefined()

Local< Primitive > Undefined ( Isolate isolate)

Definition at line 9423 of file v8.h.