summaryrefslogtreecommitdiff
path: root/src/node_internals.h
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-08-08 20:02:55 +0200
committerAnna Henningsen <anna@addaleax.net>2017-09-14 17:38:44 +0200
commit64616bb76932f8a1b05cc616e82dba84c2a7f87e (patch)
tree9cf828e999cc751321ac01c170273f0f543fa4d5 /src/node_internals.h
parentbe6d807bbf09ab09cfabf7e941fbaedbb1ff7456 (diff)
downloadandroid-node-v8-64616bb76932f8a1b05cc616e82dba84c2a7f87e.tar.gz
android-node-v8-64616bb76932f8a1b05cc616e82dba84c2a7f87e.tar.bz2
android-node-v8-64616bb76932f8a1b05cc616e82dba84c2a7f87e.zip
src: refactor async callback handling
- Merge the two almost-but-not-quite identical `MakeCallback()` implementations - Provide a public `CallbackScope` class for embedders in order to enable `MakeCallback()`-like behaviour without tying that to calling a JS function PR-URL: https://github.com/nodejs/node/pull/14697 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_internals.h')
-rw-r--r--src/node_internals.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/node_internals.h b/src/node_internals.h
index 9b6fae9d6a..9371d442ad 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -286,6 +286,14 @@ static v8::MaybeLocal<v8::Object> New(Environment* env,
}
} // namespace Buffer
+v8::MaybeLocal<v8::Value> InternalMakeCallback(
+ Environment* env,
+ v8::Local<v8::Object> recv,
+ const v8::Local<v8::Function> callback,
+ int argc,
+ v8::Local<v8::Value> argv[],
+ async_context asyncContext);
+
} // namespace node
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS