v8  6.2.414 (node 8.16.2)
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 V8_DEPRECATED ("Use Data() to explicitly pass Callee instead", Local< Function > Callee() 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 IsolateGetIsolate () const
 
V8_INLINE ReturnValue< T > GetReturnValue () const
 

Static Public Attributes

static const int kArgsLength = 8
 

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 kCalleeIndex = 5
 
static const int kContextSaveIndex = 6
 
static const int kNewTargetIndex = 7
 

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 3649 of file v8.h.

Constructor & Destructor Documentation

◆ FunctionCallbackInfo()

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

Member Function Documentation

◆ Data()

The data argument specified when creating the callback.

Definition at line 9499 of file v8.h.

References FunctionCallbackInfo< T >::implicit_args_, FunctionCallbackInfo< T >::kDataIndex, and Local< T >::Local.

◆ GetIsolate()

◆ GetReturnValue()

ReturnValue< T > GetReturnValue

◆ Holder()

Local< Object > Holder

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 9487 of file v8.h.

References FunctionCallbackInfo< T >::implicit_args_, FunctionCallbackInfo< T >::kHolderIndex, and Local< T >::Local.

◆ IsConstructCall()

bool IsConstructCall

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

Definition at line 9517 of file v8.h.

References FunctionCallbackInfo< T >::NewTarget().

◆ Length()

int Length

The number of available arguments.

Definition at line 9523 of file v8.h.

References FunctionCallbackInfo< T >::length_.

◆ NewTarget()

Local< Value > NewTarget

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

Definition at line 9493 of file v8.h.

References FunctionCallbackInfo< T >::implicit_args_, FunctionCallbackInfo< T >::kNewTargetIndex, and Local< T >::Local.

Referenced by FunctionCallbackInfo< T >::IsConstructCall().

◆ operator[]()

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

Accessor for the available arguments.

Definition at line 9467 of file v8.h.

References FunctionCallbackInfo< T >::GetIsolate(), FunctionCallbackInfo< T >::length_, Local< T >::Local, and FunctionCallbackInfo< T >::values_.

◆ This()

Local< Object > This

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

Definition at line 9481 of file v8.h.

References Local< T >::Local, and FunctionCallbackInfo< T >::values_.

◆ V8_DEPRECATED()

V8_INLINE V8_DEPRECATED ( "Use Data() to explicitly pass Callee instead"  ,
Local< Function > Callee() const   
)

Friends And Related Function Documentation

◆ debug::ConsoleCallArguments

friend class debug::ConsoleCallArguments
friend

Definition at line 3686 of file v8.h.

◆ internal::CustomArguments< FunctionCallbackInfo >

Definition at line 3684 of file v8.h.

◆ internal::FunctionCallbackArguments

friend class internal::FunctionCallbackArguments
friend

Definition at line 3684 of file v8.h.

Field Documentation

◆ implicit_args_

◆ kArgsLength

const int kArgsLength = 8
static

Definition at line 3681 of file v8.h.

◆ kCalleeIndex

const int kCalleeIndex = 5
staticprotected

Definition at line 3692 of file v8.h.

◆ kContextSaveIndex

const int kContextSaveIndex = 6
staticprotected

Definition at line 3693 of file v8.h.

◆ kDataIndex

const int kDataIndex = 4
staticprotected

Definition at line 3691 of file v8.h.

Referenced by FunctionCallbackInfo< T >::Data().

◆ kHolderIndex

const int kHolderIndex = 0
staticprotected

Definition at line 3687 of file v8.h.

Referenced by FunctionCallbackInfo< T >::Holder().

◆ kIsolateIndex

const int kIsolateIndex = 1
staticprotected

Definition at line 3688 of file v8.h.

Referenced by FunctionCallbackInfo< T >::GetIsolate().

◆ kNewTargetIndex

const int kNewTargetIndex = 7
staticprotected

Definition at line 3694 of file v8.h.

Referenced by FunctionCallbackInfo< T >::NewTarget().

◆ kReturnValueDefaultValueIndex

const int kReturnValueDefaultValueIndex = 2
staticprotected

Definition at line 3689 of file v8.h.

◆ kReturnValueIndex

const int kReturnValueIndex = 3
staticprotected

Definition at line 3690 of file v8.h.

Referenced by FunctionCallbackInfo< T >::GetReturnValue().

◆ length_

◆ values_

internal::Object** values_
protected

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