Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
v8::WeakCallbackInfo< T > Class Template Reference

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

Inheritance diagram for v8::WeakCallbackInfo< T >:
[legend]
Collaboration diagram for v8::WeakCallbackInfo< T >:
[legend]

Public Types

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

Public Member Functions

 WeakCallbackInfo (Isolate *isolate, T *parameter, void *embedder_fields[kEmbedderFieldsInWeakCallback], Callback *callback)
 
IsolateGetIsolate () const
 
T * GetParameter () const
 
void * GetInternalField (int index) const
 
void SetSecondPassCallback (Callback callback) const
 

Member Typedef Documentation

◆ Callback

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

Constructor & Destructor Documentation

◆ WeakCallbackInfo()

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

Member Function Documentation

◆ GetInternalField()

template<class T >
void * v8::WeakCallbackInfo< T >::GetInternalField ( int  index) const
inline
Here is the call graph for this function:

◆ GetIsolate()

template<typename T >
Isolate * v8::WeakCallbackInfo< T >::GetIsolate ( ) const
inline

◆ GetParameter()

template<typename T >
T * v8::WeakCallbackInfo< T >::GetParameter ( ) const
inline

◆ SetSecondPassCallback()

template<typename T >
void v8::WeakCallbackInfo< T >::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.


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