diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-07-27 14:36:40 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-08-05 13:46:14 +0200 |
commit | 5be9b1d7f37ca41b0bb27d532881cb6b0dc54f6e (patch) | |
tree | ddbf2862b3fb52cf4ee5b503dc7da4934102f68b /src/async_wrap.h | |
parent | af7164ebccd21d9fc5b0782e0427257f7637a4db (diff) | |
download | android-node-v8-5be9b1d7f37ca41b0bb27d532881cb6b0dc54f6e.tar.gz android-node-v8-5be9b1d7f37ca41b0bb27d532881cb6b0dc54f6e.tar.bz2 android-node-v8-5be9b1d7f37ca41b0bb27d532881cb6b0dc54f6e.zip |
process: use owner_symbol for `_getActive*`
This makes it easier to provide public APIs in the return types
of `process._getActiveHandles()` and `process._getActiveRequests()`.
PR-URL: https://github.com/nodejs/node/pull/22002
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'src/async_wrap.h')
-rw-r--r-- | src/async_wrap.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/async_wrap.h b/src/async_wrap.h index 60078ee093..ee04479de0 100644 --- a/src/async_wrap.h +++ b/src/async_wrap.h @@ -178,6 +178,12 @@ class AsyncWrap : public BaseObject { static void WeakCallback(const v8::WeakCallbackInfo<DestroyParam> &info); + // Returns the object that 'owns' an async wrap. For example, for a + // TCP connection handle, this is the corresponding net.Socket. + v8::Local<v8::Object> GetOwner(); + static v8::Local<v8::Object> GetOwner(Environment* env, + v8::Local<v8::Object> obj); + // This is a simplified version of InternalCallbackScope that only runs // the `before` and `after` hooks. Only use it when not actually calling // back into JS; otherwise, use InternalCallbackScope. |