Node.js  v8.x
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine
async-wrap.cc File Reference
#include "async-wrap.h"
#include "async-wrap-inl.h"
#include "env.h"
#include "env-inl.h"
#include "util.h"
#include "util-inl.h"
#include "uv.h"
#include "v8.h"
#include "v8-profiler.h"
Include dependency graph for async-wrap.cc:

Go to the source code of this file.

Data Structures

class  RetainedAsyncInfo
 
class  PromiseWrap
 

Namespaces

 node
 

Macros

#define V(PROVIDER)   #PROVIDER,
 
#define SET_HOOK_FN(name)
 
#define FORCE_SET_TARGET_FIELD(obj, str, field)
 
#define SET_HOOKS_CONSTANT(name)
 
#define V(p)
 
#define V(PROVIDER)
 

Typedefs

using AsyncHooks = node::Environment::AsyncHooks
 

Functions

RetainedObjectInfo * WrapperInfo (uint16_t class_id, Local< Value > wrapper)
 
bool DomainEnter (Environment *env, Local< Object > object)
 
bool DomainExit (Environment *env, v8::Local< v8::Object > object)
 
void LoadAsyncWrapperInfo (Environment *env)
 
async_id AsyncHooksGetExecutionAsyncId (Isolate *isolate)
 
async_id AsyncHooksGetCurrentId (Isolate *isolate)
 
async_id AsyncHooksGetTriggerAsyncId (Isolate *isolate)
 
async_id AsyncHooksGetTriggerId (Isolate *isolate)
 
async_context EmitAsyncInit (Isolate *isolate, Local< Object > resource, const char *name, async_id trigger_async_id)
 
void EmitAsyncDestroy (Isolate *isolate, async_context asyncContext)
 
MaybeLocal< Value > MakeCallback (Isolate *isolate, Local< Object > recv, Local< Function > callback, int argc, Local< Value > *argv, async_id asyncId, async_id triggerAsyncId)
 
MaybeLocal< Value > MakeCallback (Isolate *isolate, Local< Object > recv, const char *method, int argc, Local< Value > *argv, async_id asyncId, async_id triggerAsyncId)
 
MaybeLocal< Value > MakeCallback (Isolate *isolate, Local< Object > recv, Local< String > symbol, int argc, Local< Value > *argv, async_id asyncId, async_id triggerAsyncId)
 

Macro Definition Documentation

◆ FORCE_SET_TARGET_FIELD

#define FORCE_SET_TARGET_FIELD (   obj,
  str,
  field 
)
Value:
(obj)->DefineOwnProperty(context, \
FIXED_ONE_BYTE_STRING(isolate, str), \
field, \
ReadOnlyDontDelete).FromJust()

Referenced by PromiseWrap::GetParentId().

◆ SET_HOOK_FN

#define SET_HOOK_FN (   name)
Value:
Local<Value> name##_v = fn_obj->Get( \
env->context(), \
FIXED_ONE_BYTE_STRING(env->isolate(), #name)).ToLocalChecked(); \
CHECK(name##_v->IsFunction()); \
env->set_async_hooks_##name##_function(name##_v.As<Function>());

Referenced by PromiseWrap::GetParentId().

◆ SET_HOOKS_CONSTANT

#define SET_HOOKS_CONSTANT (   name)
Value:
constants, #name, Integer::New(isolate, AsyncHooks::name));
#define FORCE_SET_TARGET_FIELD(obj, str, field)
MaybeLocal< Object > New(Isolate *isolate, Local< String > string, enum encoding enc)
Definition: node_buffer.cc:241

Referenced by PromiseWrap::GetParentId().

◆ V [1/3]

#define V (   PROVIDER)    #PROVIDER,

◆ V [2/3]

#define V (   p)
Value:
async_providers, #p, Integer::New(isolate, AsyncWrap::PROVIDER_ ## p));
#define FORCE_SET_TARGET_FIELD(obj, str, field)
dtrace p
Definition: v8ustack.d:615
MaybeLocal< Object > New(Isolate *isolate, Local< String > string, enum encoding enc)
Definition: node_buffer.cc:241

◆ V [3/3]

#define V (   PROVIDER)
Value:
heap_profiler->SetWrapperClassInfoProvider( \
(NODE_ASYNC_ID_OFFSET + AsyncWrap::PROVIDER_ ## PROVIDER), WrapperInfo);
RetainedObjectInfo * WrapperInfo(uint16_t class_id, Local< Value > wrapper)
Definition: async-wrap.cc:124

Typedef Documentation

◆ AsyncHooks

using AsyncHooks = node::Environment::AsyncHooks

Definition at line 60 of file async-wrap.cc.