From 64616bb76932f8a1b05cc616e82dba84c2a7f87e Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 8 Aug 2017 20:02:55 +0200 Subject: src: refactor async callback handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 Reviewed-By: Refael Ackermann Reviewed-By: James M Snell --- src/node_internals.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/node_internals.h') 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 New(Environment* env, } } // namespace Buffer +v8::MaybeLocal InternalMakeCallback( + Environment* env, + v8::Local recv, + const v8::Local callback, + int argc, + v8::Local argv[], + async_context asyncContext); + } // namespace node #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -- cgit v1.2.3