1#include "node.h" 2 3namespace { 4 5using v8::FunctionCallbackInfo; 6using v8::Local; 7using v8::Object; 8using v8::Value; 9 10void GetExecutionAsyncId(const FunctionCallbackInfo<Value>& args) { 11 args.GetReturnValue().Set( 12 node::AsyncHooksGetExecutionAsyncId(args.GetIsolate())); 13} 14 15void GetTriggerAsyncId(const FunctionCallbackInfo<Value>& args) { 16 args.GetReturnValue().Set( 17 node::AsyncHooksGetTriggerAsyncId(args.GetIsolate())); 18} 19 20void Initialize(Local<Object> exports) { 21 NODE_SET_METHOD(exports, "getExecutionAsyncId", GetExecutionAsyncId); 22 NODE_SET_METHOD(exports, "getTriggerAsyncId", GetTriggerAsyncId); 23} 24 25} // anonymous namespace 26 27NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize) 28