v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::AsyncHooks Class Reference

#include <async-hooks-wrapper.h>

Collaboration diagram for v8::AsyncHooks:

Public Member Functions

 AsyncHooks (Isolate *isolate)
 
 ~AsyncHooks ()
 
async_id_t GetExecutionAsyncId () const
 
async_id_t GetTriggerAsyncId () const
 
Local< ObjectCreateHook (const v8::FunctionCallbackInfo< v8::Value > &info)
 

Public Attributes

Persistent< FunctionTemplateasync_hook_ctor
 

Static Private Member Functions

static void ShellPromiseHook (PromiseHookType type, Local< Promise > promise, Local< Value > parent)
 
static void PromiseHookDispatch (PromiseHookType type, Local< Promise > promise, Local< Value > parent, const AsyncHooksWrap &wrap, AsyncHooks *hooks)
 

Private Attributes

std::vector< std::shared_ptr< AsyncHooksWrap > > async_wraps_
 
v8::Isolatev8_isolate_
 
Persistent< ObjectTemplateasync_hooks_templ
 
Persistent< Privateasync_id_symbol
 
Persistent< Privatetrigger_id_symbol
 
std::stack< AsyncContextasyncContexts
 
async_id_t current_async_id
 
bool skip_after_termination_ = false
 

Detailed Description

Definition at line 60 of file async-hooks-wrapper.h.

Constructor & Destructor Documentation

◆ AsyncHooks()

v8::AsyncHooks::AsyncHooks ( v8::Isolate * v8_isolate)
explicit

Definition at line 54 of file async-hooks-wrapper.cc.

Here is the call graph for this function:

◆ ~AsyncHooks()

v8::AsyncHooks::~AsyncHooks ( )

Definition at line 83 of file async-hooks-wrapper.cc.

Here is the call graph for this function:

Member Function Documentation

◆ CreateHook()

Local< Object > v8::AsyncHooks::CreateHook ( const v8::FunctionCallbackInfo< v8::Value > & info)

Definition at line 126 of file async-hooks-wrapper.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetExecutionAsyncId()

async_id_t v8::AsyncHooks::GetExecutionAsyncId ( ) const

Definition at line 118 of file async-hooks-wrapper.cc.

◆ GetTriggerAsyncId()

async_id_t v8::AsyncHooks::GetTriggerAsyncId ( ) const

Definition at line 122 of file async-hooks-wrapper.cc.

◆ PromiseHookDispatch()

void v8::AsyncHooks::PromiseHookDispatch ( PromiseHookType type,
Local< Promise > promise,
Local< Value > parent,
const AsyncHooksWrap & wrap,
AsyncHooks * hooks )
staticprivate

Definition at line 261 of file async-hooks-wrapper.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShellPromiseHook()

void v8::AsyncHooks::ShellPromiseHook ( PromiseHookType type,
Local< Promise > promise,
Local< Value > parent )
staticprivate

Definition at line 177 of file async-hooks-wrapper.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ async_hook_ctor

Persistent<FunctionTemplate> v8::AsyncHooks::async_hook_ctor

Definition at line 70 of file async-hooks-wrapper.h.

◆ async_hooks_templ

Persistent<ObjectTemplate> v8::AsyncHooks::async_hooks_templ
private

Definition at line 75 of file async-hooks-wrapper.h.

◆ async_id_symbol

Persistent<Private> v8::AsyncHooks::async_id_symbol
private

Definition at line 76 of file async-hooks-wrapper.h.

◆ async_wraps_

std::vector<std::shared_ptr<AsyncHooksWrap> > v8::AsyncHooks::async_wraps_
private

Definition at line 73 of file async-hooks-wrapper.h.

◆ asyncContexts

std::stack<AsyncContext> v8::AsyncHooks::asyncContexts
private

Definition at line 86 of file async-hooks-wrapper.h.

◆ current_async_id

async_id_t v8::AsyncHooks::current_async_id
private

Definition at line 87 of file async-hooks-wrapper.h.

◆ skip_after_termination_

bool v8::AsyncHooks::skip_after_termination_ = false
private

Definition at line 90 of file async-hooks-wrapper.h.

◆ trigger_id_symbol

Persistent<Private> v8::AsyncHooks::trigger_id_symbol
private

Definition at line 77 of file async-hooks-wrapper.h.

◆ v8_isolate_

v8::Isolate* v8::AsyncHooks::v8_isolate_
private

Definition at line 74 of file async-hooks-wrapper.h.


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