summaryrefslogtreecommitdiff
path: root/src/async_wrap.h
diff options
context:
space:
mode:
authorAnatoli Papirovski <apapirovski@mac.com>2018-02-11 16:35:59 -0500
committerAnatoli Papirovski <apapirovski@mac.com>2018-02-16 14:23:14 -0500
commite9ac80bb397293feef3b47f3ed609c86edb48681 (patch)
tree357523992d1b469f800e58853a3a79214633453e /src/async_wrap.h
parent7748865cd3322ff9421458ccc862291eb26cec62 (diff)
downloadnode-new-e9ac80bb397293feef3b47f3ed609c86edb48681.tar.gz
async_hooks: clean up usage in internal code
Instead of exposing internals of async_hooks & async_wrap throughout the code base, create necessary helper methods within the internal async_hooks that allows easy usage by Node.js internals. This stops every single internal user of async_hooks from importing a ton of functions, constants and internal Aliased Buffers from C++ async_wrap. Adds functions initHooksExist, afterHooksExist, and destroyHooksExist to determine whether the related emit methods need to be triggered. Adds clearDefaultTriggerAsyncId and clearAsyncIdStack on the JS side as an alternative to always calling C++. Moves async_id_symbol and trigger_async_id_symbol to internal async_hooks as they are never used in C++. Renames newUid to newAsyncId for added clarity of its purpose. Adjusts usage throughout the codebase, as well as in a couple of tests. PR-URL: https://github.com/nodejs/node/pull/18720 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/async_wrap.h')
-rw-r--r--src/async_wrap.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/async_wrap.h b/src/async_wrap.h
index 1a5a347ba6..b7aed5d789 100644
--- a/src/async_wrap.h
+++ b/src/async_wrap.h
@@ -125,8 +125,6 @@ class AsyncWrap : public BaseObject {
static void GetAsyncId(const v8::FunctionCallbackInfo<v8::Value>& args);
static void PushAsyncIds(const v8::FunctionCallbackInfo<v8::Value>& args);
static void PopAsyncIds(const v8::FunctionCallbackInfo<v8::Value>& args);
- static void ClearAsyncIdStack(
- const v8::FunctionCallbackInfo<v8::Value>& args);
static void AsyncReset(const v8::FunctionCallbackInfo<v8::Value>& args);
static void QueueDestroyAsyncId(
const v8::FunctionCallbackInfo<v8::Value>& args);