v8 13.6.233 (node 24.1.0)
V8 is Google's open source JavaScript engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
WeakCallbackInfo< T > Class Template Reference

#include <v8-weak-callback-info.h>

Inheritance diagram for WeakCallbackInfo< T >:
Collaboration diagram for WeakCallbackInfo< T >:

Public Types

using Callback = void (*)(const WeakCallbackInfo<T>& data)
 

Public Member Functions

 WeakCallbackInfo (Isolate *isolate, T *parameter, void *embedder_fields[kEmbedderFieldsInWeakCallback], Callback *callback)
 
V8_INLINE IsolateGetIsolate () const
 
V8_INLINE T * GetParameter () const
 
V8_INLINE void * GetInternalField (int index) const
 
void SetSecondPassCallback (Callback callback) const
 
- Public Member Functions inherited from ConditionalStackAllocatedBase< T >
 CPPGC_STACK_ALLOCATED ()
 

Detailed Description

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

Definition at line 25 of file v8-weak-callback-info.h.

Member Typedef Documentation

◆ Callback

template<typename T>
using Callback = void (*)(const WeakCallbackInfo<T>& data)

Definition at line 28 of file v8-weak-callback-info.h.

Constructor & Destructor Documentation

◆ WeakCallbackInfo()

template<typename T>
WeakCallbackInfo ( Isolate * isolate,
T * parameter,
void * embedder_fields[kEmbedderFieldsInWeakCallback],
Callback * callback )
inline

Definition at line 30 of file v8-weak-callback-info.h.

Member Function Documentation

◆ GetInternalField()

template<class T>
void * GetInternalField ( int index) const

◆ GetIsolate()

template<typename T>
V8_INLINE Isolate * GetIsolate ( ) const
inline

Definition at line 38 of file v8-weak-callback-info.h.

References V8_INLINE.

◆ GetParameter()

template<typename T>
V8_INLINE T * GetParameter ( ) const
inline

Definition at line 39 of file v8-weak-callback-info.h.

References V8_INLINE.

◆ SetSecondPassCallback()

template<typename T>
void SetSecondPassCallback ( Callback callback) const
inline

When a weak callback is first invoked the embedders must Reset() the handle which triggered the callback. The handle itself is unusable for anything else. No other V8 API calls may be called in the first callback. Additional work requires scheduling a second invocation via SetSecondPassCallback() which will be called some time after all the initial callbacks are processed.

The second pass callback is prohibited from executing JavaScript. Embedders should schedule another callback in case this is required.

Definition at line 53 of file v8-weak-callback-info.h.


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