5 #ifndef V8_ASYNC_HOOKS_WRAPPER_H_ 6 #define V8_ASYNC_HOOKS_WRAPPER_H_ 10 #include "include/v8.h" 11 #include "src/objects.h" 15 typedef double async_id_t;
18 async_id_t execution_async_id;
19 async_id_t trigger_async_id;
30 bool IsEnabled()
const {
return enabled_; }
58 ctx.execution_async_id = 1;
59 ctx.trigger_async_id = 0;
60 asyncContexts.push(ctx);
67 async_id_t GetExecutionAsyncId()
const;
68 async_id_t GetTriggerAsyncId()
const;
75 std::vector<AsyncHooksWrap*> async_wraps_;
90 std::stack<AsyncContext> asyncContexts;
91 async_id_t current_async_id;
96 #endif // V8_ASYNC_HOOKS_WRAPPER_H_