v8  7.0.276(node11.14.0)
V8 is Google's open source JavaScript engine
FunctionCallbackInfo< T > Class Template Reference

#include <v8.h>

Public Member Functions

V8_INLINE int Length () const
 
V8_INLINE Local< Valueoperator[] (int i) const
 
V8_INLINE Local< ObjectThis () const
 
V8_INLINE Local< ObjectHolder () const
 
V8_INLINE Local< ValueNewTarget () const
 
V8_INLINE bool IsConstructCall () const
 
V8_INLINE Local< ValueData () const
 
V8_INLINE Isolate * GetIsolate () const
 
V8_INLINE ReturnValue< T > GetReturnValue () const
 

Static Public Attributes

static const int kArgsLength = 6
 

Protected Member Functions

V8_INLINE FunctionCallbackInfo (internal::Object **implicit_args, internal::Object **values, int length)
 

Protected Attributes

internal::Object ** implicit_args_
 
internal::Object ** values_
 
int length_
 

Static Protected Attributes

static const int kHolderIndex = 0
 
static const int kIsolateIndex = 1
 
static const int kReturnValueDefaultValueIndex = 2
 
static const int kReturnValueIndex = 3
 
static const int kDataIndex = 4
 
static const int kNewTargetIndex = 5
 

Friends

class internal::FunctionCallbackArguments
 
class internal::CustomArguments< FunctionCallbackInfo >
 
class debug::ConsoleCallArguments
 

Detailed Description

template<typename T>
class v8::FunctionCallbackInfo< T >

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.

Definition at line 133 of file v8.h.

Constructor & Destructor Documentation

◆ FunctionCallbackInfo()

FunctionCallbackInfo ( internal::Object **  implicit_args,
internal::Object **  values,
int  length 
)
protected

Definition at line 9877 of file v8.h.

Member Function Documentation

◆ Data()

Local< Value > Data ( ) const

The data argument specified when creating the callback.

Definition at line 9908 of file v8.h.

◆ GetIsolate()

Isolate * GetIsolate ( ) const

The current Isolate.

Definition at line 9914 of file v8.h.

◆ GetReturnValue()

ReturnValue< T > GetReturnValue ( ) const

The ReturnValue for the call.

Definition at line 9920 of file v8.h.

◆ Holder()

Local< Object > Holder ( ) const

If the callback was created without a Signature, this is the same value as This(). If there is a signature, and the signature didn't match This() but one of its hidden prototypes, this will be the respective hidden prototype.

Note that this is not the prototype of This() on which the accessor referencing this callback was found (which in V8 internally is often referred to as holder [sic]).

Definition at line 9896 of file v8.h.

◆ IsConstructCall()

bool IsConstructCall ( ) const

Indicates whether this is a regular call or a construct call.

Definition at line 9926 of file v8.h.

◆ Length()

int Length ( ) const

The number of available arguments.

Definition at line 9932 of file v8.h.

◆ NewTarget()

Local< Value > NewTarget ( ) const

For construct calls, this returns the "new.target" value.

Definition at line 9902 of file v8.h.

◆ operator[]()

Local< Value > operator[] ( int  i) const

Accessor for the available arguments.

Definition at line 9883 of file v8.h.

◆ This()

Local< Object > This ( ) const

Returns the receiver. This corresponds to the "this" value.

Definition at line 9890 of file v8.h.

Friends And Related Function Documentation

◆ debug::ConsoleCallArguments

friend class debug::ConsoleCallArguments
friend

Definition at line 3909 of file v8.h.

◆ internal::CustomArguments< FunctionCallbackInfo >

Definition at line 3908 of file v8.h.

◆ internal::FunctionCallbackArguments

friend class internal::FunctionCallbackArguments
friend

Definition at line 3907 of file v8.h.

Field Documentation

◆ implicit_args_

internal::Object** implicit_args_
protected

Definition at line 3919 of file v8.h.

◆ kArgsLength

const int kArgsLength = 6
static

Definition at line 3904 of file v8.h.

◆ kDataIndex

const int kDataIndex = 4
staticprotected

Definition at line 3914 of file v8.h.

◆ kHolderIndex

const int kHolderIndex = 0
staticprotected

Definition at line 3910 of file v8.h.

◆ kIsolateIndex

const int kIsolateIndex = 1
staticprotected

Definition at line 3911 of file v8.h.

◆ kNewTargetIndex

const int kNewTargetIndex = 5
staticprotected

Definition at line 3915 of file v8.h.

◆ kReturnValueDefaultValueIndex

const int kReturnValueDefaultValueIndex = 2
staticprotected

Definition at line 3912 of file v8.h.

◆ kReturnValueIndex

const int kReturnValueIndex = 3
staticprotected

Definition at line 3913 of file v8.h.

◆ length_

int length_
protected

Definition at line 3921 of file v8.h.

◆ values_

internal::Object** values_
protected

Definition at line 3920 of file v8.h.


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